diff options
63 files changed, 372 insertions, 172 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 6f0166857bc..09a645bdf0d 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -100,8 +100,11 @@ SET(ignored "%ignore /etc" "%ignore /etc/init.d" "%ignore /etc/logrotate.d" + "%ignore /etc/security" "%ignore /etc/systemd" "%ignore /etc/systemd/system" + "%ignore /lib" + "%ignore /lib/security" "%ignore ${CMAKE_INSTALL_PREFIX}" "%ignore ${CMAKE_INSTALL_PREFIX}/bin" "%ignore ${CMAKE_INSTALL_PREFIX}/include" diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 87d8cacb4d3..ab19a7f0f11 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -139,11 +139,10 @@ SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d") # IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(INSTALL_LIBDIR_RPM "lib64") - SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") ELSE() SET(INSTALL_LIBDIR_RPM "lib") - SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") ENDIF() +SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin") # SET(INSTALL_INCLUDEDIR_RPM "include/mysql") # @@ -164,6 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock" SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d") +SET(INSTALL_PAMDIR_RPM "/lib/security") # # DEB layout @@ -196,6 +196,11 @@ SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock") SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d") +IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(INSTALL_PAMDIR_DEB "/lib/x86_64-linux-gnu/security") +ELSE() + SET(INSTALL_PAMDIR_DEB "/lib/i386-linux-gnu/security") +ENDIF() # # SVR4 layout @@ -235,17 +240,18 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "") # Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE # layout is chosen) -FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2 - INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR - SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES) - SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} - CACHE STRING "${var} installation directory" ${FORCE}) - MARK_AS_ADVANCED(INSTALL_${var}DIR) - - IF(IS_ABSOLUTE ${INSTALL_${var}DIR}) - SET(INSTALL_${var}DIRABS ${INSTALL_${var}DIR}) - ELSE() - SET(INSTALL_${var}DIRABS "${CMAKE_INSTALL_PREFIX}/${INSTALL_${var}DIR}") +GET_CMAKE_PROPERTY(ALL_VARS VARIABLES) +FOREACH (V ${ALL_VARS}) + IF (V MATCHES "^(INSTALL_([A-Z_0-9]+)DIR)_${INSTALL_LAYOUT}$") + SET(var ${CMAKE_MATCH_1}) + SET(${var} "${${V}}" CACHE STRING "${CMAKE_MATCH_2} installation directory" ${FORCE}) + MARK_AS_ADVANCED(${var}) + + IF(IS_ABSOLUTE "${${var}}") + SET(${var}ABS "${${var}}") + ELSE() + SET(${var}ABS "${CMAKE_INSTALL_PREFIX}/${${var}}") + ENDIF() ENDIF() ENDFOREACH() diff --git a/debian/mariadb-server-10.3.install b/debian/mariadb-server-10.3.install index 9447446a6b5..eca7d572251 100644 --- a/debian/mariadb-server-10.3.install +++ b/debian/mariadb-server-10.3.install @@ -3,7 +3,9 @@ debian/additions/debian-start.inc.sh usr/share/mysql debian/additions/echo_stderr usr/share/mysql debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d etc/apparmor.d/usr.sbin.mysqld +etc/security/user_map.conf lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf +lib/*/security/pam_user_map.so usr/bin/aria_chk usr/bin/aria_dump_log usr/bin/aria_ftdump diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt index be2d78b504e..adaf82b325e 100644 --- a/extra/mariabackup/CMakeLists.txt +++ b/extra/mariabackup/CMakeLists.txt @@ -97,7 +97,7 @@ ENDIF() ######################################################################## -# xbstream binary +# mbstream binary ######################################################################## MYSQL_ADD_EXECUTABLE(mbstream ds_buffer.cc diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc index 38b1bcb6f58..f0e9c06b355 100644 --- a/extra/mariabackup/innobackupex.cc +++ b/extra/mariabackup/innobackupex.cc @@ -586,8 +586,8 @@ static struct my_option ibx_long_options[] = {"stream", OPT_STREAM, "This option specifies the format in which to " "do the streamed backup. The option accepts a string argument. The " "backup will be done to STDOUT in the specified format. Currently, " - "the only supported formats are tar and xbstream. This option is " - "passed directly to xtrabackup's --stream option.", + "the only supported formats are tar and mbstream/xbstream. This " + "option is passed directly to xtrabackup's --stream option.", (uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -655,7 +655,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu [--include=REGEXP] [--user=NAME]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\n\ [--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\ - [--slave-info] [--galera-info] [--stream=tar|xbstream]\n\ + [--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\ [--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\ [--databases=LIST] [--no-lock] \n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ @@ -751,7 +751,8 @@ ibx_get_one_option(int optid, } break; case OPT_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { ibx_msg("Invalid --stream argument: %s\n", argument); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index ddaed8bd16a..ac307fda04e 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -905,7 +905,7 @@ struct my_option xb_client_options[] = {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " "in the specified format." - "Supported format is 'xbstream'." + "Supported format is 'mbstream' or 'xbstream'." , (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1712,7 +1712,8 @@ xb_get_one_option(int optid, xtrabackup_target_dir= xtrabackup_real_target_dir; break; case OPT_XTRA_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { diff --git a/libmariadb b/libmariadb -Subproject a1283d0b10a3b675bede48d9fe2d082865a24a6 +Subproject 8e9c3116105d9a998a60991b7f4ba910d454d4b diff --git a/mysql-test/main/default_session.result b/mysql-test/main/default_session.result index 6c0bcad0cb3..1b0c5f3f67a 100644 --- a/mysql-test/main/default_session.result +++ b/mysql-test/main/default_session.result @@ -92,3 +92,31 @@ a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI drop table t1; +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +a b c +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +flush tables; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; diff --git a/mysql-test/main/default_session.test b/mysql-test/main/default_session.test index 7796354ffd4..5e582bd5ca1 100644 --- a/mysql-test/main/default_session.test +++ b/mysql-test/main/default_session.test @@ -80,3 +80,27 @@ insert t1 () values (); set sql_mode=default; select * from t1; drop table t1; + +# +# MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes +# +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +drop table t1; + +# same with vcols +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +flush tables; +select a, b, from_unixtime(a) from t1; +drop table t1; diff --git a/mysql-test/main/func_regexp_pcre.result b/mysql-test/main/func_regexp_pcre.result index e030df99756..494fe917dc6 100644 --- a/mysql-test/main/func_regexp_pcre.result +++ b/mysql-test/main/func_regexp_pcre.result @@ -888,33 +888,33 @@ Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 1 -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 1 -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 243 -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) 0 -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); -LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) -803 +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +1603 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR('a_kollision', 'oll'); diff --git a/mysql-test/main/func_regexp_pcre.test b/mysql-test/main/func_regexp_pcre.test index 21600390bb2..de0fe94b7c1 100644 --- a/mysql-test/main/func_regexp_pcre.test +++ b/mysql-test/main/func_regexp_pcre.test @@ -438,19 +438,19 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, # SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); # # MDEV-12942 REGEXP_INSTR returns 1 when using brackets diff --git a/mysql-test/main/ssl_system_ca,bad.result b/mysql-test/main/ssl_system_ca,bad.result new file mode 100644 index 00000000000..b9c6d3e29d8 --- /dev/null +++ b/mysql-test/main/ssl_system_ca,bad.result @@ -0,0 +1 @@ +ERROR 2026 (HY000): SSL connection error: Validation of SSL server certificate failed diff --git a/mysql-test/main/ssl_system_ca.combinations b/mysql-test/main/ssl_system_ca.combinations new file mode 100644 index 00000000000..6e3576ada15 --- /dev/null +++ b/mysql-test/main/ssl_system_ca.combinations @@ -0,0 +1,11 @@ +[good] +# +# hostname on the certificate is localhost +# + +[bad] +# +# hostname on the certificate is server8k +# +loose-ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem +loose-ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem diff --git a/mysql-test/main/ssl_system_ca.result b/mysql-test/main/ssl_system_ca.result new file mode 100644 index 00000000000..78f8bf805dd --- /dev/null +++ b/mysql-test/main/ssl_system_ca.result @@ -0,0 +1,2 @@ +*************************** 1. row *************************** +have_ssl: 1 diff --git a/mysql-test/main/ssl_system_ca.test b/mysql-test/main/ssl_system_ca.test new file mode 100644 index 00000000000..920e391090f --- /dev/null +++ b/mysql-test/main/ssl_system_ca.test @@ -0,0 +1,22 @@ +# +# Tests here don't use --ssl-ca but expect the certificate to be +# signed by a CA in a system CA store +# +# They only work for openssl, because the following line works only there: +let SSL_CERT_DIR=$MYSQL_TMP_DIR; + +source include/not_embedded.inc; + +if (`select @@version_ssl_library not like 'OpenSSL%'`) { + skip Needs OpenSSL; +} + +# See `openssl x509 -in cacert.pem -noout -issuer_hash` +copy_file $MYSQL_TEST_DIR/std_data/cacert.pem $MYSQL_TMP_DIR/ed1f42db.0; + +# +# test --ssl-verify-server-cert +# + +disable_abort_on_error; +exec $MYSQL --ssl-verify-server-cert -Ee "select (variable_value <> '') as have_ssl from information_schema.session_status where variable_name='ssl_cipher'" 2>&1; diff --git a/mysql-test/suite/binlog/include/binlog_index.inc b/mysql-test/suite/binlog/include/binlog_index.inc index b930386a0ba..d73091d59ab 100644 --- a/mysql-test/suite/binlog/include/binlog_index.inc +++ b/mysql-test/suite/binlog/include/binlog_index.inc @@ -22,7 +22,7 @@ call mtr.add_suppression('Could not use .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; -let $old=`select @@debug`; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; @@ -273,6 +273,6 @@ SELECT @index; -- replace_regex /\.[\\\/]master/master/ SELECT @index; -eval SET SESSION debug_dbug="$old"; +SET @@SESSION.debug_dbug = @saved_dbug; --echo End of tests diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index 02af5e40aab..4b6b4c7fbee 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -5,6 +5,7 @@ call mtr.add_suppression('Turning logging off for the whole duration of the MySQ call mtr.add_suppression('Could not use .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000011 master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff --git a/mysql-test/suite/binlog_encryption/binlog_index.result b/mysql-test/suite/binlog_encryption/binlog_index.result index 02af5e40aab..4b6b4c7fbee 100644 --- a/mysql-test/suite/binlog_encryption/binlog_index.result +++ b/mysql-test/suite/binlog_encryption/binlog_index.result @@ -5,6 +5,7 @@ call mtr.add_suppression('Turning logging off for the whole duration of the MySQ call mtr.add_suppression('Could not use .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000011 master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff --git a/mysql-test/suite/binlog_encryption/rpl_corruption.result b/mysql-test/suite/binlog_encryption/rpl_corruption.result index db72bb304fc..f32b7c58ad1 100644 --- a/mysql-test/suite/binlog_encryption/rpl_corruption.result +++ b/mysql-test/suite/binlog_encryption/rpl_corruption.result @@ -34,10 +34,11 @@ START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] @@ -47,7 +48,7 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -60,5 +61,4 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result index 20f3facea27..12e5455c6c1 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result @@ -1513,7 +1513,7 @@ SET GLOBAL slave_parallel_threads=10; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1522,7 +1522,7 @@ test.t2 analyze status OK INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1544,7 +1544,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1554,7 +1554,7 @@ SET SESSION server_id= @old_server_id; INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1580,7 +1580,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1601,7 +1601,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1631,11 +1631,11 @@ SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill'; SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1655,7 +1655,7 @@ a b 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result b/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result index 570d2534ed7..3dd5a3ea83c 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result @@ -4,7 +4,7 @@ connection server_2; include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/innodb/r/innodb_bug30113362.result b/mysql-test/suite/innodb/r/innodb_bug30113362.result index a5d273aa4f7..9d43053b281 100644 --- a/mysql-test/suite/innodb/r/innodb_bug30113362.result +++ b/mysql-test/suite/innodb/r/innodb_bug30113362.result @@ -63,11 +63,11 @@ SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; COMMIT; SET DEBUG_SYNC = 'now SIGNAL roll2'; connect con1,localhost,root,,; -SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting'; +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; SELECT a00 FROM t1 WHERE a00 = 'bii'; connection default; -SET DEBUG_SYNC = 'now WAIT_FOR lockwait1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; SET DEBUG_SYNC = 'now SIGNAL resume'; connection con1; a00 diff --git a/mysql-test/suite/innodb/t/innodb_bug30113362.test b/mysql-test/suite/innodb/t/innodb_bug30113362.test index 6d8833a38fc..de5d07ffb29 100644 --- a/mysql-test/suite/innodb/t/innodb_bug30113362.test +++ b/mysql-test/suite/innodb/t/innodb_bug30113362.test @@ -106,12 +106,18 @@ COMMIT; SET DEBUG_SYNC = 'now SIGNAL roll2'; connect (con1,localhost,root,,); -SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting'; +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +--enable_warnings SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; send SELECT a00 FROM t1 WHERE a00 = 'bii'; connection default; -SET DEBUG_SYNC = 'now WAIT_FOR lockwait1'; +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +--enable_warnings # bug#30113362 caused deadlock SET DEBUG_SYNC = 'now SIGNAL resume'; diff --git a/mysql-test/suite/innodb_fts/r/concurrent_insert.result b/mysql-test/suite/innodb_fts/r/concurrent_insert.result index 9be7ba35f30..e91ea02b1de 100644 --- a/mysql-test/suite/innodb_fts/r/concurrent_insert.result +++ b/mysql-test/suite/innodb_fts/r/concurrent_insert.result @@ -29,7 +29,7 @@ ALTER TABLE t2 drop index idx1; connection default; set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; -SET @@GLOBAL.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/innodb_fts/r/sync_block.result b/mysql-test/suite/innodb_fts/r/sync_block.result index f9f695c42f4..65bee127e80 100644 --- a/mysql-test/suite/innodb_fts/r/sync_block.result +++ b/mysql-test/suite/innodb_fts/r/sync_block.result @@ -39,7 +39,7 @@ SLEEP(2) SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text INSERT INTO t1(title) VALUES('mysql database') -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; # Case 2: Sync blocks DML(insert) on other tables. @@ -71,7 +71,7 @@ SLEEP(2) # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; disconnect con1; diff --git a/mysql-test/suite/innodb_fts/t/concurrent_insert.test b/mysql-test/suite/innodb_fts/t/concurrent_insert.test index 1505767d835..35debd87cea 100644 --- a/mysql-test/suite/innodb_fts/t/concurrent_insert.test +++ b/mysql-test/suite/innodb_fts/t/concurrent_insert.test @@ -46,7 +46,7 @@ set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; reap; -SET @@GLOBAL.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/innodb_fts/t/sync_block.test b/mysql-test/suite/innodb_fts/t/sync_block.test index 1dd3c2bc38e..895d2ba8a59 100644 --- a/mysql-test/suite/innodb_fts/t/sync_block.test +++ b/mysql-test/suite/innodb_fts/t/sync_block.test @@ -61,7 +61,7 @@ SELECT SLEEP(2); -- echo # slow log results should only contain INSERT INTO t1. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; @@ -107,7 +107,7 @@ SELECT SLEEP(2); -- echo # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.result b/mysql-test/suite/maria/aria_pack_mdev14183.result new file mode 100644 index 00000000000..b20f60c5b8a --- /dev/null +++ b/mysql-test/suite/maria/aria_pack_mdev14183.result @@ -0,0 +1,22 @@ +CREATE TABLE `t` ( +`col_1` varchar(255) NOT NULL DEFAULT '', +`col_2` varchar(255) NOT NULL, +`col_3` int(11) NOT NULL DEFAULT '0', +`col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; +insert into t values +('foobar','qux',0,0),('abcdef','qux',0,0); +Compressing test/t.MAD: (2 records) +- Calculating statistics + +normal: 0 empty-space: 0 empty-zero: 0 empty-fill: 0 +pre-space: 0 end-space: 0 intervall-fields: 0 zero: 2 +Original trees: 4 After join: 1 +- Compressing file +Min record length: 5 Max length: 5 Mean total length: 35 +99.57% +SELECT * FROM t; +col_1 col_2 col_3 col_4 +foobar qux 0 0 +abcdef qux 0 0 +DROP TABLE t; diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.test b/mysql-test/suite/maria/aria_pack_mdev14183.test new file mode 100644 index 00000000000..5386ae774a0 --- /dev/null +++ b/mysql-test/suite/maria/aria_pack_mdev14183.test @@ -0,0 +1,23 @@ +--source include/have_aria.inc +--source include/have_debug.inc +--source include/not_embedded.inc + +CREATE TABLE `t` ( + `col_1` varchar(255) NOT NULL DEFAULT '', + `col_2` varchar(255) NOT NULL, + `col_3` int(11) NOT NULL DEFAULT '0', + `col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; + +insert into t values + ('foobar','qux',0,0),('abcdef','qux',0,0); + +--let $datadir= `SELECT @@datadir` +--source include/shutdown_mysqld.inc +# maria_pack crashes by assert() if the bug is not fixed +--exec cd $datadir && $MARIA_PACK -t test/t + +--source include/start_mysqld.inc +SELECT * FROM t; + +DROP TABLE t; diff --git a/mysql-test/suite/rpl/include/rpl_corruption.inc b/mysql-test/suite/rpl/include/rpl_corruption.inc index 88f683ed53d..4106bb45eef 100644 --- a/mysql-test/suite/rpl/include/rpl_corruption.inc +++ b/mysql-test/suite/rpl/include/rpl_corruption.inc @@ -131,12 +131,13 @@ let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_R --source include/wait_for_slave_io_error.inc --connection master SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # Emulate corruption in network --echo # 5. Slave. Corruption in network --connection slave +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE @@ -153,7 +154,7 @@ let $slave_sql_errno= 1593; --source include/wait_for_slave_sql_error.inc SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # Start normal replication and compare same table on master # and slave @@ -172,6 +173,5 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; --sync_slave_with_master -set @@global.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_parallel.inc b/mysql-test/suite/rpl/include/rpl_parallel.inc index 42354343084..b88d2126d4d 100644 --- a/mysql-test/suite/rpl/include/rpl_parallel.inc +++ b/mysql-test/suite/rpl/include/rpl_parallel.inc @@ -1951,7 +1951,6 @@ SELECT * FROM t2 WHERE a >= 1040 ORDER BY a; --source include/stop_slave.inc SET GLOBAL debug_dbug=@old_dbug; - --echo *** MDEV-6676 - test disabling domain-based parallel replication *** --connection server_1 # Let's do a bunch of transactions that will conflict if run out-of-order in @@ -2000,7 +1999,7 @@ SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; # so sleep is ok here. And it's in general not possible to trigger reliably # the race with debug_sync, since the bugfix makes the race impossible). -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10000, two event groups. @@ -2012,7 +2011,7 @@ INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; --source include/save_master_gtid.inc @@ -2044,7 +2043,7 @@ SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; # We inject a small sleep in the corresponding record_gtid() to make the race # easier to hit. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10010, two event groups. @@ -2059,8 +2058,7 @@ INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; - +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; --source include/save_master_gtid.inc @@ -2097,7 +2095,7 @@ SET GLOBAL debug_dbug= '+d,inject_mdev8031'; # complete. Finally an extra KILL check catches an unhandled, lingering # deadlock kill. So rather artificial, but at least it exercises the # relevant code paths. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; @@ -2119,7 +2117,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2144,7 +2142,7 @@ SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; --connection server_1 -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; --let $large= `SELECT REPEAT("*", 8192)` @@ -2167,7 +2165,7 @@ eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */; eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; --enable_query_log -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2178,7 +2176,7 @@ SELECT * FROM t3 WHERE a>=200 ORDER BY a; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; --source include/start_slave.inc diff --git a/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc b/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc index 25da12f30a3..7a6a758a508 100644 --- a/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc +++ b/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc @@ -47,7 +47,7 @@ --source include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test index 43c561c5b85..5c88c14d9b5 100644 --- a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test +++ b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test @@ -13,6 +13,7 @@ create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; sync_slave_with_master; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; @@ -135,8 +136,7 @@ eval SELECT "$error" AS Last_SQL_Error, @check as `true`; select max(a) as two from tm; select max(a) as one from ti; -set @@global.debug_dbug="-d"; - +SET @@GLOBAL.debug_dbug = @saved_dbug; # # clean-up # diff --git a/mysql-test/suite/rpl/r/circular_serverid0.result b/mysql-test/suite/rpl/r/circular_serverid0.result index 112f9359ac4..928a0a48888 100644 --- a/mysql-test/suite/rpl/r/circular_serverid0.result +++ b/mysql-test/suite/rpl/r/circular_serverid0.result @@ -1,9 +1,9 @@ include/rpl_init.inc [topology=1->2->1] include/rpl_connect.inc [creating M4] include/rpl_connect.inc [creating M2] -SET @old_debug= @@global.debug; connection M2; STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; include/wait_for_slave_io_to_start.inc diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result index db72bb304fc..f32b7c58ad1 100644 --- a/mysql-test/suite/rpl/r/rpl_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_corruption.result @@ -34,10 +34,11 @@ START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] @@ -47,7 +48,7 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -60,5 +61,4 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result index a2b1d03c4fd..b8415977154 100644 --- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result +++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result @@ -26,6 +26,7 @@ CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos; include/start_slave.inc DO_DOMAIN_IDS (AFTER) : IGNORE_DOMAIN_IDS (AFTER) : +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; START TRANSACTION; @@ -414,4 +415,5 @@ connection slave; include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); include/start_slave.inc +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result index 457947cabe0..0a414cb3b1f 100644 --- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result +++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result @@ -37,7 +37,6 @@ IGNORE_DOMAIN_IDS (AFTER) : 1 connection master; include/rpl_start_server.inc [server_number=1] # Master has restarted successfully -set @@global.debug_dbug="-d"; connection slave; include/stop_slave.inc include/start_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result index d5037f8cf94..4f50d7c6d85 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result @@ -27,7 +27,7 @@ a connection server_1; include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; connection server_2; diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index b96153a226a..d384422f88a 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -2,10 +2,10 @@ include/master-slave.inc [connection master] connection master; set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; connection slave; include/stop_slave.inc # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; include/start_slave.inc connection master; @@ -50,7 +50,7 @@ slave-relay-bin.000005 # Annotate_rows # # INSERT INTO t1 /* A comment just to m slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) slave-relay-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000005 # Query # # COMMIT -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; # Test dummy event is checksummed correctly. connection master; set @@global.binlog_checksum = CRC32; @@ -148,10 +148,10 @@ select @@global.log_slave_updates; select @@global.replicate_annotate_row_events; @@global.replicate_annotate_row_events 1 -set @@global.debug_dbug= @old_slave_dbug; Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; connection slave; +set @@global.debug_dbug= @old_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index d994e4fdef6..657b3ba7448 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -1512,7 +1512,7 @@ SET GLOBAL slave_parallel_threads=10; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1521,7 +1521,7 @@ test.t2 analyze status OK INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1543,7 +1543,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1553,7 +1553,7 @@ SET SESSION server_id= @old_server_id; INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1579,7 +1579,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1600,7 +1600,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1630,11 +1630,11 @@ SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill'; SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1654,7 +1654,7 @@ a b 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff --git a/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result b/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result index 570d2534ed7..3dd5a3ea83c 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result @@ -4,7 +4,7 @@ connection server_2; include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index ca202a66b0e..74d9cf55cd4 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -352,7 +352,7 @@ include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; ALTER TABLE t2 COMMENT "123abc"; diff --git a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result index f08f50f2467..b670a16bfcd 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result +++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result @@ -6,6 +6,7 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; begin; @@ -74,7 +75,7 @@ two select max(a) as one from ti; one 1 -set @@global.debug_dbug="-d"; +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_reset.inc connection master; drop table tm, ti; diff --git a/mysql-test/suite/rpl/t/circular_serverid0.test b/mysql-test/suite/rpl/t/circular_serverid0.test index 20ad58e2c52..097a2932404 100644 --- a/mysql-test/suite/rpl/t/circular_serverid0.test +++ b/mysql-test/suite/rpl/t/circular_serverid0.test @@ -22,10 +22,9 @@ # The parameter reflects binlog-row-event-max-size @cnf. --let $row_size=1024 -SET @old_debug= @@global.debug; - --connection M2 STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; --source include/wait_for_slave_io_to_start.inc diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test index 9088866d28b..f3ba39fb330 100644 --- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test +++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test @@ -35,6 +35,7 @@ let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignor --echo DO_DOMAIN_IDS (AFTER) : $do_domain_ids_after --echo IGNORE_DOMAIN_IDS (AFTER) : $ignore_domain_ids_after +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; @@ -379,5 +380,5 @@ connection slave; --source include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); --source include/start_slave.inc - +SET @@GLOBAL.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test index 3619ede2c01..6dafab192a0 100644 --- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test +++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test @@ -64,7 +64,6 @@ connection master; #--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --echo # Master has restarted successfully -set @@global.debug_dbug="-d"; save_master_pos; --connection slave diff --git a/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test b/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test index 22cf10afba3..bc28ebddf5e 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test @@ -42,7 +42,7 @@ SELECT * FROM t1 ORDER BY a; # interfere with our DBUG error injection. --source include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; --save_master_pos diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index ed26e61d9b6..046a65f77db 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -5,9 +5,7 @@ --source include/master-slave.inc connection master; - set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; # MDEV-4475: Cannot replicate to old server when binlog contains # empty Gtid_list event @@ -16,6 +14,7 @@ set @old_slave_dbug= @@global.debug_dbug; connection slave; --source include/stop_slave.inc --echo # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; --source include/start_slave.inc @@ -52,7 +51,7 @@ let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); let $binlog_start= $relaylog_start; let $binlog_limit=0,10; --source include/show_relaylog_events.inc -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; --echo # Test dummy event is checksummed correctly. @@ -150,11 +149,10 @@ let $binlog_limit=0,5; select @@global.log_slave_updates; select @@global.replicate_annotate_row_events; -set @@global.debug_dbug= @old_slave_dbug; - --echo Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; sync_slave_with_master; +set @@global.debug_dbug= @old_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index e08472d5f51..0b10dd3cda7 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -325,7 +325,7 @@ INSERT INTO t2 VALUES (1,1), (2,1), (3,1), (4,1), (5,1); --connection server_2 --source include/sync_with_master_gtid.inc --source include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; --connection server_1 diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test index 305c5b4b530..619b57994c2 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test +++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test @@ -3,10 +3,10 @@ # For details look into extra/rpl_tests/rpl_lower_case_table_names.test # +-- source include/have_binlog_format_mixed_or_statement.inc -- source include/master-slave.inc -- source include/have_innodb.inc -- source include/not_windows.inc --- source include/have_binlog_format_mixed_or_statement.inc -- let $engine=InnoDB -- source include/rpl_lower_case_table_names.test diff --git a/mysql-test/suite/sys_vars/r/debug_dbug_func.result b/mysql-test/suite/sys_vars/r/debug_dbug_func.result index 64b9c1a759b..d0c002cf111 100644 --- a/mysql-test/suite/sys_vars/r/debug_dbug_func.result +++ b/mysql-test/suite/sys_vars/r/debug_dbug_func.result @@ -1,55 +1,55 @@ -SET @old_debug = @@GLOBAL.debug; +SET @old_debug = @@GLOBAL.debug_dbug; SET debug_dbug= 'T'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug T SET debug_dbug= '+P'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug P:T SET debug_dbug= '-P'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug T -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug T SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug # # Bug #52629: memory leak from sys_var_thd_dbug in # binlog.binlog_write_error # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug d,injecting_fault_writing SET GLOBAL debug_dbug=''; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug SET GLOBAL debug_dbug=@old_debug; # # Bug #56709: Memory leaks at running the 5.1 test suite # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug d,foo SET @@debug_dbug=''; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug SET @@debug_dbug= @old_local_debug; End of 5.1 tests # # Bug#46165 server crash in dbug # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; # Test 1 - Bug test case, single connection SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.1.trace'; SET SESSION debug_dbug= '-d:-t:-i'; diff --git a/mysql-test/suite/sys_vars/t/debug_dbug_func.test b/mysql-test/suite/sys_vars/t/debug_dbug_func.test index 136a4c5504d..a72636131ee 100644 --- a/mysql-test/suite/sys_vars/t/debug_dbug_func.test +++ b/mysql-test/suite/sys_vars/t/debug_dbug_func.test @@ -1,27 +1,27 @@ --source include/have_debug.inc -SET @old_debug = @@GLOBAL.debug; +SET @old_debug = @@GLOBAL.debug_dbug; # -# Bug#34678 @@debug variable's incremental mode +# Bug#34678 @@debug_dbug variable's incremental mode # SET debug_dbug= 'T'; -select @@debug; +select @@debug_dbug; SET debug_dbug= '+P'; -select @@debug; +select @@debug_dbug; SET debug_dbug= '-P'; -select @@debug; +select @@debug_dbug; # -# Bug#38054: "SET SESSION debug" modifies @@global.debug variable +# Bug#38054: "SET SESSION debug" modifies @@global.debug_dbug variable # -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; --echo # --echo # Bug #52629: memory leak from sys_var_thd_dbug in @@ -29,9 +29,9 @@ SELECT @@session.debug, @@global.debug; --echo # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=''; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=@old_debug; @@ -39,12 +39,12 @@ SET GLOBAL debug_dbug=@old_debug; --echo # Bug #56709: Memory leaks at running the 5.1 test suite --echo # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug=''; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug= @old_local_debug; @@ -55,8 +55,8 @@ SET @@debug_dbug= @old_local_debug; --echo # Bug#46165 server crash in dbug --echo # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; --echo # Test 1 - Bug test case, single connection --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt index 606fef002e7..0efb0b07feb 100644 --- a/plugin/auth_pam/CMakeLists.txt +++ b/plugin/auth_pam/CMakeLists.txt @@ -10,5 +10,15 @@ IF(HAVE_PAM_APPL_H) ENDIF(HAVE_STRNDUP) FIND_LIBRARY(PAM_LIBRARY pam) MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY) + + IF(TARGET auth_pam) + ADD_LIBRARY(pam_user_map MODULE mapper/pam_user_map.c) + TARGET_LINK_LIBRARIES(pam_user_map pam) + SET_TARGET_PROPERTIES (pam_user_map PROPERTIES PREFIX "") + IF(INSTALL_PAMDIR) + INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server) + INSTALL(FILES mapper/user_map.conf DESTINATION /etc/security COMPONENT Server) + ENDIF() + ENDIF() ENDIF(HAVE_PAM_APPL_H) diff --git a/plugin/auth_pam/mapper/user_map.conf b/plugin/auth_pam/mapper/user_map.conf new file mode 100644 index 00000000000..4af8fb0fe10 --- /dev/null +++ b/plugin/auth_pam/mapper/user_map.conf @@ -0,0 +1,13 @@ +# +# Configuration file for pam_user_map.so +# +# defines mapping in the form +# +# orig_user_name: mapped_user_name +# +# or (to map all users in a specific group) +# +# @group_name: mapped_user_name +# +# comments and empty lines are ignored +# diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 8d1a36561d3..799276258f2 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -385,8 +385,8 @@ read_cnf() get_stream() { - if [[ $sfmt == 'xbstream' ]];then - wsrep_log_info "Streaming with xbstream" + if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then + wsrep_log_info "Streaming with ${sfmt}" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then strmcmd="${XBSTREAM_BIN} -x" else diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 6ab644c579b..8b39092e09a 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -901,6 +901,10 @@ class Item_func_from_unixtime :public Item_datetimefunc const char *func_name() const { return "from_unixtime"; } bool fix_length_and_dec(); bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date); + bool check_vcol_func_processor(void *arg) + { + return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); + } Item *get_copy(THD *thd) { return get_item_copy<Item_func_from_unixtime>(thd, this); } }; diff --git a/sql/log_event.cc b/sql/log_event.cc index d4bf6a2963a..838a084de42 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7091,7 +7091,7 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, { DBUG_ENTER("Load_log_event::copy_log_event"); uint data_len; - if ((int) event_len < body_offset) + if ((int) event_len <= body_offset) DBUG_RETURN(1); char* buf_end = (char*)buf + event_len; /* this is the beginning of the post-header */ @@ -10886,6 +10886,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, uint8 const post_header_len= description_event->post_header_len[event_type-1]; + if (event_len < (uint)(common_header_len + post_header_len)) + { + m_cols.bitmap= 0; + DBUG_VOID_RETURN; + } + DBUG_PRINT("enter",("event_len: %u common_header_len: %d " "post_header_len: %d", event_len, common_header_len, @@ -12610,6 +12616,7 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len, const char *post_start= buf + common_header_len; post_start+= TM_MAPID_OFFSET; + VALIDATE_BYTES_READ(post_start, buf, event_len); if (post_header_len == 6) { /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */ diff --git a/sql/log_event.h b/sql/log_event.h index 3e838aff58c..73809953d70 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2223,7 +2223,15 @@ public: ****************************************************************************/ struct sql_ex_info { - sql_ex_info() {} /* Remove gcc warning */ + sql_ex_info(): + cached_new_format(-1), + field_term_len(0), + enclosed_len(0), + line_term_len(0), + line_start_len(0), + escaped_len(0), + empty_flags(0) + {} /* Remove gcc warning */ const char* field_term; const char* enclosed; const char* line_term; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 5368a54bb2e..fe949298a76 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -637,7 +637,6 @@ int wsrep_init() { // enable normal operation in case no provider is specified wsrep_ready_set(TRUE); - wsrep_inited= 1; global_system_variables.wsrep_on = 0; wsrep_init_args args; args.logger_cb = wsrep_log_cb; @@ -648,10 +647,15 @@ int wsrep_init() { DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); + wsrep_ready_set(FALSE); wsrep->free(wsrep); free(wsrep); wsrep = NULL; } + else + { + wsrep_inited= 1; + } return rcode; } else diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index 0a53cdb9837..14e80b6331e 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -2,7 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, 2019, MariaDB Corporation. +Copyright (c) 2014, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -3338,7 +3338,19 @@ page_zip_validate_low( FIL_PAGE_LSN - FIL_PAGE_PREV) || memcmp(page_zip->data + FIL_PAGE_TYPE, page + FIL_PAGE_TYPE, 2) || memcmp(page_zip->data + FIL_PAGE_DATA, page + FIL_PAGE_DATA, - PAGE_DATA - FIL_PAGE_DATA)) { + PAGE_ROOT_AUTO_INC) + /* The PAGE_ROOT_AUTO_INC can be updated while holding an SX-latch + on the clustered index root page (page number 3 in .ibd files). + That allows concurrent readers (holding buf_block_t::lock S-latch). + Because we do not know what type of a latch our caller is holding, + we will ignore the field on clustered index root pages in order + to avoid false positives. */ + || (page_get_page_no(page) != 3/* clustered index root page */ + && memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC], + &page[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC], 8)) + || memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END], + &page[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END], + PAGE_DATA - FIL_PAGE_DATA - PAGE_HEADER_PRIV_END)) { page_zip_fail(("page_zip_validate: page header\n")); page_zip_hexdump(page_zip, sizeof *page_zip); page_zip_hexdump(page_zip->data, page_zip_get_size(page_zip)); diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c index 9ae982a6bd7..3e9d002ea43 100644 --- a/storage/maria/maria_pack.c +++ b/storage/maria/maria_pack.c @@ -782,27 +782,29 @@ static HUFF_COUNTS *init_huff_count(MARIA_HA *info,my_off_t records) for (i=0 ; i < info->s->base.fields ; i++) { enum en_fieldtype type; - count[i].field_length=info->s->columndef[i].length; - type= count[i].field_type= (enum en_fieldtype) info->s->columndef[i].type; + uint col_nr = info->s->columndef[i].column_nr; + count[col_nr].field_length=info->s->columndef[i].length; + type= count[col_nr].field_type= + (enum en_fieldtype) info->s->columndef[i].type; if (type == FIELD_INTERVALL || type == FIELD_CONSTANT || type == FIELD_ZERO) type = FIELD_NORMAL; - if (count[i].field_length <= 8 && + if (count[col_nr].field_length <= 8 && (type == FIELD_NORMAL || type == FIELD_SKIP_ZERO)) - count[i].max_zero_fill= count[i].field_length; + count[col_nr].max_zero_fill= count[col_nr].field_length; /* For every column initialize a tree, which is used to detect distinct column values. 'int_tree' works together with 'tree_buff' and 'tree_pos'. It's keys are implemented by pointers into 'tree_buff'. This is accomplished by '-1' as the element size. */ - init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL, + init_tree(&count[col_nr].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL, NULL, MYF(0)); if (records && type != FIELD_BLOB && type != FIELD_VARCHAR) - count[i].tree_pos=count[i].tree_buff = - my_malloc(count[i].field_length > 1 ? tree_buff_length : 2, + count[col_nr].tree_pos=count[col_nr].tree_buff = + my_malloc(count[col_nr].field_length > 1 ? tree_buff_length : 2, MYF(MY_WME)); } } diff --git a/storage/tokudb/PerconaFT/DartConfig.cmake b/storage/tokudb/PerconaFT/DartConfig.cmake deleted file mode 100644 index 9ad189869c6..00000000000 --- a/storage/tokudb/PerconaFT/DartConfig.cmake +++ /dev/null @@ -1,10 +0,0 @@ -if(BUILD_TESTING) - if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) - # Valgrind on OSX 10.8 generally works but outputs some warning junk - # that is hard to parse out, so we'll just let it run alone - set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind") - endif () - set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump,*/tdb-recover --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind") - set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind") - set(UPDATE_COMMAND "svn") -endif() diff --git a/storage/tokudb/PerconaFT/scripts/tokuvalgrind b/storage/tokudb/PerconaFT/scripts/tokuvalgrind deleted file mode 120000 index 74517aa2975..00000000000 --- a/storage/tokudb/PerconaFT/scripts/tokuvalgrind +++ /dev/null @@ -1 +0,0 @@ -tokugrind
\ No newline at end of file |