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

INSERT..SELECT hangs on cpimport when MCS is installed in a non-default path

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.4.3
    • 5.5.1
    • writeengine
    • None

    Description

      To repeat the problem:

      • Compile MariaDB with ColumnStore with a non-default -DCMAKE_INSTALL_PREFIX
      • Do "make install"
      • Do all necessary post-installation steps and start MariaDB/ColumnStore
      • Run this SQL script:

        DROP TABLE IF EXISTS t1,t2;
        CREATE TABLE t1 (a INT) ENGINE=ColumnStore;
        INSERT INTO t1 VALUES (1);
        CREATE TABLE t2 (a INT) ENGINE=ColumnStore;
        INSERT INTO t2 SELECT * FROM t1;
        

      The problem happens because of this code in writeengine/splitter/we_cmdargs.cpp:

           if (argc > 0)
               fPrgmName = "cpimport.bin"; //argv[0] is splitter but we need cpimport
      

      so later this call fails:

      int aRet = execvp(Cmds[0], &Cmds[0]);
      

      This message is added to /var/log/mariadb/columnstore/err.log:

      Nov 27 17:29:44 home writeengineserver[150739]: 44.235562 |0|0|0| E 32 CAL0000: 7571 : execv error: cpimport.bin invocation failed; (errno-9); No such file or directory; Check file and try 
      

      The solution is to add full patch when constructing the cpimport command line:

      diff --git a/writeengine/splitter/we_cmdargs.cpp b/writeengine/splitter/we_cmdargs.cpp
      index 30716252..311953d3 100644
      --- a/writeengine/splitter/we_cmdargs.cpp
      +++ b/writeengine/splitter/we_cmdargs.cpp
      @@ -43,6 +43,7 @@ using namespace oam;
       #include "we_cmdargs.h"
       
       #include "installdir.h"
      +#include "mcsconfig.h"
       
       namespace WriteEngine
       {
      @@ -598,7 +599,7 @@ void WECmdArgs::parseCmdLineArgs(int argc, char** argv)
       
       
           if (argc > 0)
      -        fPrgmName = "cpimport.bin"; //argv[0] is splitter but we need cpimport
      +        fPrgmName = string(MCSBINDIR) + "/" + "cpimport.bin"; //argv[0] is splitter but we need cpimport
       
           while ((aCh = getopt(argc, argv,
                                "d:j:w:s:v:l:r:b:e:B:f:q:ihm:E:C:P:I:n:p:c:ST:Ny:K:t:H:g:U:"))
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            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.