1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Oleksandr Byelkin
2024-01-30 08:17:58 +01:00
185 changed files with 6011 additions and 1647 deletions

View File

@@ -9,6 +9,7 @@ sql_error_log_rotate OFF
sql_error_log_rotations 9
sql_error_log_size_limit 1000000
sql_error_log_warnings ON
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

View File

@@ -0,0 +1,41 @@
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_warnings ON
sql_error_log_with_db_and_thread_info ON
set global sql_error_log_rate=1;
# Trying to set the variable at runtime
SET sql_error_log_with_db_and_thread_info=OFF;
ERROR HY000: Variable 'sql_error_log_with_db_and_thread_info' is a read only variable
#
# Using test database from mtr
#
DROP DATABASE db;
ERROR HY000: Can't drop database 'db'; database doesn't exist
#
# Using no database at all
#
connect con1,localhost,root,,*NO-ONE*;
DROP DATABASE dbnodb;
ERROR HY000: Can't drop database 'dbnodb'; database doesn't exist
disconnect con1;
connection default;
#
# Using database with name `NULL`
#
CREATE DATABASE `NULL`;
USE `NULL`;
DROP DATABASE db;
ERROR HY000: Can't drop database 'db'; database doesn't exist
TIME THREAD_ID HOSTNAME `mtr` WARNING 1286: Unknown storage engine 'InnoDB' : SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql
TIME THREAD_ID HOSTNAME `mtr` WARNING 1286: Unknown storage engine 'InnoDB' : SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql
TIME THREAD_ID HOSTNAME `mtr` WARNING 1286: Unknown storage engine 'InnoDB' : SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql
TIME THREAD_ID HOSTNAME `test` ERROR 1238: Variable 'sql_error_log_with_db_and_thread_info' is a read only variable : SET sql_error_log_with_db_and_thread_info=OFF
TIME THREAD_ID HOSTNAME `test` ERROR 1008: Can't drop database 'db'; database doesn't exist : DROP DATABASE db
TIME THREAD_ID HOSTNAME NULL ERROR 1008: Can't drop database 'dbnodb'; database doesn't exist : DROP DATABASE dbnodb
TIME THREAD_ID HOSTNAME `NULL` ERROR 1008: Can't drop database 'db'; database doesn't exist : DROP DATABASE db
DROP DATABASE `NULL`;

View File

@@ -0,0 +1 @@
--plugin-load-add=$SQL_ERRLOG_SO --sql-error-log-with-db-and-thread-info=1 --lower_case_table_names=2

View File

@@ -0,0 +1,49 @@
--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 #
connect (con1,localhost,root,,*NO-ONE*);
--error ER_DB_DROP_EXISTS
DROP DATABASE dbnodb;
disconnect con1;
connection default;
--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=7
--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]* .* @ .* `mtr` /TIME THREAD_ID HOSTNAME `mtr` //[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`;