From 18ee34b7a01ddf9bafbeaff0a5d2940f3c4b05e5 Mon Sep 17 00:00:00 2001 From: Lawrin Novitsky Date: Thu, 25 Jul 2019 00:23:16 +0200 Subject: [PATCH] ODBC-261 direct execution could be used for old servers --- ma_statement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ma_statement.c b/ma_statement.c index 28b96a40..c9531d6a 100644 --- a/ma_statement.c +++ b/ma_statement.c @@ -310,7 +310,7 @@ BOOL MADB_CheckIfExecDirectPossible(MADB_Stmt *Stmt) } /* }}} */ -/* {{{ MADB_CheckIfExecDirectPossible +/* {{{ MADB_BulkInsertPossible Checking if we can deploy mariadb_stmt_execute_direct */ BOOL MADB_BulkInsertPossible(MADB_Stmt *Stmt) { @@ -1206,7 +1206,7 @@ SQLRETURN MADB_StmtExecute(MADB_Stmt *Stmt, BOOL ExecDirect) Stmt->RebindParams= FALSE; } - ret= MADB_DoExecute(Stmt, ExecDirect); + ret= MADB_DoExecute(Stmt, ExecDirect && MADB_CheckIfExecDirectPossible(Stmt)); if (!SQL_SUCCEEDED(ret)) {