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

MariaDB client puts unnecessary backticks in show create table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.2.14
    • Fix Version/s: N/A
    • Component/s: Scripts & Clients
    • Labels:
      None

      Description

      Starting with 10.2 (not sure which minor version) the mysql client is wrapping partition names and columns in partition functions inside backticks.

      This is not standard behaviour for the client and breaks partitioning scripts.

      10.1 output:

      MariaDB [test]> show create table actor\G
      *************************** 1. row ***************************
             Table: actor
      Create Table: CREATE TABLE `actor` (
        `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
        `first_name` varchar(45) NOT NULL,
        `last_name` varchar(45) NOT NULL,
        `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        PRIMARY KEY (`actor_id`,`last_update`),
        KEY `idx_actor_last_name` (`last_name`),
        KEY `last_update` (`last_update`)
      ) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8
      /*!50100 PARTITION BY RANGE (unix_timestamp(last_update))
      (PARTITION p0 VALUES LESS THAN (1522900800) ENGINE = InnoDB,
       PARTITION p1 VALUES LESS THAN (1522987200) ENGINE = InnoDB,
       PARTITION p2 VALUES LESS THAN (1523073600) ENGINE = InnoDB,
       PARTITION p3 VALUES LESS THAN (1523160000) ENGINE = InnoDB,
       PARTITION p4 VALUES LESS THAN (1523246400) ENGINE = InnoDB,
       PARTITION p5 VALUES LESS THAN (1523332800) ENGINE = InnoDB,
       PARTITION p6 VALUES LESS THAN (1523419200) ENGINE = InnoDB,
       PARTITION p7 VALUES LESS THAN (1523505600) ENGINE = InnoDB,
       PARTITION p8 VALUES LESS THAN (1523592000) ENGINE = InnoDB,
       PARTITION p9 VALUES LESS THAN (1523678400) ENGINE = InnoDB,
       PARTITION p10 VALUES LESS THAN (1523764800) ENGINE = InnoDB,
       PARTITION p11 VALUES LESS THAN (1523851200) ENGINE = InnoDB,
       PARTITION p12 VALUES LESS THAN (1523937600) ENGINE = InnoDB,
       PARTITION p13 VALUES LESS THAN (1524024000) ENGINE = InnoDB,
       PARTITION p14 VALUES LESS THAN (1524110400) ENGINE = InnoDB,
       PARTITION p15 VALUES LESS THAN (1524196800) ENGINE = InnoDB,
       PARTITION p16 VALUES LESS THAN (1524283200) ENGINE = InnoDB,
       PARTITION p17 VALUES LESS THAN (1524369600) ENGINE = InnoDB) */
      1 row in set (0.00 sec)
      

      10.2 output:

      MariaDB [test]> show create table actor\G
      *************************** 1. row ***************************
             Table: actor
      Create Table: CREATE TABLE `actor` (
        `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
        `first_name` varchar(45) NOT NULL,
        `last_name` varchar(45) NOT NULL,
        `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
        PRIMARY KEY (`actor_id`,`last_update`),
        KEY `idx_actor_last_name` (`last_name`),
        KEY `last_update` (`last_update`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8
       PARTITION BY RANGE (unix_timestamp(`last_update`))
      (PARTITION `p0` VALUES LESS THAN (1522900800) ENGINE = InnoDB,
       PARTITION `p1` VALUES LESS THAN (1522987200) ENGINE = InnoDB,
       PARTITION `p2` VALUES LESS THAN (1523073600) ENGINE = InnoDB,
       PARTITION `p3` VALUES LESS THAN (1523160000) ENGINE = InnoDB,
       PARTITION `p4` VALUES LESS THAN (1523246400) ENGINE = InnoDB,
       PARTITION `p5` VALUES LESS THAN (1523332800) ENGINE = InnoDB,
       PARTITION `p6` VALUES LESS THAN (1523419200) ENGINE = InnoDB,
       PARTITION `p7` VALUES LESS THAN (1523505600) ENGINE = InnoDB,
       PARTITION `p8` VALUES LESS THAN (1523592000) ENGINE = InnoDB,
       PARTITION `p9` VALUES LESS THAN (1523678400) ENGINE = InnoDB,
       PARTITION `p10` VALUES LESS THAN (1523764800) ENGINE = InnoDB,
       PARTITION `p11` VALUES LESS THAN (1523851200) ENGINE = InnoDB,
       PARTITION `p12` VALUES LESS THAN (1523937600) ENGINE = InnoDB,
       PARTITION `p13` VALUES LESS THAN (1524024000) ENGINE = InnoDB,
       PARTITION `p14` VALUES LESS THAN (1524110400) ENGINE = InnoDB,
       PARTITION `p15` VALUES LESS THAN (1524196800) ENGINE = InnoDB,
       PARTITION `p16` VALUES LESS THAN (1524283200) ENGINE = InnoDB,
       PARTITION `p17` VALUES LESS THAN (1524369600) ENGINE = InnoDB)*/
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              rpizzi Rick Pizzi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: