Skip to content

Commit 65d48b4

Browse files
committed
Merge 10.2 to 10.3
2 parents eedd617 + ed4ccf3 commit 65d48b4

File tree

81 files changed

+1700
-984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1700
-984
lines changed

BUILD/compile-pentium64-asan-max

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
path=`dirname $0`
1818
. "$path/SETUP.sh"
1919

20-
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address"
20+
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized"
2121
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins"
2222
export LDFLAGS="-ldl"
2323

extra/innochecksum.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,8 @@ is_page_corrupted(
568568
page_size);
569569
if (is_corrupted && log_file) {
570570
fprintf(log_file,
571-
"Page " ULINTPF ":%llu may be corrupted;"
571+
"[page id: space=" ULINTPF
572+
", page_number=%llu] may be corrupted;"
572573
" key_version=%u\n",
573574
space_id, cur_page_num,
574575
mach_read_from_4(

extra/mariabackup/xtrabackup.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ struct my_option xb_server_options[] =
12951295
{"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE,
12961296
"Ignored for mysqld option compatibility",
12971297
(G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0,
1298-
GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, 512ULL << 30, 0,
1298+
GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, log_group_max_size, 0,
12991299
UNIV_PAGE_SIZE_MAX, 0},
13001300
{"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP,
13011301
"Ignored for mysqld option compatibility",

include/my_valgrind.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@
5555
#endif /* HAVE_VALGRIND_MEMCHECK_H */
5656

5757
#if defined(TRASH_FREED_MEMORY)
58+
/* NOTE: Do not invoke TRASH_FILL directly! Use TRASH_ALLOC or TRASH_FREE.
59+
60+
The MEM_UNDEFINED() call before memset() is for canceling the effect
61+
of any previous MEM_NOACCESS(). We must invoke MEM_UNDEFINED() after
62+
writing the dummy pattern, unless MEM_NOACCESS() is going to be invoked.
63+
On AddressSanitizer, the MEM_UNDEFINED() in TRASH_ALLOC() has no effect. */
5864
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
5965
#else
60-
#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0)
66+
#define TRASH_FILL(A,B,C) while (0)
6167
#endif
62-
68+
/** Note that some memory became allocated or uninitialized. */
6369
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
70+
/** Note that some memory became freed. (Prohibit further access to it.) */
6471
#define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0)
6572

6673
#endif /* MY_VALGRIND_INCLUDED */

mysql-test/include/wait_for_slave_param.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if (!$_slave_param_comparison)
6969

7070
if ($rpl_debug)
7171
{
72-
--echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [timeout='$_slave_timeout', \$slave_error_param='$slave_error_param']
72+
--echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [\$slave_error_param='$slave_error_param']
7373
}
7474

7575
--let $_slave_check_configured= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1)

mysql-test/main/connect_debug.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ drop user bad;
1717
#
1818
set global debug_dbug='+d,auth_invalid_plugin';
1919
create user 'bad' identified by 'worse';
20+
--replace_regex /loaded: [^\n]*/loaded: invalid plugin name/
2021
--error 1
2122
--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1
2223
set global debug_dbug=@old_dbug;

mysql-test/main/kill.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,3 +399,19 @@ DROP USER u1@localhost;
399399
SET DEBUG_SYNC = 'RESET';
400400
DROP FUNCTION MY_KILL;
401401
set global sql_mode=default;
402+
#
403+
# MDEV-17998
404+
# Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed
405+
# in tc_release_table on KILL_TIMEOUT
406+
#
407+
SET max_statement_time= 2;
408+
CREATE TABLE t1 (a INT);
409+
CREATE VIEW v1 AS SELECT * FROM t1;
410+
CREATE TABLE t2 (b INT, c INT);
411+
LOCK TABLES v1 READ, t2 WRITE, t1 WRITE;
412+
ALTER TABLE t1 CHANGE f1 f2 DOUBLE;
413+
Got one of the listed errors
414+
ALTER TABLE t2 DROP c;
415+
UNLOCK TABLES;
416+
DROP VIEW v1;
417+
DROP TABLE t1, t2;

mysql-test/main/kill.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,3 +642,23 @@ SET DEBUG_SYNC = 'RESET';
642642
DROP FUNCTION MY_KILL;
643643

644644
set global sql_mode=default;
645+
646+
--echo #
647+
--echo # MDEV-17998
648+
--echo # Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed
649+
--echo # in tc_release_table on KILL_TIMEOUT
650+
--echo #
651+
652+
SET max_statement_time= 2;
653+
654+
CREATE TABLE t1 (a INT);
655+
CREATE VIEW v1 AS SELECT * FROM t1;
656+
CREATE TABLE t2 (b INT, c INT);
657+
658+
LOCK TABLES v1 READ, t2 WRITE, t1 WRITE;
659+
--error ER_BAD_FIELD_ERROR,ER_STATEMENT_TIMEOUT
660+
ALTER TABLE t1 CHANGE f1 f2 DOUBLE;
661+
ALTER TABLE t2 DROP c;
662+
UNLOCK TABLES;
663+
DROP VIEW v1;
664+
DROP TABLE t1, t2;

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,6 +3329,7 @@ sub mysql_install_db {
33293329
# Create the bootstrap.sql file
33303330
# ----------------------------------------------------------------------
33313331
my $bootstrap_sql_file= "$opt_vardir/log/bootstrap.sql";
3332+
$ENV{'MYSQL_BOOTSTRAP_SQL_FILE'}= $bootstrap_sql_file;
33323333

33333334
if (! -e $bootstrap_sql_file)
33343335
{

mysql-test/suite/binlog/r/binlog_unsafe.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,6 +2675,8 @@ Warnings:
26752675
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave
26762676
INSERT INTO insert_2_keys VALUES (1, 2)
26772677
ON DUPLICATE KEY UPDATE a=VALUES(a)+10, b=VALUES(b)+10;
2678+
Warnings:
2679+
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe
26782680
DROP TABLE filler_table;
26792681
DROP TABLE insert_table;
26802682
DROP TABLE update_table;

0 commit comments

Comments
 (0)