summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-06-15 18:03:25 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-06-15 18:03:25 +0200
commit37a5f2d42168d68d8bfb6bdbf4ed90291af49f2a (patch)
tree90495188c78ee51f753b31a84ea5fc46042a4a7c
parent32b63110057a6bf75035dd9356f826eff5c5d294 (diff)
downloadmariadb-git-37a5f2d42168d68d8bfb6bdbf4ed90291af49f2a.tar.gz
Bug #45387 Information about statement id for prepared
statements missed from general log A FLUSH LOGS is added to ensure that the log info hits the file before attempting to process. mysql-test/t/log_tables_debug.test: A FLUSH LOGS is added, and in the event that a match is not found, <FILE> is reset and the contents of the log file is dumped for debugging purposes.
-rw-r--r--mysql-test/r/log_tables_debug.result3
-rw-r--r--mysql-test/t/log_tables_debug.test13
2 files changed, 12 insertions, 4 deletions
diff --git a/mysql-test/r/log_tables_debug.result b/mysql-test/r/log_tables_debug.result
index 7255c0d38a3..16d8eed136f 100644
--- a/mysql-test/r/log_tables_debug.result
+++ b/mysql-test/r/log_tables_debug.result
@@ -9,9 +9,10 @@ SET @old_slow_query_log_file= @@global.slow_query_log_file;
SET @@global.general_log = ON;
SET @@global.general_log_file = 'bug45387_general.log';
SET SESSION debug='+d,reset_log_last_time';
+FLUSH LOGS;
SET @@global.general_log = @old_general_log;
SET @@global.general_log_file = @old_general_log_file;
-SET SESSION debug='';
+SET SESSION debug='-d,reset_log_last_time';
Bug#45387: ID match.
End of 5.1 tests
#
diff --git a/mysql-test/t/log_tables_debug.test b/mysql-test/t/log_tables_debug.test
index 86af7322505..cc0210fe607 100644
--- a/mysql-test/t/log_tables_debug.test
+++ b/mysql-test/t/log_tables_debug.test
@@ -32,11 +32,12 @@ SET @@global.general_log_file = 'bug45387_general.log';
SET SESSION debug='+d,reset_log_last_time';
let CONN_ID= `SELECT CONNECTION_ID()`;
+FLUSH LOGS;
# reset log settings
SET @@global.general_log = @old_general_log;
SET @@global.general_log_file = @old_general_log_file;
-SET SESSION debug='';
+SET SESSION debug='-d,reset_log_last_time';
perl;
# get the relevant info from the surrounding perl invocation
@@ -52,14 +53,20 @@ perl;
break;
}
}
- close(FILE);
# print the result
if ($found == $conn_id) {
print "Bug#45387: ID match.\n";
} else {
print "Bug#45387: Expected ID '$conn_id', found '$found' in log file.\n";
- }
+ print "Contents of log file:\n";
+ seek(FILE, 0, 0);
+ while($line= <FILE>) {
+ print $line;
+ }
+ }
+
+ close(FILE);
EOF
--remove_file $MYSQLD_DATADIR/bug45387_general.log