mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #32676: insert delayed crash with wrong column and function specified
Problem: using wrong local lock type value in the mysql_insert() results in a crash. Fix: use a proper value.
This commit is contained in:

parent
51ca3235b8
commit
5adf16e288
@ -585,7 +585,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
bool log_on= (thd->options & OPTION_BIN_LOG) ||
|
||||
(!(thd->security_ctx->master_access & SUPER_ACL));
|
||||
#endif
|
||||
thr_lock_type lock_type = table_list->lock_type;
|
||||
thr_lock_type lock_type;
|
||||
Item *unused_conds= 0;
|
||||
DBUG_ENTER("mysql_insert");
|
||||
|
||||
@ -620,6 +620,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
if (open_and_lock_tables(thd, table_list))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
lock_type= table_list->lock_type;
|
||||
|
||||
thd->proc_info="init";
|
||||
thd->used_tables=0;
|
||||
@ -637,7 +638,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
|
||||
/* mysql_prepare_insert set table_list->table if it was not set */
|
||||
table= table_list->table;
|
||||
lock_type= table_list->lock_type;
|
||||
|
||||
context= &thd->lex->select_lex.context;
|
||||
/*
|
||||
|
Reference in New Issue
Block a user