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

Bit functions processing throws internally trying to cast char into decimal representation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.1.1
    • PrimProc
    • None
    • 2021-2, 2021-3, 2021-4

    Description

      There are number of regression tests that starts failing after MCOL-4464. Here is how the bug looks like:

      MariaDB [test]> create table t1 (d decimal(18,2), c char(1)) engine=columnstore;
      Query OK, 0 rows affected (0.412 sec)
       
      MariaDB [test]> insert into t1 values (42, 'z');
      Query OK, 1 row affected (0.206 sec)
       
      MariaDB [test]> select d & c from t1;
      ERROR 1815 (HY000): Internal error: st: 0 TupleBPS::receiveMultiPrimitiveMessages() caught  an exception originally thrown by PrimProc: 
      

      The implementation calls dataconvert code that throws trying to cast from the string 'z' into an internal decimal representation. Here is the call stack of the exception thrown.

      #0  0x00007f8f5c281d1d in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #1  0x00007f8f609c9bd6 in dataconvert::string_to_ll<__int128> (data="z000000", bSaturate=@0x7f8f52ff6f7f: false) at /data/mdb-server/storage/columnstore/columnstore/utils/dataconvert/./dataconvert.h:1484
      #2  0x00007f8f609ce33e in dataconvert::number_int_value<__int128> (data="z", typeCode=typeCode@entry=datatypes::SystemCatalog::DECIMAL, ct=..., pushwarning=pushwarning@entry=@0x7f8f52ff6f7f: false, noRoundup=noRoundup@entry=false, 
          intVal=@0x7f8f52ff6f80: 0, saturate=0x0) at /data/mdb-server/storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp:291
      #3  0x00007f8f5fc82db3 in datatypes::SystemCatalog::TypeAttributesStd::decimal128FromString (
          this=this@entry=0x7f8f61492d28 <(anonymous namespace)::GenericToBitOperand(rowgroup::Row&, boost::shared_ptr<execplan::ParseTree> const&, funcexp::Func const&, bool)::attr>, value="z", saturate=saturate@entry=0x0)
          at /data/mdb-server/storage/columnstore/columnstore/datatypes/mcs_datatype.cpp:67
      #4  0x00007f8f611975d7 in (anonymous namespace)::GenericToBitOperand (row=..., parm=..., thisFunc=..., temporalRounding=temporalRounding@entry=true) at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp:168
      #5  0x00007f8f6119d1d7 in funcexp::BitOperandGeneric::BitOperandGeneric (thisFunc=..., parm=..., row=..., this=0x7f8f52ff72b0) at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp:251
      #6  funcexp::Arg2Lazy<funcexp::BitOperandGeneric, funcexp::BitOperandGeneric>::Arg2Lazy (this=0x7f8f52ff72a0, row=..., parm=std::vector of length 2, capacity 2 = {...}, thisFunc=...)
          at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/functor.h:263
      #7  0x00007f8f6119d505 in funcexp::Func_bitand_return_uint64<funcexp::BitOperandGeneric, funcexp::BitOperandGeneric>::getIntVal (this=<optimized out>, row=..., parm=..., isNull=@0x7f8f52ff74df: false, operationColType=...)
          at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp:373
      #8  0x00007f8f6117cded in funcexp::FuncExp::evaluate (this=<optimized out>, row=..., expression=std::vector of length 1, capacity 1 = {...}) at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/funcexp.cpp:352
      #9  0x00007f8f61189bb0 in funcexp::FuncExpWrapper::evaluate (this=0x7f8798462a40, r=r@entry=0x7f871386af90) at /data/mdb-server/storage/columnstore/columnstore/utils/funcexp/funcexpwrapper.cpp:122
      #10 0x000055aa3bcfc1c3 in primitiveprocessor::BatchPrimitiveProcessor::execute (this=this@entry=0x7f8713816000) at /data/mdb-server/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp:1750
      #11 0x000055aa3bcfccbd in primitiveprocessor::BatchPrimitiveProcessor::operator() (this=0x7f8713816000) at /data/mdb-server/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp:2234
      #12 0x000055aa3bd0f968 in primitiveprocessor::BPPSeeder::operator() (this=0x7f879d918840) at /data/mdb-server/storage/columnstore/columnstore/primitives/primproc/bppseeder.cpp:288
      #13 0x00007f8f5d03a514 in threadpool::PriorityThreadPool::threadFcn (this=0x7f8f58081300, preferredQueue=threadpool::PriorityThreadPool::HIGH)
          at /data/mdb-server/storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp:191
      #14 0x00007f8f5e58cbcd in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1
      #15 0x00007f8f63a246db in start_thread (arg=0x7f8f52ffa700) at pthread_create.c:463
      #16 0x00007f8f5bb81a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              drrtuy Roman
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.