You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Set stmt_id to -1 only for mariadb_stmt_execute_direct
This commit is contained in:
@@ -1115,7 +1115,7 @@ mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
|
|||||||
const char *passwd, const char *db,
|
const char *passwd, const char *db,
|
||||||
uint port, const char *unix_socket,unsigned long client_flag)
|
uint port, const char *unix_socket,unsigned long client_flag)
|
||||||
{
|
{
|
||||||
char *end;
|
char *end= NULL;
|
||||||
char *connection_handler= (mysql->options.extension) ?
|
char *connection_handler= (mysql->options.extension) ?
|
||||||
mysql->options.extension->connection_handler : 0;
|
mysql->options.extension->connection_handler : 0;
|
||||||
|
|
||||||
|
@@ -1268,7 +1268,7 @@ MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql)
|
|||||||
/* fill mysql's stmt list */
|
/* fill mysql's stmt list */
|
||||||
stmt->list.data= stmt;
|
stmt->list.data= stmt;
|
||||||
stmt->mysql= mysql;
|
stmt->mysql= mysql;
|
||||||
stmt->stmt_id= -1;
|
stmt->stmt_id= 0;
|
||||||
mysql->stmts= list_add(mysql->stmts, &stmt->list);
|
mysql->stmts= list_add(mysql->stmts, &stmt->list);
|
||||||
|
|
||||||
|
|
||||||
@@ -2119,6 +2119,7 @@ int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt,
|
|||||||
sizeof(stmt_id), 1, stmt))
|
sizeof(stmt_id), 1, stmt))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
stmt->stmt_id= -1;
|
||||||
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, stmt_str, length, 1, stmt))
|
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, stmt_str, length, 1, stmt))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user