1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-32973 SHOW TABLES LIKE shows temporary tables with non-matching names

* compare both db and table name
* use the correct charset
This commit is contained in:
Sergei Golubchik
2024-04-22 22:51:23 +02:00
parent 4a35a3b50d
commit 7fe764b109
6 changed files with 118 additions and 7 deletions

View File

@ -328,3 +328,24 @@ ALTER DATABASE Db1 DEFAULT CHARACTER SET utf8;
SHOW CREATE DATABASE Db1;
SHOW CREATE DATABASE db1;
DROP DATABASE Db1;
USE test;
--echo # End of 10.4 tests
--echo #
--echo # MDEV-32973 SHOW TABLES LIKE shows temporary tables with non-matching names
--echo #
# temp tables don't preserve the letter case despite lower-case-table-names=2
create temporary table t2 (a int);
create temporary table T1 (a int);
show tables;
show tables like 't1';
show tables like 'T1';
select table_name from information_schema.tables where table_schema='test'
and table_name='t1';
select table_name from information_schema.tables where table_schema='test'
and table_name='T1';
show tables like '_1';
show tables like 't%';
--echo # End of 11.2 tests