mirror of
https://github.com/MariaDB/server.git
synced 2025-06-13 13:01:51 +03:00
Merge mysql.com:/home/hf/work/mysql-4.1.mrg
into mysql.com:/home/hf/work/mysql-5.0.mrg libmysqld/embedded_priv.h: Auto merged sql-common/client.c: Auto merged include/mysql.h: merging libmysql/libmysql.c: merging libmysqld/lib_sql.cc: merging libmysqld/libmysqld.c: merging sql/sql_parse.cc: merging
This commit is contained in:
@ -2061,7 +2061,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
||||
mysql_use_result it won't be freed in mysql_stmt_free_result and
|
||||
we should get 'Commands out of sync' here.
|
||||
*/
|
||||
if (simple_command(mysql, COM_STMT_CLOSE, buff, 4, 1))
|
||||
if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||
mysql->net.sqlstate);
|
||||
@ -2070,7 +2070,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
||||
stmt->state= MYSQL_STMT_INIT_DONE;
|
||||
}
|
||||
|
||||
if (simple_command(mysql, COM_STMT_PREPARE, query, length, 1))
|
||||
if (stmt_command(mysql, COM_STMT_PREPARE, query, length, stmt))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||
mysql->net.sqlstate);
|
||||
@ -2486,7 +2486,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
||||
buff[4]= (char) stmt->flags;
|
||||
int4store(buff+5, 1); /* iteration count */
|
||||
if (cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||
packet, length, 1) ||
|
||||
packet, length, 1, NULL) ||
|
||||
(*mysql->methods->read_query_result)(mysql))
|
||||
{
|
||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||
@ -3366,7 +3366,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
||||
*/
|
||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA,
|
||||
buff, sizeof(buff), data,
|
||||
length, 1))
|
||||
length, 1, NULL))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error,
|
||||
mysql->net.last_errno, mysql->net.sqlstate);
|
||||
@ -4754,7 +4754,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
||||
int4store(buff, stmt->stmt_id);
|
||||
int4store(buff + 4, (int)~0); /* number of rows to fetch */
|
||||
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
||||
NullS, 0, 1))
|
||||
NullS, 0, 1, NULL))
|
||||
{
|
||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
@ -5022,7 +5022,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
}
|
||||
int4store(buff, stmt->stmt_id);
|
||||
if ((rc= simple_command(mysql, COM_STMT_CLOSE, buff, 4, 1)))
|
||||
if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt)))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||
mysql->net.sqlstate);
|
||||
|
Reference in New Issue
Block a user