Skip to content

Commit 14b1c8c

Browse files
committed
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
1 parent af7490f commit 14b1c8c

File tree

9 files changed

+57
-34
lines changed

9 files changed

+57
-34
lines changed

mysql-test/suite/encryption/t/innodb-bad-key-change.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ SELECT * FROM t1;
5656

5757
--error ER_GET_ERRMSG
5858
SELECT * FROM t1;
59-
<<<<<<< HEAD
60-
--replace_regex /.*tablespace [0-9]*//
61-
=======
6259
--replace_regex /tablespace [0-9]*/tablespace #/
63-
>>>>>>> Remove end . from error messages to get them consistent
6460
SHOW WARNINGS;
6561

6662
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt

mysql-test/suite/innodb_zip/r/innochecksum_3.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Filename::tab#.ibd
169169
#:: # | Index page | index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
170170
#:: # | Index page | index id=#, page level=# leaf #, No. of records=#, garbage=#, n_recs=#, -
171171
#:: # | Freshly allocated page | -
172+
# Variables used by page type dump for ibdata1
172173

173174
Variables (--variable-name=value)
174175
and boolean options {FALSE|TRUE} Value (after reading options)

mysql-test/suite/innodb_zip/t/innochecksum_3.test

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#************************************************************
44
--source include/have_innodb.inc
55
--source include/have_innodb_zip.inc
6-
--source include/have_debug.inc
76

87
# Valgrind would complain about memory leaks when we crash on purpose.
98
--source include/not_valgrind.inc
@@ -219,33 +218,59 @@ opendir(DIR, $dir) or die $!;
219218
my $file= 'dump.txt';
220219
# open file in write mode
221220
open IN_FILE,"<", "$dir/tmp/$file" or die $!;
222-
open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
221+
open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
223222
while(<IN_FILE>)
224223
{
225224
# Replace the intergers to # and complete file path to file name only.
226225
$_=~ s/Filename.+/Filename::tab1.ibd/g;
227226
$_=~ s/\d+/#/g;
228-
# Remove debug option, which is not in all builds
229-
continue if (/debug/);
230227
print OUT_FILE $_;
231228
}
232229
close(IN_FILE);
233230
close(OUT_FILE);
234231
# move the new content from tmp file to the orginal file.
235-
move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
232+
move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
236233
closedir(DIR);
237234
EOF
238235

239236
--echo # Print the contents stored in dump.txt
240237
cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
241238
--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
242239

243-
# Page type dump for ibdata1
244-
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
245-
--exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1
240+
--echo # Variables used by page type dump for ibdata1
241+
--exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1 > $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt
242+
246243
--file_exists $MYSQLTEST_VARDIR/tmp/dump.txt
247244
--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
248245

246+
perl;
247+
use strict;
248+
use warnings;
249+
use File::Copy;
250+
my $dir = $ENV{'MYSQLTEST_VARDIR'};
251+
opendir(DIR, $dir) or die $!;
252+
my $file= 'page_verbose_summary.txt';
253+
# open file in write mode
254+
open IN_FILE,"<", "$dir/tmp/$file" or die $!;
255+
open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
256+
while(<IN_FILE>)
257+
{
258+
# Replace complete file path to file name only.
259+
$_=~ s/$dir/MYSQLTEST_VARDIR/;
260+
# Remove debug option, which is not in all builds
261+
next if (/debug/);
262+
print OUT_FILE $_;
263+
}
264+
close(IN_FILE);
265+
close(OUT_FILE);
266+
# move the new content from tmp file to the orginal file.
267+
move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
268+
closedir(DIR);
269+
EOF
270+
271+
cat_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt;
272+
--remove_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt
273+
249274
--echo [5]: Page type dump for with shortform for tab1.ibd
250275
--exec $INNOCHECKSUM -D $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd
251276

@@ -258,18 +283,18 @@ opendir(DIR, $dir) or die $!;
258283
my $file= 'dump.txt';
259284
# open file in write mode
260285
open IN_FILE,"<", "$dir/tmp/$file" or die $!;
261-
open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
286+
open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
262287
while(<IN_FILE>)
263288
{
264-
# Replace teh intergers to # and complete file patht to file name only.
289+
# Replace the intergers to # and complete file path to file name only.
265290
$_=~ s/Filename.+/Filename::tab1.ibd/g;
266291
$_=~ s/\d+/#/g;
267292
print OUT_FILE $_;
268293
}
269294
close(IN_FILE);
270295
close(OUT_FILE);
271296
# move the new content from tmp file to the orginal file.
272-
move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
297+
move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
273298
closedir(DIR);
274299
EOF
275300

