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

"INSERT INTO tableName SELECT 42,100" not working correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.0.1
    • 1.0.3
    • DMLProc, ExeMgr
    • None
    • 1.0.3

    Description

      This bug was reported by a MariaDB ColumnStore Google Group user. The issue also occur when "engine=columnstore" is used in the create table statement.

      This issue is NOT in InfiniDB 4.6.0-1.

      SET default_storage_engine=columnstore;

      CREATE TABLE `pipo` ( `id_unique` bigint(12) NOT NULL DEFAULT '999999999999', `top_top_email_valide` decimal(18,0) DEFAULT NULL);

      MariaDB [mcs]> INSERT INTO pipo SELECT 42,100;
      Query OK, 1 row affected (1.56 sec)
      Records: 1 Duplicates: 0 Warnings: 0

      MariaDB [mcs]> SELECT * FROM pipo;
      -------------------------------+

      id_unique top_top_email_valide

      -------------------------------+

      42 NULL

      -------------------------------+
      1 row in set (0.06 sec)

                1. NULL value for the 2nd column is incorrect

      MariaDB [mcs]> INSERT INTO pipo VALUES (111,100);
      Query OK, 1 row affected (0.14 sec)

      MariaDB [mcs]> SELECT * FROM pipo;
      -------------------------------+

      id_unique top_top_email_valide

      -------------------------------+

      42 NULL
      111 100

      -------------------------------+
      2 rows in set (0.01 sec)

      No bug with NOT NULL (also DEFAULT NULL ) :

      MariaDB [mcs]> CREATE TABLE `pipo` ( `id_unique` bigint(12) NOT NULL DEFAULT '999999999999', `top_top_email_valide` decimal(18,0) NOT NULL);
      Query OK, 0 rows affected (0.17 sec)

      MariaDB [mcs]> INSERT INTO pipo SELECT 42,100;
      Query OK, 1 row affected (1.60 sec)
      Records: 1 Duplicates: 0 Warnings: 0

      MariaDB [mcs]> SELECT * FROM pipo;
      -------------------------------+

      id_unique top_top_email_valide

      -------------------------------+

      42 100

      -------------------------------+
      1 row in set (0.04 sec)

      MariaDB [mcs]> INSERT INTO pipo VALUES (111,100);
      Query OK, 1 row affected (0.13 sec)

      MariaDB [mcs]> SELECT * FROM pipo;
      -------------------------------+

      id_unique top_top_email_valide

      -------------------------------+

      42 100
      111 100

      -------------------------------+
      2 rows in set (0.01 sec)

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              dleeyh Daniel Lee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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