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

Data corruption when inserting out-of-bounds data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.1.7
    • None
    • None
    • Linux CentOS 7.5
    • 2018-21, 2019-01

    Description

      The issues seems related to unsigned smallint and inserting through mcsapi

      MariaDB> create table test.t1(smallint_t SMALLINT, usmallint_t SMALLINT UNSIGNED) engine=columnstore;
      

      Then load data using this simple c++ program

      #include <libmcsapi/mcsapi.h>
      #include <iostream>
       
      int main(int argc, char *argv[])
         {
         mcsapi::ColumnStoreDriver* driver = nullptr;
         mcsapi::ColumnStoreBulkInsert* bulk = nullptr;
       
         try {
            driver = new mcsapi::ColumnStoreDriver();
            bulk = driver->createBulkInsert("test", "t1", 0, 0);
       
            bulk->setColumn(0, (int16_t) INT16_MAX);
            bulk->setColumn(1, (uint16_t) UINT16_MAX);
            bulk->writeRow();
            bulk->commit();
         } catch (mcsapi::ColumnStoreError &e) {
            std::cout << "Error caught: " << e.what() << std::endl;
         }
         delete bulk;
         delete driver;
       
         return 0;
         }
      

      Back to the MySQL command prompt, the data now looks corrupt:

      MariaDB> select * from test.t1;
      ERROR 1815 (HY000): Internal error: An unexpected condition within the query caused an internal processing error within InfiniDB. Please check the log files for more details. Additional Information: error in BatchPrimitiveProces
      

      Attachments

        Activity

          People

            LinuxJedi Andrew Hutchings (Inactive)
            karlsson Anders Karlsson
            Votes:
            0 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.