mysql-test/suite/sys_vars/r/thread_cache_size_func.result

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@ disconnect conn1;
1919
disconnect conn2;
2020
disconnect conn3;
2121
disconnect conn4;
22-
SHOW STATUS LIKE 'Threads_cached';
23-
Variable_name Value
24-
Threads_cached 3
25-
3 Expected
2622
SET @@GLOBAL.thread_cache_size= 1;
2723
CONNECT conn1,localhost,root,,;
2824
CONNECT conn2,localhost,root,,;
2925
connection default;
3026
disconnect conn1;
3127
disconnect conn2;
32-
SHOW STATUS LIKE 'Threads_cached';
33-
Variable_name Value
34-
Threads_cached 1
35-
1 Expected
3628
SET @@GLOBAL.thread_cache_size = @global_thread_cache_size;

mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ let $old_status= `SELECT variable_value FROM information_schema.global_status
2020
# let $wait_condition =
2121
# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s');
2222
# -- source include/wait_condition.inc
23-
if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status
24-
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`)
23+
if (`SELECT count(*) > 0 FROM information_schema.global_status
24+
WHERE (LOWER(variable_name) = 'innodb_buffer_pool_dump_status' or
25+
LOWER(variable_name) = 'innodb_buffer_pool_load_status')
26+
and variable_value LIKE '%completed at%'`)
2527
{
2628
-- sleep 2
2729
}
@@ -42,12 +44,17 @@ let $wait_condition =
4244
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
4345
-- file_exists $file
4446

47+
let $old_load_status=
48+
`SELECT variable_value FROM information_schema.global_status
49+
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'`;
50+
4551
# Load the dump
4652
SET GLOBAL innodb_buffer_pool_load_now = ON;
4753

4854
# Wait for the load to complete
4955
let $wait_condition =
50-
SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
56+
SELECT variable_value != '$old_load_status' &&
57+
SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
5158
FROM information_schema.global_status
5259
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
5360
--disable_warnings

mysql-test/suite/sys_vars/t/thread_cache_size_func.test

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ DISCONNECT conn4;
7373
let $wait_condition= SELECT COUNT(*)= 1 FROM INFORMATION_SCHEMA.PROCESSLIST;
7474
--source include/wait_condition.inc
7575

76-
SHOW STATUS LIKE 'Threads_cached';
77-
--echo 3 Expected
76+
# Wait until thread cache becomes 3
77+
let $wait_condition= SELECT variable_value = 3 FROM INFORMATION_SCHEMA.global_status where variable_name="Threads_cached";
78+
--source include/wait_condition.inc
7879

7980
#
8081
# Decreasing cache size to 1
@@ -97,8 +98,9 @@ DISCONNECT conn2;
9798
let $wait_condition= SELECT COUNT(*)= 1 FROM INFORMATION_SCHEMA.PROCESSLIST;
9899
--source include/wait_condition.inc
99100

100-
SHOW STATUS LIKE 'Threads_cached';
101-
--echo 1 Expected
101+
# Wait until thread cache becomes 1
102+
let $wait_condition= SELECT variable_value = 1 FROM INFORMATION_SCHEMA.global_status where variable_name="Threads_cached";
103+
--source include/wait_condition.inc
102104

103105
#
104106
# Cleanup

sql/sql_insert.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
25212521
bitmaps_used++;
25222522
copy->vcol_set= copy->def_vcol_set;
25232523
}
2524-
if (share->default_fields)
2524+
if (share->default_fields || share->default_expressions)
25252525
{
25262526
if (!(copy->has_value_set= (MY_BITMAP*) alloc_root(client_thd->mem_root,
25272527
sizeof(MY_BITMAP))))

storage/innobase/handler/i_s.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6658,7 +6658,7 @@ i_s_dict_fill_sys_tablestats(
66586658

66596659
OK(fields[SYS_TABLESTATS_AUTONINC]->store(table->autoinc, true));
66606660

6661-
OK(fields[SYS_TABLESTATS_TABLE_REF_COUNT]->store(static_cast<double>(ref_count), true));
6661+
OK(fields[SYS_TABLESTATS_TABLE_REF_COUNT]->store(static_cast<double>(ref_count)));
66626662

66636663
OK(schema_table_store_record(thd, table_to_fill));
66646664

@@ -7598,7 +7598,7 @@ i_s_dict_fill_sys_fields(
75987598

75997599
OK(field_store_string(fields[SYS_FIELD_NAME], field->name));
76007600

7601-
OK(fields[SYS_FIELD_POS]->store(static_cast<double>(pos), true));
7601+
OK(fields[SYS_FIELD_POS]->store(static_cast<double>(pos)));
76027602

76037603
OK(schema_table_store_record(thd, table_to_fill));
76047604

storage/innobase/row/row0merge.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3668,7 +3668,7 @@ row_merge_insert_index_tuples(
36683668
((pct_cost * inserted_rows) / table_total_rows);
36693669

36703670
/* presenting 10.12% as 1012 integer */;
3671-
onlineddl_pct_progress = (pct_progress + curr_progress) * 100;
3671+
onlineddl_pct_progress = (ulint) ((pct_progress + curr_progress) * 100);
36723672
}
36733673
}
36743674

0 commit comments

Comments
 (0)