Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4484

"Alter table modify column oldname newname datatype" fails with Error 1815: "Changing the datatype of a column is not supported"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1, 6.1.1
    • Fix Version/s: 23.02
    • Component/s: None
    • Labels:
    • Environment:
      CentOS 7
      MariaDB-server 10.5.8_5-1

      Description

      Happens when the datatype is left intact and the column is only renamed:

      MariaDB [test]> create table testtext2 (
          -> myvalue varchar(100)
          -> )engine=Columnstore CHARSET=utf8;
      Query OK, 0 rows affected (1.838 sec)
       
      MariaDB [test]> show create table testtext2;
      +-----------+------------------------------------------------------------------------------------------------------------+
      | Table     | Create Table                                                                                               |
      +-----------+------------------------------------------------------------------------------------------------------------+
      | testtext2 | CREATE TABLE `testtext2` (
        `myvalue` varchar(100) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=utf8 |
      +-----------+------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> alter table testtext2 change column myvalue myvalue_new varchar(100);
      ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed:  Changing the datatype of a column is not supported
      MariaDB [test]> alter table testtext2 change column myvalue myvalue_new varchar(300);
      Query OK, 0 rows affected (0.372 sec)
      Records: 0  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> show create table testtext2;
      +-----------+----------------------------------------------------------------------------------------------------------------+
      | Table     | Create Table                                                                                                   |
      +-----------+----------------------------------------------------------------------------------------------------------------+
      | testtext2 | CREATE TABLE `testtext2` (
        `myvalue_new` varchar(300) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=utf8 |
      +-----------+----------------------------------------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              David.Hall David Hall
              Reporter:
              juan.vera Juan
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.