Commit 97ded96a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-10318 : Fix crash in embedded, in case prepared statement has parameter...

MDEV-10318 : Fix crash in embedded, in case prepared statement has parameter placeholders, but does not bind parameters
parent e81455bb
......@@ -341,6 +341,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment