mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into teton.kitebird.com:/home/paul/mysql-4.1 libmysql/libmysql.c: Auto merged
This commit is contained in:
@ -2035,14 +2035,6 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
|
||||
uint null_count;
|
||||
my_bool result;
|
||||
|
||||
#ifdef CHECK_EXTRA_ARGUMENTS
|
||||
if (!stmt->param_buffers)
|
||||
{
|
||||
/* Parameters exists, but no bound buffers */
|
||||
set_stmt_error(stmt, CR_NOT_ALL_PARAMS_BOUND, unknown_sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
net_clear(net); /* Sets net->write_pos */
|
||||
/* Reserve place for null-marker bytes */
|
||||
null_count= (stmt->param_count+7) /8;
|
||||
@ -2099,6 +2091,14 @@ int STDCALL mysql_execute(MYSQL_STMT *stmt)
|
||||
set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#ifdef CHECK_EXTRA_ARGUMENTS
|
||||
if (stmt->param_count && !stmt->param_buffers)
|
||||
{
|
||||
/* Parameters exists, but no bound buffers */
|
||||
set_stmt_error(stmt, CR_NOT_ALL_PARAMS_BOUND, unknown_sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
if ((*stmt->mysql->methods->stmt_execute)(stmt))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
|
@ -336,6 +336,8 @@ THD::~THD()
|
||||
#ifndef DBUG_OFF
|
||||
dbug_sentry = THD_SENTRY_GONE;
|
||||
#endif
|
||||
/* Reset stmt_backup.mem_root to not double-free memory from thd.mem_root */
|
||||
init_alloc_root(&stmt_backup.mem_root, 0, 0);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
@ -582,8 +582,7 @@ public:
|
||||
Statement_map stmt_map;
|
||||
/*
|
||||
keeps THD state while it is used for active statement
|
||||
Note, that double free_root() is safe, so we don't need to do any
|
||||
special cleanup for it in THD destructor.
|
||||
Note: we perform special cleanup for it in THD destructor.
|
||||
*/
|
||||
Statement stmt_backup;
|
||||
/*
|
||||
|
@ -1193,7 +1193,7 @@ Prepared_statement::Prepared_statement(THD *thd_arg)
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
setup_params= insert_params; // not fully qualified query
|
||||
#else
|
||||
setup_params_data= setup_params_data;
|
||||
setup_params_data= ::setup_params_data;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user