1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
Files
mariadb/mysql-test/suite/plugins/t/sql_error_log_withdbinfo.test
2024-01-23 21:34:43 +05:30

50 lines
1.2 KiB
Plaintext

--source include/not_embedded.inc
if (!$SQL_ERRLOG_SO) {
skip No SQL_ERROR_LOG plugin;
}
show variables like 'sql_error_log%';
set global sql_error_log_rate=1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo # Trying to set the variable at runtime
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET sql_error_log_with_db_and_thread_info=OFF;
--echo #
--echo # Using test database from mtr
--echo #
--error ER_DB_DROP_EXISTS
DROP DATABASE db;
--echo #
--echo # Using no database at all
--echo #
DROP DATABASE test;
--error ER_DB_DROP_EXISTS
DROP DATABASE db;
--echo #
--echo # Using database with name `NULL`
--echo #
CREATE DATABASE `NULL`;
USE `NULL`;
--error ER_DB_DROP_EXISTS
DROP DATABASE db;
--let SEARCH_FILE= $MYSQLD_DATADIR/sql_errors.log
--let LINES_TO_READ=4
--replace_regex /[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9]* .* @ .* `test` /TIME THREAD_ID HOSTNAME `test` //[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9]* .* @ .* NULL /TIME THREAD_ID HOSTNAME NULL //[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9]* .* @ .* `NULL` /TIME THREAD_ID HOSTNAME `NULL` /
--source include/read_head.inc
DROP DATABASE `NULL`;
--echo # Reset
CREATE DATABASE test;