diff options
author | unknown <hf@deer.(none)> | 2003-12-23 18:24:33 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-12-23 18:24:33 +0400 |
commit | 02531752eb4930c0568996a00d16483325f81206 (patch) | |
tree | 9e65d9849ea171f7e247706c8d15c42f48b3f27f /libmysql | |
parent | 7136e3866ca001f636e9288c51c61f8759f1eab5 (diff) | |
download | mariadb-git-02531752eb4930c0568996a00d16483325f81206.tar.gz |
Fix for #2181 (mysql_execute crashed instead of returning error on embedded
server)
We didn't perform the check for the error for embedded server
libmysql/libmysql.c:
error checking moved to the mysql_execute level
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 728454a50fb..9d084879fc8 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -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); |