Bug #94465 CREATE TABLE blocks with "SQL Error (3507): Failed to update columns dictionary"
Submitted: 25 Feb 2019 15:22 Modified: 28 Feb 2019 14:44
Reporter: Gregor Steifel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.0.15 OS:Windows (Windows 7 Professional 64 Bit)
Assigned to: CPU Architecture:x86 (64 Bit)
Tags: columns dictionary, CREATE TABLE, Error 3507

[25 Feb 2019 15:22] Gregor Steifel
Description:
I try to import a nightly SQL-dump from another database. The dump will be imported into 4 different databases (MariaDB 10.2, 10.3, 10.4 and MySQL 8.0) for testings. MariaDB is working fine (and I think an older Version of MySQL 8 is working fine too. As I recall it could be Version 8.0.12 that is working but 8.0.13 and 8.0.15 not but I'm not sure!)

I can reduce the problem to this strange one:

CREATE TABLE `n1481_34` (`id` INT, `text` CHAR);
/* SQL Error (3507): Failed to update columns dictionary object */

If I change something in the names, it is working fine! For example these lines are all working fine!

DROP TABLE IF EXISTS `n1481__34`;CREATE TABLE `n1481__34` (`id` INT, `text` CHAR);
DROP TABLE IF EXISTS `n148134`;  CREATE TABLE `n148134` (`id` INT, `text` CHAR);
DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`id` INT);
DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`text` CHAR);
DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`id` INT, `text1` CHAR);

but NOT this one

DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`id` INT, `text` CHAR);
/* SQL Error (3507): Failed to update columns dictionary object */

This drives me cracy...

How to repeat:
DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`id` INT, `text` CHAR);

Results in: SQL Error (3507): Failed to update columns dictionary object

Suggested fix:
Check the naming? It my have to do with a combination of characters in the table/column names?
[25 Feb 2019 15:46] MySQL Verification Team
Thank you for the bug report. I couldn't repeat the issue reported:

C:\dbs>8.0\bin\mysql -uroot -p
Enter password: **********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 8.0.15 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> USE test
Database changed
mysql> DROP TABLE IF EXISTS `n1481_34`; CREATE TABLE `n1481_34` (`id` INT, `text` CHAR);
Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.04 sec)

mysql> SHOW CREATE TABLE `n1481_34`;
+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table    | Create Table                                                                                                                                            |
+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| n1481_34 | CREATE TABLE `n1481_34` (
  `id` int(11) DEFAULT NULL,
  `text` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>
[28 Feb 2019 14:44] Gregor Steifel
Hi Miguel,

after a lot of testing with no luck to resolve the problem I finally decided to remove everything and start from the beginning: Deinstall MySQL, remove all directories, fresh install of MySQl 8.0.15, copy the my.ini from the old system and reload all the database dumps from before.

And now it's working fine! I have no idea whats going on with the old system...

Best wishes,
Gergor
[6 May 2022 13:46] Callum Atwal
Seeing this issue in 8.0.29. Installing 8.0.27 fixes it so not sure if a bug exists in the latest
[5 Sep 2022 17:34] Flávio Alexandre Alves
Seeing this issue in 8.0.30