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

CREATE TABLE t2 AS SELECT..LIMIT 0 erroneously writes a row into the table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.3
    • Fix Version/s: 5.5.2
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2021-1, 2021-2

      Description

      I run this script with intent to copy the datatype of the column t1.c1 to t2.c2, but without copying the data:

      DROP TABLE IF EXISTS t1,t2;
      CREATE TABLE t1 (c1 INT) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (1),(2);
      CREATE TABLE t2 AS SELECT c1 FROM t1 LIMIT 0;
      SELECT * FROM t2;
      

      +------+
      | c1   |
      +------+
      |    1 |
      +------+
      

      Notice, t2 erroneously has one record, while the statement asked to write 0 rows to the destination table t2.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration