Commit 619f67b1 authored by Sergei Golubchik's avatar Sergei Golubchik

mdev-200 set session dbug resets the output to stderr.

it makes "./mtr --debug" unusable

revert the mysql fix for bug#46165.
implement shared FILE's with reference counting
parent 92e2b80c
This diff is collapsed.
...@@ -13,7 +13,7 @@ INSERT INTO t1 VALUES ...@@ -13,7 +13,7 @@ INSERT INTO t1 VALUES
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024; set tmp_table_size=1024;
set session debug_dbug="d,raise_error"; set session debug_dbug="+d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b; SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table 'tmp_table' ERROR 23000: Can't write; duplicate key in table 'tmp_table'
set tmp_table_size=default; set tmp_table_size=default;
......
...@@ -51,13 +51,13 @@ End of 5.1 tests ...@@ -51,13 +51,13 @@ End of 5.1 tests
SET @old_globaldebug = @@global.debug; SET @old_globaldebug = @@global.debug;
SET @old_sessiondebug= @@session.debug; SET @old_sessiondebug= @@session.debug;
# Test 1 - Bug test case, single connection # Test 1 - Bug test case, single connection
SET GLOBAL debug_dbug= '+O,../../log/bug46165.1.trace'; SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.1.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
SET SESSION debug_dbug= ''; SET SESSION debug_dbug= '';
# Test 2 - Bug test case, two connections # Test 2 - Bug test case, two connections
# Connection default # Connection default
SET GLOBAL debug_dbug= '+O,../../log/bug46165.2.trace'; SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.2.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
# Connection con1 # Connection con1
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
...@@ -68,12 +68,21 @@ SET SESSION debug_dbug= ''; ...@@ -68,12 +68,21 @@ SET SESSION debug_dbug= '';
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
# Test 3 - Active session trace file on disconnect # Test 3 - Active session trace file on disconnect
# Connection con1 # Connection con1
SET GLOBAL debug_dbug= '+O,../../log/bug46165.3.trace'; SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.3.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SELECT @@global.debug_dbug, @@session.debug_dbug;
@@global.debug_dbug @@session.debug_dbug
O,MYSQL_TMP_DIR/bug46165.3.trace O,MYSQL_TMP_DIR/bug46165.3.trace
SET SESSION debug_dbug= '+T';
SELECT @@global.debug_dbug, @@session.debug_dbug;
@@global.debug_dbug @@session.debug_dbug
O,MYSQL_TMP_DIR/bug46165.3.trace O,MYSQL_TMP_DIR/bug46165.3.trace:T
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
SELECT @@global.debug_dbug, @@session.debug_dbug;
@@global.debug_dbug @@session.debug_dbug
O,MYSQL_TMP_DIR/bug46165.3.trace:T
# Test 4 - Active session trace file on two connections # Test 4 - Active session trace file on two connections
# Connection default # Connection default
SET GLOBAL debug_dbug= '+O,../../log/bug46165.4.trace'; SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.4.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
# Connection con1 # Connection con1
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
...@@ -84,8 +93,8 @@ SET SESSION debug_dbug= ''; ...@@ -84,8 +93,8 @@ SET SESSION debug_dbug= '';
# Connection con1 # Connection con1
# Connection default # Connection default
# Test 5 - Different trace files # Test 5 - Different trace files
SET SESSION debug_dbug= '+O,../../log/bug46165.5.trace'; SET SESSION debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.5.trace';
SET SESSION debug_dbug= '+O,../../log/bug46165.6.trace'; SET SESSION debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.6.trace';
SET SESSION debug_dbug= '-O'; SET SESSION debug_dbug= '-O';
SET GLOBAL debug_dbug= @old_globaldebug; SET GLOBAL debug_dbug= @old_globaldebug;
SET SESSION debug_dbug= @old_sessiondebug; SET SESSION debug_dbug= @old_sessiondebug;
...@@ -59,7 +59,8 @@ SET @old_globaldebug = @@global.debug; ...@@ -59,7 +59,8 @@ SET @old_globaldebug = @@global.debug;
SET @old_sessiondebug= @@session.debug; SET @old_sessiondebug= @@session.debug;
--echo # Test 1 - Bug test case, single connection --echo # Test 1 - Bug test case, single connection
SET GLOBAL debug_dbug= '+O,../../log/bug46165.1.trace'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.1.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
...@@ -68,7 +69,8 @@ SET SESSION debug_dbug= ''; ...@@ -68,7 +69,8 @@ SET SESSION debug_dbug= '';
--echo # Test 2 - Bug test case, two connections --echo # Test 2 - Bug test case, two connections
--echo # Connection default --echo # Connection default
connection default; connection default;
SET GLOBAL debug_dbug= '+O,../../log/bug46165.2.trace'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.2.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
--echo # Connection con1 --echo # Connection con1
...@@ -89,16 +91,24 @@ SET GLOBAL debug_dbug= ''; ...@@ -89,16 +91,24 @@ SET GLOBAL debug_dbug= '';
--echo # Test 3 - Active session trace file on disconnect --echo # Test 3 - Active session trace file on disconnect
--echo # Connection con1 --echo # Connection con1
connect (con1, localhost, root); connect (con1, localhost, root);
SET GLOBAL debug_dbug= '+O,../../log/bug46165.3.trace'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SET SESSION debug_dbug= '-d:-t:-i'; 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;
SET GLOBAL debug_dbug= ''; SET GLOBAL debug_dbug= '';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SELECT @@global.debug_dbug, @@session.debug_dbug;
disconnect con1; disconnect con1;
--source include/wait_until_disconnected.inc --source include/wait_until_disconnected.inc
--echo # Test 4 - Active session trace file on two connections --echo # Test 4 - Active session trace file on two connections
--echo # Connection default --echo # Connection default
connection default; connection default;
SET GLOBAL debug_dbug= '+O,../../log/bug46165.4.trace'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SET GLOBAL debug_dbug= '+O,$MYSQL_TMP_DIR/bug46165.4.trace';
SET SESSION debug_dbug= '-d:-t:-i'; SET SESSION debug_dbug= '-d:-t:-i';
--echo # Connection con1 --echo # Connection con1
...@@ -118,8 +128,10 @@ disconnect con1; ...@@ -118,8 +128,10 @@ disconnect con1;
connection default; connection default;
--echo # Test 5 - Different trace files --echo # Test 5 - Different trace files
SET SESSION debug_dbug= '+O,../../log/bug46165.5.trace'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SET SESSION debug_dbug= '+O,../../log/bug46165.6.trace'; 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';
SET SESSION debug_dbug= '-O'; SET SESSION debug_dbug= '-O';
SET GLOBAL debug_dbug= @old_globaldebug; SET GLOBAL debug_dbug= @old_globaldebug;
......
...@@ -23,7 +23,7 @@ set tmp_table_size=1024; ...@@ -23,7 +23,7 @@ set tmp_table_size=1024;
# Set debug flag so an error is returned when # Set debug flag so an error is returned when
# tmp table in query is converted from heap to myisam # tmp table in query is converted from heap to myisam
set session debug_dbug="d,raise_error"; set session debug_dbug="+d,raise_error";
--replace_regex /in table '[^']+'/in table 'tmp_table'/ --replace_regex /in table '[^']+'/in table 'tmp_table'/
--error ER_DUP_KEY --error ER_DUP_KEY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment