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

Strings or empty strings are inserted as zero values in numeric data types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.2.2
    • Icebox
    • MariaDB Server
    • None

    Description

      Strings or empty strings are inserted as zero values in numeric data types

      expected: receive Error and operation is rejected

      note:builtin innodb_version 10.3.11 and server version 10.3.11-MariaDB

      1. Create tables with engine Columnstore and InnoDB columns of integer data type
      2. Insert into string values --Operation is accepted and it's inserted zero values

      1.

      MariaDB [a]> show create table acol;
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                             |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      | acol  | CREATE TABLE `acol` (
        `a` int(11) DEFAULT NULL,
        `b` int(11) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=latin1 |
      +-------+--------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
       
      MariaDB [a]> show create table ainn;
      +-------+---------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                        |
      +-------+---------------------------------------------------------------------------------------------------------------------+
      | ainn  | CREATE TABLE `ainn` (
        `a` int(11) DEFAULT NULL,
        `b` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+---------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [a]>
      
      

      2.1 Insert a string

      MariaDB [a]> insert into acol values ("RR",1);
      Query OK, 1 row affected, 1 warning (0.364 sec)
       
      MariaDB [a]> select * from acol;
      +------+------+
      | a    | b    |
      +------+------+
      |    0 |    1 |
      +------+------+
      1 row in set (0.100 sec)
       
      MariaDB [a]> insert into ainn values ("RR",1);
      Query OK, 1 row affected, 1 warning (0.014 sec)
       
      MariaDB [a]> select * from ainn;
      +------+------+
      | a    | b    |
      +------+------+
      |    0 |    1 |
      +------+------+
      1 row in set (0.001 sec)
      
      

      2.2 Insert an empty string

      MariaDB [a]> insert into acol values ("",1);
      Query OK, 1 row affected, 1 warning (0.105 sec)
       
      MariaDB [a]> select * from acol;
      +------+------+
      | a    | b    |
      +------+------+
      |    0 |    1 |
      |    0 |    1 |
      +------+------+
      2 rows in set (0.039 sec)
       
      MariaDB [a]> insert into ainn values ("",1);
      Query OK, 1 row affected, 1 warning (0.009 sec)
       
      MariaDB [a]> select * from ainn;
      +------+------+
      | a    | b    |
      +------+------+
      |    0 |    1 |
      |    0 |    1 |
      +------+------+
      2 rows in set (0.002 sec)
       
      
      

      expected behavior as in pure MariDB server installation:

      MariaDB [a]>  insert into a values ("RR",1) ;
      ERROR 1366 (22007): Incorrect integer value: 'RR' for column 'a' at row 1
      MariaDB [a]>  insert into a values ("",1) ;
      ERROR 1366 (22007): Incorrect integer value: '' for column 'a' at row 1
      MariaDB [a]>
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              winstone Zdravelina Sokolovska (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.