[MDEV-29051] [ERROR] Invalid (old?) table or database name ... Created: 2022-07-07  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Data Definition - Temporary
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Minor
Reporter: Roel Van de Paar Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: upstream-5.5, upstream-5.6, upstream-5.7, upstream-fixed, upstream-not-8.0


 Description   

This issue is "fixed" in MySQL 8.0 but not in any MariaDB version or older MySQL version.

CREATE TABLE `#mysql50#c@d`(a INT) ENGINE=InnoDB;
SELECT * FROM information_schema.statistics;

Leads to:

10.10.0 63961a08a6203f4d58363a9321e4cf9c8b07a9fe (Debug)

2022-07-07 10:57:19 4 [ERROR] Invalid (old?) table or database name 'c@d'

Bug confirmed present in:
MariaDB: 10.3.36 (dbg), 10.3.36 (opt), 10.4.26 (dbg), 10.4.26 (opt), 10.5.17 (dbg), 10.5.17 (opt), 10.6.9 (dbg), 10.6.9 (opt), 10.7.5 (dbg), 10.7.5 (opt), 10.8.4 (dbg), 10.8.4 (opt), 10.9.2 (dbg), 10.9.2 (opt), 10.10.0 (dbg), 10.10.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt)

Bug confirmed not present in:
MySQL: 8.0.29 (dbg), 8.0.29 (opt)



 Comments   
Comment by Roel Van de Paar [ 2023-09-27 ]

11.3.0 905c3d61e18ae6222d0d195c43d335046eec65d9 (Debug)

2023-09-28  7:24:41 4 [ERROR] Invalid (old?) table or database name 'c@d'

Please note the error shows in the error log only, not the client.

Comment by Alexander Barkov [ 2023-09-28 ]

The server intentionally writes this message to the log to make the DBA aware that there are still some tables from MySQL-5.0 times with not encoded names (which haven't been fixed by mysql_upgrade properly)

MySQL 8.0 implemented this task:

WL#8186: Deprecate conversion of pre MySQL 5.1 encoded database names

This explains the difference in behavior.

serg, do you think we should also disallow old names, like MySQL did?

Comment by Sergei Golubchik [ 2023-09-28 ]

Roel, what is the bug here?

Comment by Roel Van de Paar [ 2023-10-05 ]

Both queries complete with OK in the CLI (and no warnings nor errors), yet the error log shows an ERROR.

Comment by Sergei Golubchik [ 2023-10-08 ]

bar, I could agree that an "ERROR" in the log looks strange, should we change it to a warning?

Generated at Thu Feb 08 10:05:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.