Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 11.4
-
None
Description
I execute this SQL script with a Linux MariaDB server running with --lower-case-table-names=0:
CREATE OR REPLACE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (1),(2); |
HANDLER t1 OPEN; |
HANDLER t1 READ FIRST; |
CREATE OR REPLACE TABLE T1 (a INT); |
DROP TABLE T1; |
HANDLER t1 READ NEXT; |
ERROR 1109 (42S02): Unknown table 't1' in HANDLER
|
The above looks wrong. This command should return the second record from `t1`.
The problem is in this code fragment in mysql_ha_find_match() in sql_handler.cc:
if ((! tables->db.str[0] || |
! my_strcasecmp(&my_charset_latin1, hash_tables->db.str,
|
tables->get_db_name())) &&
|
! my_strcasecmp(&my_charset_latin1, hash_tables->table_name.str,
|
tables->get_table_name()))
|
It compares table and db names in case insensitive style. Also, it erroneously uses latin1 as a character set.
Attachments
Issue Links
- relates to
-
MDEV-31340 Remove MY_COLLATION_HANDLER::strcasecmp()
- Closed