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

CREATE .. PARTITION .. AS SELECT creates a partition, but non-partitioned table

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5(EOL), 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.6
    • Partitioning
    • None

    Description

      --source include/have_partition.inc
      --source include/have_sequence.inc
       
      create table t (a int) partition by hash (a) as select seq as a from seq_1_to_10;
      show create table t;
       
      select count(*) from information_schema.partitions where table_schema = 'test' and table_name = 't';
      select count(*) from t partition (p0);
       
      drop table t;
      

      10.3 32bab2ce

      show create table t;
      Table	Create Table
      t	CREATE TABLE `t` (
        `a` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
      select count(*) from information_schema.partitions where table_schema = 'test' and table_name = 't';
      count(*)
      1
       
      mysqltest: At line 8: query 'select count(*) from t partition (p0)' failed: 1747: PARTITION () clause on non partitioned table
      

      So, the partition got created, but SHOW CREATE TABLE does not show it, and the table appears to be non-partitioned.
      Reproducible on active versions, including older minor releases; reproducible on 10.2, too.

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.