mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -9,9 +9,10 @@ SET @old_slow_query_log_file= @@global.slow_query_log_file;
|
|||||||
SET @@global.general_log = ON;
|
SET @@global.general_log = ON;
|
||||||
SET @@global.general_log_file = 'bug45387_general.log';
|
SET @@global.general_log_file = 'bug45387_general.log';
|
||||||
SET SESSION debug='+d,reset_log_last_time';
|
SET SESSION debug='+d,reset_log_last_time';
|
||||||
|
FLUSH LOGS;
|
||||||
SET @@global.general_log = @old_general_log;
|
SET @@global.general_log = @old_general_log;
|
||||||
SET @@global.general_log_file = @old_general_log_file;
|
SET @@global.general_log_file = @old_general_log_file;
|
||||||
SET SESSION debug='';
|
SET SESSION debug='-d,reset_log_last_time';
|
||||||
Bug#45387: ID match.
|
Bug#45387: ID match.
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
#
|
#
|
||||||
|
@ -32,11 +32,12 @@ SET @@global.general_log_file = 'bug45387_general.log';
|
|||||||
SET SESSION debug='+d,reset_log_last_time';
|
SET SESSION debug='+d,reset_log_last_time';
|
||||||
|
|
||||||
let CONN_ID= `SELECT CONNECTION_ID()`;
|
let CONN_ID= `SELECT CONNECTION_ID()`;
|
||||||
|
FLUSH LOGS;
|
||||||
|
|
||||||
# reset log settings
|
# reset log settings
|
||||||
SET @@global.general_log = @old_general_log;
|
SET @@global.general_log = @old_general_log;
|
||||||
SET @@global.general_log_file = @old_general_log_file;
|
SET @@global.general_log_file = @old_general_log_file;
|
||||||
SET SESSION debug='';
|
SET SESSION debug='-d,reset_log_last_time';
|
||||||
|
|
||||||
perl;
|
perl;
|
||||||
# get the relevant info from the surrounding perl invocation
|
# get the relevant info from the surrounding perl invocation
|
||||||
@ -52,14 +53,20 @@ perl;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(FILE);
|
|
||||||
|
|
||||||
# print the result
|
# print the result
|
||||||
if ($found == $conn_id) {
|
if ($found == $conn_id) {
|
||||||
print "Bug#45387: ID match.\n";
|
print "Bug#45387: ID match.\n";
|
||||||
} else {
|
} else {
|
||||||
print "Bug#45387: Expected ID '$conn_id', found '$found' in log file.\n";
|
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
|
EOF
|
||||||
|
|
||||||
--remove_file $MYSQLD_DATADIR/bug45387_general.log
|
--remove_file $MYSQLD_DATADIR/bug45387_general.log
|
||||||
|
Reference in New Issue
Block a user