Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.2
-
None
Description
check_mysql50_prefix() compares the prefix case-sensitively and the new check runs in the parser, before the name is lowercased. With lower_case_table_names=1 a name written as #MYSQL50#... passes the check and is then treated as a legacy name. Tables and databases are both affected.
--lower-case-table-names=1
|
let $D= `select @@datadir`; |
create table `t-1` (a int) engine=myisam; |
flush tables;
|
--move_file $D/test/t@002d1.frm $D/test/t-1.frm
|
--move_file $D/test/t@002d1.MYD $D/test/t-1.MYD
|
--move_file $D/test/t@002d1.MYI $D/test/t-1.MYI
|
--mkdir $D/d-b
|
select @@old_mode; |
--error ER_WRONG_TABLE_NAME
|
select * from `#mysql50#t-1`; |
--echo # BUG if the statements below succeed
|
select * from `#MYSQL50#t-1`; |
insert `#MYSQL50#t-1` values (1); |
use `#MYSQL50#d-b`; |
select database(); |
create table `#MYSQL50#d-b`.t1 (a int); |
alter database `#MYSQL50#d-b` upgrade data directory name; |
show databases like 'd-b'; |
drop database `d-b`; |
set old_mode=MYSQL50_TABLE_NAMES; |
drop table test.`#mysql50#t-1`; |
13.2.0-MariaDB-asan-debug-log source revision: bd4d5680ca4e7d8fd3b953e9f9d342599ac5c07c
|
 |
select * from `#MYSQL50#t-1`;
|
a
|
use `#MYSQL50#d-b`;
|
select database();
|
database()
|
#mysql50#d-b
|
UPDATE, CHECK TABLE, RENAME TABLE, CREATE PROCEDURE and GRANT ... ON #MYSQL50#d-b.* are accepted the same way.
Attachments
Issue Links
- relates to
-
MDEV-40406 hide #mysql50# prefix support behind the old mode
-
- Stalled
-