Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23852

alter table rename column to uppercase doesn't work

    XMLWordPrintable

    Details

      Description

      When trying to change a column name (lowercase to uppercase) it has no effect:

      MariaDB 10.5.5:

      MariaDB [test]> create table t1 (columnname int);
      Query OK, 0 rows affected (0.017 sec)
       
      MariaDB [test]> alter table t1 rename column columnname to COLUMNNAME;
      Query OK, 0 rows affected (0.001 sec)
      Records: 0  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> show create table t1\G
      *************************** 1. row ***************************
             Table: t1
      Create Table: CREATE TABLE `t1` (
        `columnname` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      1 row in set (0.001 sec)
      

      MySQL 8.0.21:

      MySQL [test]> create table t1 (columnname int);
      Query OK, 0 rows affected (0.057 sec)
       
      MySQL [test]> alter table t1 rename column columnname to COLUMNNAME;
      Query OK, 0 rows affected (0.026 sec)
      Records: 0  Duplicates: 0  Warnings: 0
       
      MySQL [test]> show create table t1\G
      *************************** 1. row ***************************
             Table: t1
      Create Table: CREATE TABLE `t1` (
        `COLUMNNAME` int DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
      1 row in set (0.001 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              midenok Aleksey Midenkov
              Reporter:
              georg Georg Richter
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration