diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result index fdebf23ce8f..72cd3e08931 100644 --- a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result +++ b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3; diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test index 29d821d1fc1..03c9c93ff06 100644 --- a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test +++ b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test @@ -5,8 +5,6 @@ --source include/have_innodb_32k.inc --source include/have_file_key_management_plugin.inc -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; --error ER_CANT_CREATE_TABLE diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result index 1fd5cd9b521..4fcb6ab19ef 100644 --- a/mysql-test/suite/innodb/r/innodb-32k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, @@ -117,9 +116,9 @@ UPDATE t2 SET qa=@l,ra=@l,sa=@l,ta=@l,ua=@l; UPDATE t2 SET va=@l,wa=@l,xa=@l,ya=@l,za=@l; COMMIT; INSERT INTO t1 SELECT * from t2; -SET DEBUG_DBUG='+d,crash_commit_before'; +BEGIN; UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e; -ERROR HY000: Lost connection to MySQL server during query +# Kill and restart UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, v=@f,w=@f,x=@b,y=@f,z=@f, diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result index 7e2941b8e3b..bfeec58bda9 100644 --- a/mysql-test/suite/innodb/r/innodb-64k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, @@ -259,7 +258,7 @@ UPDATE t2 SET kc=@i,lc=@i,mc=@i,nc=@i,oc=@i,pc=@i; UPDATE t2 SET qc=@i,rc=@i,sc=@i,tc=@i,uc=@i; UPDATE t2 SET vc=@i,wc=@i,xc=@i,yc=@i,zc=@i; COMMIT; -SET DEBUG_DBUG='+d,crash_commit_before'; +BEGIN; UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c, v=@c,w=@c,x=@c,y=@c,z=@c, @@ -272,7 +271,7 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c, ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c, kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; -ERROR HY000: Lost connection to MySQL server during query +# Kill and restart UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, v=@e,w=@e,x=@e,y=@e,z=@e, diff --git a/mysql-test/suite/innodb/r/innodb_bug59307.result b/mysql-test/suite/innodb/r/innodb_bug59307.result new file mode 100644 index 00000000000..e247393b970 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_bug59307.result @@ -0,0 +1,28 @@ +CREATE TABLE t1 ( +t1_int INT, +t1_time TIME +) ENGINE=innodb; +CREATE TABLE t2 ( +t2_int int PRIMARY KEY, +t2_int2 INT +) ENGINE=INNODB; +INSERT IGNORE INTO t2 VALUES (); +Warnings: +Warning 1364 Field 't2_int' doesn't have a default value +INSERT INTO t1 VALUES (); +SELECT * +FROM t1 AS t1a +WHERE NOT EXISTS +(SELECT * +FROM t1 AS t1b +WHERE t1b.t1_int NOT IN +(SELECT t2.t2_int +FROM t2 +WHERE t1b.t1_time LIKE t1b.t1_int +OR t1b.t1_time <> t2.t2_int2 +AND 6=7 +) +) +; +t1_int t1_time +DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test index b9d96fd92c8..42d2b5adc9f 100644 --- a/mysql-test/suite/innodb/t/innodb-32k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test @@ -1,14 +1,7 @@ --source include/have_innodb.inc --source include/have_innodb_32k.inc ---source include/have_debug.inc -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing +# Embedded server does not support restarting --source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); let $MYSQLD_DATADIR= `select @@datadir`; @@ -148,15 +141,9 @@ COMMIT; INSERT INTO t1 SELECT * from t2; -SET DEBUG_DBUG='+d,crash_commit_before'; ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---error 2013 +BEGIN; UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e; - -# Write file to make mysql-test-run.pl restart the server ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/kill_and_restart_mysqld.inc UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test index b61396bf22c..39fbf974efe 100644 --- a/mysql-test/suite/innodb/t/innodb-64k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test @@ -1,14 +1,7 @@ --source include/have_innodb.inc --source include/have_innodb_64k.inc ---source include/have_debug.inc -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing +# Embedded server does not support restarting --source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); let $MYSQLD_DATADIR= `select @@datadir`; @@ -293,9 +286,7 @@ UPDATE t2 SET vc=@i,wc=@i,xc=@i,yc=@i,zc=@i; COMMIT; -SET DEBUG_DBUG='+d,crash_commit_before'; ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---error 2013 +BEGIN; UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c, v=@c,w=@c,x=@c,y=@c,z=@c, @@ -308,11 +299,7 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c, kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; - -# Write file to make mysql-test-run.pl restart the server ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/kill_and_restart_mysqld.inc UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test index 2cacefc6595..5fb0d63ebe7 100644 --- a/mysql-test/suite/innodb/t/innodb_bug12400341.test +++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test @@ -1,13 +1,9 @@ # Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND +-- source include/have_debug.inc -- source include/have_innodb.inc -- source include/have_innodb_16k.inc -if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`) -{ - --skip Test requires InnoDB built with UNIV_DEBUG definition. -} - # Don't test under valgrind, undo slots of the previous test might exist still # and cause unstable result. --source include/not_valgrind.inc diff --git a/mysql-test/suite/innodb/t/innodb_bug14676111.test b/mysql-test/suite/innodb/t/innodb_bug14676111.test index 02ef5e5e7f0..68054d7654f 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14676111.test +++ b/mysql-test/suite/innodb/t/innodb_bug14676111.test @@ -3,11 +3,6 @@ -- source include/have_innodb.inc -- source include/have_debug.inc -if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG'`) -{ - --skip Test requires InnoDB built with UNIV_DEBUG definition. -} - --disable_query_log set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug; set @old_innodb_undo_logs = @@innodb_undo_logs; diff --git a/mysql-test/suite/innodb/t/innodb_bug53046.test b/mysql-test/suite/innodb/t/innodb_bug53046.test index dddff8a235f..a202c0c52c7 100644 --- a/mysql-test/suite/innodb/t/innodb_bug53046.test +++ b/mysql-test/suite/innodb/t/innodb_bug53046.test @@ -5,7 +5,7 @@ # # This is a symbolic test, it would not fail if the bug is present. # Rather those SQL commands have been used during manual testing under -# UNIV_DEBUG & UNIV_SYNC_DEBUG to test all changed codepaths for locking +# innodb_sync_debug to test all changed codepaths for locking # correctness. # diff --git a/mysql-test/suite/innodb/t/innodb_bug59307.test b/mysql-test/suite/innodb/t/innodb_bug59307.test new file mode 100644 index 00000000000..c89050b9c55 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug59307.test @@ -0,0 +1,32 @@ +-- source include/have_innodb.inc +# Bug #59307 uninitialized value in rw_lock_set_writer_id_and_recursion_flag() +# when Valgrind instrumentation (HAVE_VALGRIND) is not enabled + +CREATE TABLE t1 ( + t1_int INT, + t1_time TIME +) ENGINE=innodb; + +CREATE TABLE t2 ( + t2_int int PRIMARY KEY, + t2_int2 INT +) ENGINE=INNODB; + +INSERT IGNORE INTO t2 VALUES (); +INSERT INTO t1 VALUES (); + +SELECT * +FROM t1 AS t1a +WHERE NOT EXISTS + (SELECT * + FROM t1 AS t1b + WHERE t1b.t1_int NOT IN + (SELECT t2.t2_int + FROM t2 + WHERE t1b.t1_time LIKE t1b.t1_int + OR t1b.t1_time <> t2.t2_int2 + AND 6=7 + ) +) +; +DROP TABLE t1,t2; diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index ef8c2177b2c..50b2ccc0fcc 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -629,14 +629,6 @@ rescan: processed = 0; } -#ifdef DBUG_OFF - if (flush) { - DBUG_EXECUTE_IF("ib_export_flush_crash", - static ulint n_pages; - if (++n_pages == 4) {DBUG_SUICIDE();}); - } -#endif /* DBUG_OFF */ - /* The check for trx is interrupted is expensive, we want to check every N iterations. */ if (!processed && trx && trx_is_interrupted(trx)) { diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index edb018c46e2..35f36155bcd 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -187,6 +187,13 @@ command. */ #if defined HAVE_valgrind && defined HAVE_VALGRIND # define UNIV_DEBUG_VALGRIND #endif /* HAVE_VALGRIND */ + +#ifdef DBUG_OFF +# undef UNIV_DEBUG +#elif !defined UNIV_DEBUG +# define UNIV_DEBUG +#endif + #if 0 #define UNIV_DEBUG_VALGRIND /* Enable extra Valgrind instrumentation */ @@ -198,8 +205,6 @@ command. */ debugging without UNIV_DEBUG */ #define UNIV_BLOB_LIGHT_DEBUG /* Enable off-page column debugging without UNIV_DEBUG */ -#define UNIV_DEBUG /* Enable ut_ad() assertions - and disable UNIV_INLINE */ #define UNIV_DEBUG_LOCK_VALIDATE /* Enable ut_ad(lock_rec_validate_page()) assertions. */ diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h index 7d212dfcff4..5a373c57c0c 100644 --- a/storage/innobase/include/ut0dbg.h +++ b/storage/innobase/include/ut0dbg.h @@ -60,14 +60,12 @@ ut_dbg_assertion_failed( #define ut_error \ ut_dbg_assertion_failed(0, __FILE__, __LINE__) +/** Debug assertion */ +#define ut_ad(EXPR) DBUG_ASSERT(EXPR) #ifdef UNIV_DEBUG -/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */ -#define ut_ad(EXPR) ut_a(EXPR) /** Debug statement. Does nothing unless UNIV_DEBUG is defined. */ #define ut_d(EXPR) EXPR #else -/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */ -#define ut_ad(EXPR) /** Debug statement. Does nothing unless UNIV_DEBUG is defined. */ #define ut_d(EXPR) #endif