diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-03-15 13:58:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 13:58:14 +0200 |
commit | c7c52ef1e84435f14c2c2bb19804335573a1517e (patch) | |
tree | 5b07b5a1f72495e1e3e9c03283ddac10ddce4d48 /mysql-test | |
parent | f1de725fda1a7a6298ca8f33ca6909f815e61987 (diff) | |
parent | de3725a7db291342c1a132439da4d588b799c416 (diff) | |
download | mariadb-git-c7c52ef1e84435f14c2c2bb19804335573a1517e.tar.gz |
Merge branch '10.1' into MDEV-14144
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_date_add.result | 51 | ||||
-rw-r--r-- | mysql-test/r/func_time.result | 24 | ||||
-rw-r--r-- | mysql-test/r/subselect_mat.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/galera/disabled.def | 9 | ||||
-rw-r--r-- | mysql-test/suite/galera/r/MW-336.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/galera/r/galera_bf_abort_for_update.result | 23 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/MW-286.test | 1 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/MW-336.test | 19 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_bf_abort_for_update.test | 45 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result | 23 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test | 62 | ||||
-rw-r--r-- | mysql-test/t/func_date_add.test | 37 | ||||
-rw-r--r-- | mysql-test/t/func_time.test | 16 | ||||
-rw-r--r-- | mysql-test/t/subselect_mat.test | 13 |
14 files changed, 305 insertions, 42 deletions
diff --git a/mysql-test/r/func_date_add.result b/mysql-test/r/func_date_add.result index e8fbba786a4..0258267b5ec 100644 --- a/mysql-test/r/func_date_add.result +++ b/mysql-test/r/func_date_add.result @@ -102,3 +102,54 @@ select * from t1 where case a when adddate( '2012-12-12', 7 ) then true end; a drop table t1; End of 5.5 tests +# +# Start of 10.1 tests +# +# +# MDEV-14452 Precision in INTERVAL xxx DAY_MICROSECOND parsed wrong? +# +SELECT +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5' DAY_MICROSECOND) c1, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50' DAY_MICROSECOND) c2, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500' DAY_MICROSECOND) c3, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000' DAY_MICROSECOND) c4, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000' DAY_MICROSECOND) c5, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000' DAY_MICROSECOND) c6, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000' DAY_MICROSECOND) c7, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000' DAY_MICROSECOND) c8, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000' DAY_MICROSECOND) c9, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000' DAY_MICROSECOND) c10, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000' DAY_MICROSECOND) c11, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000' DAY_MICROSECOND) c12, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000' DAY_MICROSECOND) c13, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000' DAY_MICROSECOND) c14, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000' DAY_MICROSECOND) c15, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000' DAY_MICROSECOND) c16, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000' DAY_MICROSECOND) c17, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000000' DAY_MICROSECOND) c18, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000000' DAY_MICROSECOND) c19, +DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000000' DAY_MICROSECOND) c20 +; +c1 1000-01-01 00:00:01.500000 +c2 1000-01-01 00:00:01.500000 +c3 1000-01-01 00:00:01.500000 +c4 1000-01-01 00:00:01.500000 +c5 1000-01-01 00:00:01.500000 +c6 1000-01-01 00:00:01.500000 +c7 1000-01-01 00:00:01.500000 +c8 1000-01-01 00:00:01.500000 +c9 1000-01-01 00:00:01.500000 +c10 1000-01-01 00:00:01.500000 +c11 1000-01-01 00:00:01.500000 +c12 1000-01-01 00:00:01.500000 +c13 1000-01-01 00:00:01.500000 +c14 1000-01-01 00:00:01.500000 +c15 1000-01-01 00:00:01.500000 +c16 1000-01-01 00:00:01.500000 +c17 1000-01-01 00:00:01.500000 +c18 1000-01-01 00:00:01.500000 +c19 1000-01-01 00:00:01.500000 +c20 NULL +# +# End of 10.1 tests +# diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 371dffdd3ae..2180ec2b83c 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2904,6 +2904,30 @@ NULL Warnings: Warning 1441 Datetime function: datetime field overflow # +# MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime +# +CREATE TABLE t1 (i INT, d DATE); +INSERT INTO t1 VALUES (1, '1970-01-01'); +SELECT MAX(NULLIF(i,1)) FROM t1 ORDER BY DATE_SUB(d,INTERVAL 17300000 HOUR); +MAX(NULLIF(i,1)) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +DROP TABLE t1; +CREATE TABLE t1 (i INT, d DATE); +INSERT INTO t1 VALUES (1, '1970-01-01'); +SELECT CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) FROM t1; +CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +DROP TABLE t1; +SELECT CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR)); +CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR)) +NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow +# # End of 10.0 tests # # diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 934aca92f9f..924317dbcd1 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2757,6 +2757,21 @@ a b sq 4 2 1 drop table t1, t2; # +# MDEV-15235: Assertion `length > 0' failed in create_ref_for_key +# +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f CHAR(1)); +INSERT INTO t2 VALUES ('a'),('b'); +explain +SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 +SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 ); +f +DROP TABLE t1, t2; +# # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on # UNION ALL # diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index d77e91446fc..545c6cd703a 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -9,11 +9,9 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -MW-336 : MDEV-13549 Galera test failures galera_gra_log : MDEV-13549 Galera test failures galera_flush_local : MDEV-13549 Galera test failures galera_flush : MDEV-13549 Galera test failures -MW-329 : MDEV-13549 Galera test failures galera_account_management : MariaDB 10.0 does not support ALTER USER galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events @@ -34,7 +32,6 @@ galera_ist_mysqldump : MDEV-13549 Galera test failures mysql-wsrep#31 : MDEV-13549 Galera test failures galera_migrate : MariaDB 10.0 does not support START SLAVE USER galera_concurrent_ctas : MDEV-13549 Galera test failures -galera_bf_abort_for_update : MDEV-13549 Galera test failures galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures galera_ssl_upgrade : MDEV-13549 Galera test failures mysql-wsrep#33 : MDEV-13549 Galera test failures @@ -47,16 +44,10 @@ lp1376747 : MDEV-13549 Galera test failures galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures galera_parallel_simple : MDEV-13549 Galera test failures galera_admin : MDEV-13549 Galera test failures -galera_var_max_ws_rows : MDEV-13549 Galera test failures 10.1 -MW-286 : MDEV-13549 Galera test failures 10.1 galera_as_master: MDEV-13549 Galera test failures 10.1 galera_pc_ignore_sb : MDEV-13549 Galera test failures 10.1 galera_lock_table : MDEV-13549 Galera test failures 10.1 MW-284 : MDEV-13549 Galera test failures 10.1 -MW-328C : MDEV-13549 Galera test failures 10.1 -MW-328A : MDEV-13549 Galera test failures 10.1 -MW-328B : MDEV-13549 Galera test failures 10.1 -MW-328 : MDEV-13549 Galera test failures 10.1 galera_suspend_slave : MDEV-13549 Galera test failures 10.1 galera_gtid : MDEV-13549 Galera test failures 10.1 galera_gtid_slave : MDEV-13549 Galera test failures 10.1 diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result index 9bdb61c1a9c..34874198c6f 100644 --- a/mysql-test/suite/galera/r/MW-336.result +++ b/mysql-test/suite/galera/r/MW-336.result @@ -3,13 +3,7 @@ SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 1; INSERT INTO t1 VALUES (1); SET GLOBAL wsrep_slave_threads = 10; -SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = 11 -1 SET GLOBAL wsrep_slave_threads = 20; -SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = 21 -1 SET GLOBAL wsrep_slave_threads = 1; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); @@ -35,8 +29,5 @@ INSERT INTO t1 VALUES (17); INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); INSERT INTO t1 VALUES (20); -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = 2 -1 SET GLOBAL wsrep_slave_threads = 1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result index 3978a3df193..2367924466c 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result @@ -1,10 +1,21 @@ -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (1); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, 10); +BEGIN; SELECT * FROM t1 FOR UPDATE; +f1 f2 +1 10 +UPDATE t1 SET f1 = 2; +COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -wsrep_local_aborts_increment +wsrep_local_bf_aborts_diff +1 +BEGIN; +SELECT * FROM t1 FOR UPDATE; +f1 f2 +2 10 +UPDATE t1 SET f2 = 20; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +wsrep_local_bf_aborts_diff 1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test index 08deb317fbe..1b2e322f078 100644 --- a/mysql-test/suite/galera/t/MW-286.test +++ b/mysql-test/suite/galera/t/MW-286.test @@ -25,7 +25,6 @@ SET wsrep_on = FALSE; --error ER_QUERY_INTERRUPTED ALTER TABLE t1 ADD PRIMARY KEY (f1); -SET SESSION wsrep_sync_wait = 0; SET wsrep_on = TRUE; SET GLOBAL wsrep_desync = FALSE; diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test index 79d8951a822..9572489ebe9 100644 --- a/mysql-test/suite/galera/t/MW-336.test +++ b/mysql-test/suite/galera/t/MW-336.test @@ -10,20 +10,20 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; --connection node_1 SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 1; +--let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--source include/wait_condition.inc --connection node_2 INSERT INTO t1 VALUES (1); --connection node_1 ---sleep 0.5 SET GLOBAL wsrep_slave_threads = 10; ---sleep 0.5 -SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--source include/wait_condition.inc SET GLOBAL wsrep_slave_threads = 20; ---sleep 0.5 -SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; - +--let $wait_condition = SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--source include/wait_condition.inc SET GLOBAL wsrep_slave_threads = 1; @@ -40,6 +40,9 @@ INSERT INTO t1 VALUES (9); --connection node_1 +--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--source include/wait_condition.inc + SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 0; @@ -57,8 +60,8 @@ INSERT INTO t1 VALUES (19); INSERT INTO t1 VALUES (20); --connection node_1 ---sleep 0.5 -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +--source include/wait_condition.inc SET GLOBAL wsrep_slave_threads = 1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test index 24c29778e5d..13e48f8f3ce 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test @@ -5,25 +5,52 @@ # Test a local transaction being aborted by a slave one while it is running a SELECT FOR UPDATE # -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB; ---connection node_2 ---let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1, 10); + +# Test updating the PK --connection node_1 -INSERT INTO t1 VALUES (1); +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +BEGIN; +SELECT * FROM t1 FOR UPDATE; --connection node_2 +UPDATE t1 SET f1 = 2; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f1 = 2 +--source include/wait_condition.inc + +--connection node_1 --error ER_LOCK_DEADLOCK +COMMIT; + +--disable_query_log +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' +--enable_query_log + +# Test updating non-indexed column + +--connection node_1 +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +BEGIN; SELECT * FROM t1 FOR UPDATE; ---let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` +--connection node_2 +UPDATE t1 SET f2 = 20; + +--connection node_1a +--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f2 = 20 +--source include/wait_condition.inc + +--connection node_1 +--error ER_LOCK_DEADLOCK +COMMIT; --disable_query_log ---eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment; +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' --enable_query_log DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result b/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result new file mode 100644 index 00000000000..4762ac8dd07 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result @@ -0,0 +1,23 @@ +include/master-slave.inc +[connection master] +call mtr.add_suppression("Timeout waiting for reply of binlog"); +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; +SET @@GLOBAL.rpl_semi_sync_master_timeout=100; +include/stop_slave.inc +SET @@GLOBAL.replicate_events_marked_for_skip=FILTER_ON_MASTER; +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +include/start_slave.inc +CREATE TABLE t1 (a INT) ENGINE=innodb; +SET @@GLOBAL.debug_dbug= "d,dbug_master_binlog_over_2GB"; +SET @@SESSION.skip_replication=1; +INSERT INTO t1 SET a=1; +SET @@SESSION.skip_replication=0; +INSERT INTO t1 SET a=0; +SET @@GLOBAL.debug_dbug=""; +SET @@GLOBAL. rpl_semi_sync_master_timeout = 10000; +SET @@GLOBAL. rpl_semi_sync_master_enabled = 0; +DROP TABLE t1; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 0; +SET @@GLOBAL.replicate_events_marked_for_skip = REPLICATE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test b/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test new file mode 100644 index 00000000000..2f6da18067c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test @@ -0,0 +1,62 @@ +# MDEV-14721 Big transaction events get lost on semisync master when +# replicate_events_marked_for_skip=FILTER_ON_MASTER +# +# When events of a big transaction are binlogged offsetting over 2GB from +# the beginning of the log the semisync master's dump thread +# lost such events. +# The test verifies the fixes' correctness simulating the 2GB offset. + +source include/have_semisync.inc; +source include/not_embedded.inc; +source include/have_innodb.inc; +source include/have_debug.inc; +source include/master-slave.inc; + +--connection master +# Suppress warnings that might be generated during the test +call mtr.add_suppression("Timeout waiting for reply of binlog"); + +--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled ` +--let $sav_timeout_master=`SELECT @@GLOBAL.rpl_semi_sync_master_timeout ` +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; +SET @@GLOBAL.rpl_semi_sync_master_timeout=100; + +--connection slave +source include/stop_slave.inc; +--let $sav_skip_marked_slave=`SELECT @@GLOBAL.replicate_events_marked_for_skip ` +SET @@GLOBAL.replicate_events_marked_for_skip=FILTER_ON_MASTER; +--let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled ` +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; + +source include/start_slave.inc; + +--connection master +CREATE TABLE t1 (a INT) ENGINE=innodb; + +# Make the following events as if they offset over 2GB from the beginning of binlog +SET @@GLOBAL.debug_dbug= "d,dbug_master_binlog_over_2GB"; +SET @@SESSION.skip_replication=1; +INSERT INTO t1 SET a=1; +SET @@SESSION.skip_replication=0; +INSERT INTO t1 SET a=0; + +--sync_slave_with_master + +# +# Clean up +# +--connection master +SET @@GLOBAL.debug_dbug=""; +--eval SET @@GLOBAL. rpl_semi_sync_master_timeout = $sav_timeout_master +--eval SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master + +--connection master +DROP TABLE t1; + +--sync_slave_with_master +source include/stop_slave.inc; +--eval SET @@GLOBAL. rpl_semi_sync_slave_enabled = $sav_enabled_slave +--eval SET @@GLOBAL.replicate_events_marked_for_skip = $sav_skip_marked_slave + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/t/func_date_add.test b/mysql-test/t/func_date_add.test index 5f27978347c..e7e2b96f0eb 100644 --- a/mysql-test/t/func_date_add.test +++ b/mysql-test/t/func_date_add.test @@ -100,3 +100,40 @@ drop table t1; --echo End of 5.5 tests +--echo # +--echo # Start of 10.1 tests +--echo # + +--echo # +--echo # MDEV-14452 Precision in INTERVAL xxx DAY_MICROSECOND parsed wrong? +--echo # + +--vertical_results +SELECT + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5' DAY_MICROSECOND) c1, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50' DAY_MICROSECOND) c2, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500' DAY_MICROSECOND) c3, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000' DAY_MICROSECOND) c4, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000' DAY_MICROSECOND) c5, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000' DAY_MICROSECOND) c6, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000' DAY_MICROSECOND) c7, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000' DAY_MICROSECOND) c8, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000' DAY_MICROSECOND) c9, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000' DAY_MICROSECOND) c10, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000' DAY_MICROSECOND) c11, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000' DAY_MICROSECOND) c12, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000' DAY_MICROSECOND) c13, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000' DAY_MICROSECOND) c14, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000' DAY_MICROSECOND) c15, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000' DAY_MICROSECOND) c16, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000' DAY_MICROSECOND) c17, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000000' DAY_MICROSECOND) c18, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000000' DAY_MICROSECOND) c19, + DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000000' DAY_MICROSECOND) c20 +; +--horizontal_results + + +--echo # +--echo # End of 10.1 tests +--echo # diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index bc553e6f049..38082213004 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1762,6 +1762,22 @@ SELECT ADDDATE(DATE'0000-01-01', INTERVAL '3652423:0:0:315569433559' DAY_SECOND) SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND); SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND); +--echo # +--echo # MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime +--echo # + +CREATE TABLE t1 (i INT, d DATE); +INSERT INTO t1 VALUES (1, '1970-01-01'); +SELECT MAX(NULLIF(i,1)) FROM t1 ORDER BY DATE_SUB(d,INTERVAL 17300000 HOUR); +DROP TABLE t1; + +CREATE TABLE t1 (i INT, d DATE); +INSERT INTO t1 VALUES (1, '1970-01-01'); +SELECT CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) FROM t1; +DROP TABLE t1; + +SELECT CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR)); + --echo # --echo # End of 10.0 tests diff --git a/mysql-test/t/subselect_mat.test b/mysql-test/t/subselect_mat.test index 9c7c9683d0b..bf5de741ea0 100644 --- a/mysql-test/t/subselect_mat.test +++ b/mysql-test/t/subselect_mat.test @@ -256,6 +256,19 @@ FROM t1; drop table t1, t2; --echo # +--echo # MDEV-15235: Assertion `length > 0' failed in create_ref_for_key +--echo # + +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f CHAR(1)); +INSERT INTO t2 VALUES ('a'),('b'); +explain +SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 ); +SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 ); +DROP TABLE t1, t2; + +--echo # --echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on --echo # UNION ALL --echo # |