diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-04-29 16:50:58 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-04-29 16:50:58 -0400 |
commit | 8a1efa1bdd29b756c93a3ddbd8ad6fadec1082bc (patch) | |
tree | 9827e75d29817f3ddbc2008ba2b5b21553c14c5e /mysql-test/suite/sys_vars/t | |
parent | 7c42b47e67918104fddd121a1ca9fede28ed47cf (diff) | |
parent | 9eba34f08675c31b0796eeb127582be827773070 (diff) | |
download | mariadb-git-8a1efa1bdd29b756c93a3ddbd8ad6fadec1082bc.tar.gz |
Merge branch '10.0' into 10.0-galera
Diffstat (limited to 'mysql-test/suite/sys_vars/t')
3 files changed, 53 insertions, 10 deletions
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test index fe376a3032e..a0409901865 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test @@ -8,12 +8,32 @@ SET @orig = @@global.innodb_buffer_pool_load_now; SELECT @orig; +let $old_status= `SELECT variable_value FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`; + +# A previous test could have run buffer pool dump already; +# in this case we want to make sure that the current time is different +# from the timestamp in the status variable. +# We should have had a smart wait condition here, like the commented one below, +# but we can't because of MDEV-9867, so there will be just sleep instead. +# And it might be not enough to sleep one second, so we'll have to sleep two. +# let $wait_condition = +# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s'); +# -- source include/wait_condition.inc + +if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`) +{ + -- sleep 2 +} + # Do the dump SET GLOBAL innodb_buffer_pool_dump_now = ON; # Wait for the dump to complete let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' + SELECT variable_value != '$old_status' + AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; -- source include/wait_condition.inc diff --git a/mysql-test/suite/sys_vars/t/innodb_empty_free_list_algorithm_basic.opt b/mysql-test/suite/sys_vars/t/innodb_empty_free_list_algorithm_basic.opt new file mode 100644 index 00000000000..c788dc76ac7 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_empty_free_list_algorithm_basic.opt @@ -0,0 +1 @@ +--loose-innodb-buffer-pool-size=20M diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv.test b/mysql-test/suite/sys_vars/t/secure_file_priv.test index 3e2a4fa467a..5c53da58275 100644 --- a/mysql-test/suite/sys_vars/t/secure_file_priv.test +++ b/mysql-test/suite/sys_vars/t/secure_file_priv.test @@ -5,17 +5,39 @@ CREATE TABLE t1 (c1 VARCHAR(50)); INSERT INTO t1 VALUES ("one"),("two"),("three"),("four"),("five"); SHOW VARIABLES LIKE 'secure_file_priv'; --disable_query_log + # Atempt to create a file where we normally aren't allowed to create one. +# # Doing this in a portable manner is difficult but we should be able to -# count on the depth of the directory hierarchy used. Three steps up from -# the datadir is the 'mysql_test' directory. ---let $PROTECTED_FILE=`SELECT concat(@@datadir,'/../../../bug50373.txt')` ---eval SELECT * FROM t1 INTO OUTFILE '$PROTECTED_FILE'; -DELETE FROM t1; ---eval LOAD DATA INFILE '$PROTECTED_FILE' INTO TABLE t1; -SELECT * FROM t1; ---eval SELECT load_file('$PROTECTED_FILE') AS loaded_file; +# count on the directory hierarchy used. A step up from MYSQLTEST_VARDIR +# should definitely lead us to a "protected" directory, +# but at the same time should still be writable since MTR was able +# to create the vardir itself there. +# If we run tests normally, it will be mysql-test directory. +# If we run tests with --mem, it will be /dev/shm. +# If we run tests with --parallel, it will be mysql-test/var +# (because MYSQLTEST_VARDIR in this case is mysql-test/var/N). + +--perl +use File::Basename; +my $protected_file= dirname($ENV{MYSQLTEST_VARDIR}).'/bug50373.txt'; +open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/bug50373.inc") or die; +print FILE "SELECT * FROM t1 INTO OUTFILE '".$protected_file."';\n"; +print FILE "DELETE FROM t1;\n"; +print FILE "LOAD DATA INFILE '".$protected_file."' INTO TABLE t1;\n"; +print FILE "SELECT * FROM t1;\n"; +print FILE "SELECT load_file('",$protected_file,"') AS loaded_file;\n"; +close(FILE); +EOF + +--source $MYSQL_TMP_DIR/bug50373.inc +--remove_file $MYSQL_TMP_DIR/bug50373.inc --enable_query_log -remove_file $PROTECTED_FILE; + DROP TABLE t1; +--perl +use File::Basename; +unlink dirname($ENV{MYSQLTEST_VARDIR}).'/bug50373.txt'; +EOF + |