mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-27087: Add thread ID and database / table, where the error occured
to SQL error plugin New plugin variable "with_db_and_thread_info" is added which prints the thread id and databse name to the logfile. the value is stored in variable "with_db_and_thread_info" log_sql_errors() is responsible for printing in the log. If detailed is enabled, print thread id and database name both, otherwise skip it.
This commit is contained in:
12
mysql-test/suite/plugins/r/mdev_27087.result
Normal file
12
mysql-test/suite/plugins/r/mdev_27087.result
Normal file
@@ -0,0 +1,12 @@
|
||||
show variables like 'sql_error_log%';
|
||||
Variable_name Value
|
||||
sql_error_log_filename sql_errors.log
|
||||
sql_error_log_rate 1
|
||||
sql_error_log_rotate OFF
|
||||
sql_error_log_rotations 9
|
||||
sql_error_log_size_limit 1000000
|
||||
sql_error_log_with_db_and_thread_info ON
|
||||
set global sql_error_log_rate=1;
|
||||
select * from t_doesnt_exist;
|
||||
ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
|
||||
THREAD_ID DATABASE_NAME TIME HOSTNAME ERROR 1146: Table 'test.t_doesnt_exist' doesn't exist : select * from t_doesnt_exist
|
@@ -8,6 +8,7 @@ sql_error_log_rate 1
|
||||
sql_error_log_rotate OFF
|
||||
sql_error_log_rotations 9
|
||||
sql_error_log_size_limit 1000000
|
||||
sql_error_log_with_db_and_thread_info OFF
|
||||
set global sql_error_log_rate=1;
|
||||
select * from t_doesnt_exist;
|
||||
ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
|
||||
|
Reference in New Issue
Block a user