2008-02-26 16:03:59 +01:00
|
|
|
--source include/have_debug.inc
|
|
|
|
|
2010-05-20 08:31:03 +02:00
|
|
|
SET @old_debug = @@GLOBAL.debug;
|
|
|
|
|
2008-02-26 16:03:59 +01:00
|
|
|
#
|
|
|
|
# Bug#34678 @@debug variable's incremental mode
|
|
|
|
#
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
set debug_dbug= 'T';
|
2008-02-26 16:03:59 +01:00
|
|
|
select @@debug;
|
2011-12-15 22:07:58 +01:00
|
|
|
set debug_dbug= '+P';
|
2008-02-26 16:03:59 +01:00
|
|
|
select @@debug;
|
2011-12-15 22:07:58 +01:00
|
|
|
set debug_dbug= '-P';
|
2008-02-26 16:03:59 +01:00
|
|
|
select @@debug;
|
2010-04-16 09:30:53 +02:00
|
|
|
|
2010-05-19 14:31:18 +02:00
|
|
|
#
|
|
|
|
# Bug#38054: "SET SESSION debug" modifies @@global.debug variable
|
|
|
|
#
|
|
|
|
|
|
|
|
SELECT @@session.debug, @@global.debug;
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '';
|
2010-05-19 14:31:18 +02:00
|
|
|
|
|
|
|
SELECT @@session.debug, @@global.debug;
|
2010-05-20 14:35:28 +02:00
|
|
|
|
2010-04-16 09:30:53 +02:00
|
|
|
--echo #
|
|
|
|
--echo # Bug #52629: memory leak from sys_var_thd_dbug in
|
|
|
|
--echo # binlog.binlog_write_error
|
|
|
|
--echo #
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
2010-04-16 09:30:53 +02:00
|
|
|
SELECT @@global.debug;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug='';
|
2010-04-16 09:30:53 +02:00
|
|
|
SELECT @@global.debug;
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug=@old_debug;
|
2010-04-16 09:30:53 +02:00
|
|
|
|
2010-09-22 21:33:18 +02:00
|
|
|
--echo #
|
|
|
|
--echo # Bug #56709: Memory leaks at running the 5.1 test suite
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
SET @old_local_debug = @@debug;
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET @@debug_dbug='d,foo';
|
2010-09-22 21:33:18 +02:00
|
|
|
SELECT @@debug;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET @@debug_dbug='';
|
2010-09-22 21:33:18 +02:00
|
|
|
SELECT @@debug;
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET @@debug_dbug= @old_local_debug;
|
2010-09-22 21:33:18 +02:00
|
|
|
|
2010-04-16 09:30:53 +02:00
|
|
|
--echo End of 5.1 tests
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Bug#46165 server crash in dbug
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
SET @old_globaldebug = @@global.debug;
|
|
|
|
SET @old_sessiondebug= @@session.debug;
|
|
|
|
|
|
|
|
--echo # Test 1 - Bug test case, single connection
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.1.trace';
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '-d:-t:-i';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug= '';
|
|
|
|
SET SESSION debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Test 2 - Bug test case, two connections
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.2.trace';
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '-d:-t:-i';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Connection con1
|
|
|
|
connect (con1, localhost, root);
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
--echo # Connection con1
|
|
|
|
connection con1;
|
|
|
|
disconnect con1;
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Test 3 - Active session trace file on disconnect
|
|
|
|
--echo # Connection con1
|
|
|
|
connect (con1, localhost, root);
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.3.trace';
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
SELECT @@global.debug_dbug, @@session.debug_dbug;
|
|
|
|
SET SESSION debug_dbug= '+T';
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
SELECT @@global.debug_dbug, @@session.debug_dbug;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug= '';
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
SELECT @@global.debug_dbug, @@session.debug_dbug;
|
2010-09-29 10:07:56 +02:00
|
|
|
disconnect con1;
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
|
|
|
|
--echo # Test 4 - Active session trace file on two connections
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.4.trace';
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '-d:-t:-i';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Connection con1
|
|
|
|
connect (con1, localhost, root);
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '-d:-t:-i';
|
|
|
|
SET GLOBAL debug_dbug= '';
|
|
|
|
SET SESSION debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '';
|
2010-09-29 10:07:56 +02:00
|
|
|
--echo # Connection con1
|
|
|
|
connection con1;
|
|
|
|
disconnect con1;
|
|
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
--echo # Connection default
|
|
|
|
connection default;
|
|
|
|
|
|
|
|
--echo # Test 5 - Different trace files
|
2012-03-23 20:49:47 +01:00
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET SESSION debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.5.trace';
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
|
|
eval SET SESSION debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.6.trace';
|
2011-12-15 22:07:58 +01:00
|
|
|
SET SESSION debug_dbug= '-O';
|
2010-09-29 10:07:56 +02:00
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug= @old_globaldebug;
|
|
|
|
SET SESSION debug_dbug= @old_sessiondebug;
|