Bug #115739 Modify column length, and the column name case was changed.
Submitted: 1 Aug 2024 9:10 Modified: 1 Aug 2024 9:12
Reporter: yongguang liao Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: 8.0.15, modify column

[1 Aug 2024 9:10] yongguang liao
Description:
When I executed ALTER TABLE example_table MODIFY request_id VARCHAR(50) NOT NULL;, the column name case was changed. The column name changed from uppercase (REQUEST_ID) to lowercase (request_id).

How to repeat:
1、Use uppercase for defining database column names (REQUEST_ID).
CREATE TABLE example_table (
    ID INT AUTO_INCREMENT PRIMARY KEY,
    REQUEST_ID VARCHAR(20) NOT NULL
);

2、Use lowercase column names (request_id) in the 'ALTER TABLE ... MODIFY' statement.

ALTER TABLE example_table MODIFY request_id VARCHAR(50) NOT NULL;

3、Describe the table structure.
desc example_table;
+-----------------+---------------+------+-----+----------------------+--------------------------------+
| Field           | Type          | Null | Key | Default              | Extra                          |
+-----------------+---------------+------+-----+----------------------+--------------------------------+
| ID              | int(11)       | NO   | PRI | NULL                 | auto_increment                 |
| request_id      | varchar(50)   | YES  |     | NULL                 |                                |
+-----------------+---------------+------+-----+----------------------+--------------------------------+
2 rows in set (0.00 sec)

The column length was modified, and at the same time, the column name changed from uppercase (REQUEST_ID) to lowercase (request_id).

Suggested fix:
I hope the ALTER TABLE ... MODIFY command does not change the column name. Regardless of whether the name following MODIFY is in uppercase or lowercase, the original column name should remain unchanged. Maintain the field name as it is.
[1 Aug 2024 9:12] MySQL Verification Team
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.
[1 Aug 2024 9:12] yongguang liao
sorry  duplicate  close。