1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Fix for repreparing statement: Don't send COM_STMT_RESET if we will send

COM_STMT_CLOSE afterwards
This commit is contained in:
Georg Richter
2016-06-01 20:21:03 +02:00
parent b90b17804d
commit 3d83b9bcee
2 changed files with 3 additions and 2 deletions

View File

@@ -217,7 +217,8 @@ restart:
len-=2;
if (last_errno== 65535 &&
(mysql->server_capabilities & CLIENT_PROGRESS))
((mariadb_connection(mysql) && (mysql->server_capabilities & CLIENT_PROGRESS)) ||
(!(mysql->server_capabilities & CLIENT_MYSQL) && mysql->server_capabilities & MARIADB_CLIENT_PROGRESS)))
{
if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1)))
{

View File

@@ -1253,7 +1253,7 @@ int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, size_t lengt
on server side. Statment handle will get a new stmt_id */
char stmt_id[STMT_ID_LENGTH];
if (mysql_stmt_reset(stmt))
if (mysql_stmt_internal_reset(stmt, 1))
goto fail;
ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));