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

CREATE TABLE t1 (<defs>) SELECT... does not preserve new COMMENT

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3, 10.4
    • Fix Version/s: 10.4
    • Component/s: Data types
    • Labels:

      Description

      DROP TABLE IF EXISTS t1,t2;
      CREATE TABLE t1 (a INT COMMENT 'test1');
      CREATE TABLE t2 (a INT COMMENT 'test2') AS SELECT * FROM t1;
      SHOW CREATE TABLE t1;
      SHOW CREATE TABLE t2;
      

      +-------+-------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                          |
      +-------+-------------------------------------------------------------------------------------------------------+
      | t2    | CREATE TABLE `t2` (
        `a` int(11) DEFAULT NULL COMMENT 'test1'
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+-------------------------------------------------------------------------------------------------------+
      

      The comment for t2.a looks wrong. It should be 'test2'.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: