1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

A fix and test case for Bug#8330 "mysql_stmt_execute crashes" (libmysql).

This commit is contained in:
konstantin@mysql.com
2005-02-10 14:56:20 +03:00
parent 845139731b
commit 016544df22
2 changed files with 59 additions and 0 deletions

View File

@ -2467,6 +2467,11 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate);
DBUG_RETURN(1);
}
if (stmt->mysql->status != MYSQL_STATUS_READY)
{
set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
DBUG_RETURN(1);
}
net_clear(net); /* Sets net->write_pos */
/* Reserve place for null-marker bytes */