From 1a94d530fd517078f6ed95451265f829d8e10427 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Mon, 18 Nov 2019 07:35:48 +0000 Subject: [PATCH] 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. --- dbcon/mysql/ha_mcs_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 90f3a37a3..57dbe8bdb 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -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();