diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 7c0f02b2ccb..49e0fc8ee48 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -56,11 +56,7 @@ SELECT * FROM t1; --error ER_GET_ERRMSG SELECT * FROM t1; -<<<<<<< HEAD ---replace_regex /.*tablespace [0-9]*// -======= --replace_regex /tablespace [0-9]*/tablespace #/ ->>>>>>> Remove end . from error messages to get them consistent SHOW WARNINGS; -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result index 86d8fa4058e..c5c2a7673b3 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result @@ -169,6 +169,7 @@ Filename::tab#.ibd #:: # | Index page | index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, - #:: # | Index page | index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, - #:: # | Freshly allocated page | - +# Variables used by page type dump for ibdata1 Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test index 19574372149..4b386099f86 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_3.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test @@ -3,7 +3,6 @@ #************************************************************ --source include/have_innodb.inc --source include/have_innodb_zip.inc ---source include/have_debug.inc # Valgrind would complain about memory leaks when we crash on purpose. --source include/not_valgrind.inc @@ -219,20 +218,18 @@ opendir(DIR, $dir) or die $!; my $file= 'dump.txt'; # open file in write mode open IN_FILE,"<", "$dir/tmp/$file" or die $!; -open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!; +open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!; while() { # Replace the intergers to # and complete file path to file name only. $_=~ s/Filename.+/Filename::tab1.ibd/g; $_=~ s/\d+/#/g; - # Remove debug option, which is not in all builds - continue if (/debug/); print OUT_FILE $_; } close(IN_FILE); close(OUT_FILE); # move the new content from tmp file to the orginal file. -move ("$dir/tmp/tmpfile", "$dir/tmp/$file"); +move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file"); closedir(DIR); EOF @@ -240,12 +237,40 @@ EOF cat_file $MYSQLTEST_VARDIR/tmp/dump.txt; --remove_file $MYSQLTEST_VARDIR/tmp/dump.txt -# Page type dump for ibdata1 ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1 +--echo # Variables used by page type dump for ibdata1 +--exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1 > $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt + --file_exists $MYSQLTEST_VARDIR/tmp/dump.txt --remove_file $MYSQLTEST_VARDIR/tmp/dump.txt +perl; +use strict; +use warnings; +use File::Copy; +my $dir = $ENV{'MYSQLTEST_VARDIR'}; +opendir(DIR, $dir) or die $!; +my $file= 'page_verbose_summary.txt'; +# open file in write mode +open IN_FILE,"<", "$dir/tmp/$file" or die $!; +open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!; +while() +{ + # Replace complete file path to file name only. + $_=~ s/$dir/MYSQLTEST_VARDIR/; + # Remove debug option, which is not in all builds + next if (/debug/); + print OUT_FILE $_; +} +close(IN_FILE); +close(OUT_FILE); +# move the new content from tmp file to the orginal file. +move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file"); +closedir(DIR); +EOF + +cat_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt; +--remove_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt + --echo [5]: Page type dump for with shortform for tab1.ibd --exec $INNOCHECKSUM -D $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd @@ -258,10 +283,10 @@ opendir(DIR, $dir) or die $!; my $file= 'dump.txt'; # open file in write mode open IN_FILE,"<", "$dir/tmp/$file" or die $!; -open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!; +open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!; while() { - # Replace teh intergers to # and complete file patht to file name only. + # Replace the intergers to # and complete file path to file name only. $_=~ s/Filename.+/Filename::tab1.ibd/g; $_=~ s/\d+/#/g; print OUT_FILE $_; @@ -269,7 +294,7 @@ while() close(IN_FILE); close(OUT_FILE); # move the new content from tmp file to the orginal file. -move ("$dir/tmp/tmpfile", "$dir/tmp/$file"); +move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file"); closedir(DIR); EOF diff --git a/mysql-test/suite/sys_vars/r/thread_cache_size_func.result b/mysql-test/suite/sys_vars/r/thread_cache_size_func.result index fed087b573f..9cdacffaff1 100644 --- a/mysql-test/suite/sys_vars/r/thread_cache_size_func.result +++ b/mysql-test/suite/sys_vars/r/thread_cache_size_func.result @@ -19,18 +19,10 @@ disconnect conn1; disconnect conn2; disconnect conn3; disconnect conn4; -SHOW STATUS LIKE 'Threads_cached'; -Variable_name Value -Threads_cached 3 -3 Expected SET @@GLOBAL.thread_cache_size= 1; CONNECT conn1,localhost,root,,; CONNECT conn2,localhost,root,,; connection default; disconnect conn1; disconnect conn2; -SHOW STATUS LIKE 'Threads_cached'; -Variable_name Value -Threads_cached 1 -1 Expected SET @@GLOBAL.thread_cache_size = @global_thread_cache_size; 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 701d6a8a96a..a260dc2516b 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 @@ -20,8 +20,10 @@ let $old_status= `SELECT variable_value FROM information_schema.global_status # 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'`) +if (`SELECT count(*) > 0 FROM information_schema.global_status + WHERE (LOWER(variable_name) = 'innodb_buffer_pool_dump_status' or + LOWER(variable_name) = 'innodb_buffer_pool_load_status') + and variable_value LIKE '%completed at%'`) { -- sleep 2 } @@ -42,12 +44,17 @@ let $wait_condition = -- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` -- file_exists $file +let $old_load_status= + `SELECT variable_value FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'`; + # Load the dump SET GLOBAL innodb_buffer_pool_load_now = ON; # Wait for the load to complete let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at ' + SELECT variable_value != '$old_load_status' && + SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at ' FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; --disable_warnings diff --git a/mysql-test/suite/sys_vars/t/thread_cache_size_func.test b/mysql-test/suite/sys_vars/t/thread_cache_size_func.test index 30d5188a927..9f4a45ec48c 100644 --- a/mysql-test/suite/sys_vars/t/thread_cache_size_func.test +++ b/mysql-test/suite/sys_vars/t/thread_cache_size_func.test @@ -73,8 +73,9 @@ DISCONNECT conn4; let $wait_condition= SELECT COUNT(*)= 1 FROM INFORMATION_SCHEMA.PROCESSLIST; --source include/wait_condition.inc -SHOW STATUS LIKE 'Threads_cached'; ---echo 3 Expected +# Wait until thread cache becomes 3 +let $wait_condition= SELECT variable_value = 3 FROM INFORMATION_SCHEMA.global_status where variable_name="Threads_cached"; +--source include/wait_condition.inc # # Decreasing cache size to 1 @@ -97,8 +98,9 @@ DISCONNECT conn2; let $wait_condition= SELECT COUNT(*)= 1 FROM INFORMATION_SCHEMA.PROCESSLIST; --source include/wait_condition.inc -SHOW STATUS LIKE 'Threads_cached'; ---echo 1 Expected +# Wait until thread cache becomes 1 +let $wait_condition= SELECT variable_value = 1 FROM INFORMATION_SCHEMA.global_status where variable_name="Threads_cached"; +--source include/wait_condition.inc # # Cleanup diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 97e9464deb6..1abfd5925b8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2521,7 +2521,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) bitmaps_used++; copy->vcol_set= copy->def_vcol_set; } - if (share->default_fields) + if (share->default_fields || share->default_expressions) { if (!(copy->has_value_set= (MY_BITMAP*) alloc_root(client_thd->mem_root, sizeof(MY_BITMAP)))) diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 81ae95f8a50..011c46525b9 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -6658,7 +6658,7 @@ i_s_dict_fill_sys_tablestats( OK(fields[SYS_TABLESTATS_AUTONINC]->store(table->autoinc, true)); - OK(fields[SYS_TABLESTATS_TABLE_REF_COUNT]->store(static_cast(ref_count), true)); + OK(fields[SYS_TABLESTATS_TABLE_REF_COUNT]->store(static_cast(ref_count))); OK(schema_table_store_record(thd, table_to_fill)); @@ -7598,7 +7598,7 @@ i_s_dict_fill_sys_fields( OK(field_store_string(fields[SYS_FIELD_NAME], field->name)); - OK(fields[SYS_FIELD_POS]->store(static_cast(pos), true)); + OK(fields[SYS_FIELD_POS]->store(static_cast(pos))); OK(schema_table_store_record(thd, table_to_fill)); diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 2ab0e491bd7..9b89af23d5f 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -3668,7 +3668,7 @@ row_merge_insert_index_tuples( ((pct_cost * inserted_rows) / table_total_rows); /* presenting 10.12% as 1012 integer */; - onlineddl_pct_progress = (pct_progress + curr_progress) * 100; + onlineddl_pct_progress = (ulint) ((pct_progress + curr_progress) * 100); } }