1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Use execvp instead execv for cpimport

execv() doesn't use PATH settings so can't find cpimport for
INSERT...SELECT and LOAD DATA INFILE. Switch to execvp() as we have done
in other parts of the codebase.
This commit is contained in:
Andrew Hutchings
2019-11-18 07:35:48 +00:00
parent f291d88979
commit 1a94d530fd

View File

@ -3465,12 +3465,12 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table)
open("/dev/null", O_WRONLY);
open("/dev/null", O_WRONLY);
errno = 0;
execv(Cmds[0], &Cmds[0]); //NOTE - works with full Path
execvp(Cmds[0], &Cmds[0]); //NOTE - works with full Path
int execvErrno = errno;
ostringstream oss;
oss << " : execv error: cpimport.bin invocation failed; "
oss << " : execvp error: cpimport.bin invocation failed; "
<< "(errno-" << errno << "); " << strerror(execvErrno) <<
"; Check file and try invoking locally.";
cout << oss.str();