Commit 56f04e0d authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9014 SHOW TRIGGERS not case sensitive

use table_alias_charset for comparing table names, not files_charset_info
parent d775ecdd
......@@ -63,3 +63,8 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1;
RENAME TABLE t1 TO T1;
ALTER TABLE T1 RENAME t1;
DROP TABLE t1;
create table t1 (a int);
create trigger t1_bi before insert on t1 for each row set new.a= 1;
show triggers like '%T1%';
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
drop table t1;
......@@ -102,3 +102,11 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1;
RENAME TABLE t1 TO T1;
ALTER TABLE T1 RENAME t1;
DROP TABLE t1;
#
# MDEV-9014 SHOW TRIGGERS not case sensitive
#
create table t1 (a int);
create trigger t1_bi before insert on t1 for each row set new.a= 1;
show triggers like '%T1%';
drop table t1;
......@@ -5116,7 +5116,7 @@ bool Discovered_table_list::add_table(const char *tname, size_t tlen)
custom discover_table_names() method, that calls add_table() directly).
Note: avoid comparing the same name twice (here and in add_file).
*/
if (wild && my_wildcmp(files_charset_info, tname, tname + tlen, wild, wend,
if (wild && my_wildcmp(table_alias_charset, tname, tname + tlen, wild, wend,
wild_prefix, wild_one, wild_many))
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment