mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-10318 : Fix crash in embedded, in case prepared statement has parameter placeholders, but does not bind parameters
This commit is contained in:
parent
ae511cbe38
commit
f280a87c66
1 changed files with 6 additions and 0 deletions
|
@ -333,6 +333,12 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
|
|||
THD *thd;
|
||||
my_bool res;
|
||||
|
||||
if (stmt->param_count && !stmt->bind_param_done)
|
||||
{
|
||||
set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate, NULL);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
int4store(header, stmt->stmt_id);
|
||||
header[4]= (uchar) stmt->flags;
|
||||
thd= (THD*)stmt->mysql->thd;
|
||||
|
|
Loading…
Reference in a new issue