Commit 14b1c8c8 authored by Monty's avatar Monty

After merge and bug fixes

- Fixed compiler warnings
- Removed have_debug.inc from innochecksum_3
- Fixed race condition in innodb_buffer_pool_load
- Fixed merge issue in innodb-bad-key-change.test
- Fixed missing array allocation that could cause
  function_defaults_notembedded to fail
- Fixed thread_cache_size_func
parent af7490f9
......@@ -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
......
......@@ -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)
......
......@@ -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(<IN_FILE>)
{
# 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(<IN_FILE>)
{
# 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(<IN_FILE>)
{
# 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(<IN_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
......
......@@ -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;
......@@ -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
......
......@@ -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
......
......@@ -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))))
......
......@@ -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<double>(ref_count), true));
OK(fields[SYS_TABLESTATS_TABLE_REF_COUNT]->store(static_cast<double>(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<double>(pos), true));
OK(fields[SYS_FIELD_POS]->store(static_cast<double>(pos)));
OK(schema_table_store_record(thd, table_to_fill));
......
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment