Bug #107165 Column with names longer than 53 chars cannot be dropped using ALGORITHM=INSTANT
Submitted: 29 Apr 2022 13:20 Modified: 14 Mar 10:03
Reporter: Augusto Passalacqua Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[29 Apr 2022 13:20] Augusto Passalacqua
Description:
If a column is created with a name longer than 53 characters, it cannot be dropped directly using the algorithm INSTANT (default in 8.0.29).

Doing so results in an error:
ERROR 3507 (HY000): Failed to update columns dictionary object.

It is possible to rename the column to a shorter name or force the use of ALGORITHM=INPLACE as workarounds.

How to repeat:
mysql> CREATE TABLE tbl (id int, fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 int);
Query OK, 0 rows affected (0.03 sec)

mysql> ALTER TABLE tbl DROP COLUMN fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210;
ERROR 3507 (HY000): Failed to update columns dictionary object.

mysql> ALTER TABLE tbl DROP COLUMN fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210, ALGORITHM=INPLACE;
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

Alternatively, you can rename it first:

mysql> DROP TABLE tbl;
Query OK, 0 rows affected (0.02 sec)

mysql> CREATE TABLE tbl (id int, fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 int);
Query OK, 0 rows affected (0.03 sec)

mysql> ALTER TABLE tbl DROP COLUMN fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210;
ERROR 3507 (HY000): Failed to update columns dictionary object.
mysql> ALTER TABLE tbl RENAME COLUMN fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 to abc;
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE tbl DROP COLUMN abc;
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0
[29 Apr 2022 13:34] MySQL Verification Team
Hi Mr. Passalacqua,

Thank you for your bug report.

We have easily managed to reproduce this behaviour with several releases of 8.0, including 8.0.29.

It is however, possible that this bug gets fixed only in our Manual, but it still has to be decided.

Verified as reported.
[14 Mar 10:03] Karthik Kamath Koteshwar
This bug report is a duplicate of Bug#107159 and has been fixed in 8.0.32
[14 Mar 11:06] MySQL Verification Team
Thank you , Karthik.