diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-26 13:29:26 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-26 13:29:26 +0400 |
commit | 503755256d9bb4c07a4f0fd62cec5de64c7ae21a (patch) | |
tree | b87b6cd937b0ada820490d2988ced9f2120b10c7 /sql/sql_insert.cc | |
parent | 1f57bfb8d1ed7f4cbe4a3410752903106cc8d34c (diff) | |
download | mariadb-git-503755256d9bb4c07a4f0fd62cec5de64c7ae21a.tar.gz |
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.
mysql-test/r/delayed.result:
Fix for bug #32676: insert delayed crash with wrong column and function specified
- test result.
mysql-test/t/delayed.test:
Fix for bug #32676: insert delayed crash with wrong column and function specified
- test case.
sql/sql_insert.cc:
Fix for bug #32676: insert delayed crash with wrong column and function specified
- the local lock_type var assigment displaced just after the line
where the table_list->lock_type is filnally defined in the mysql_insert()
to avoid using its old value.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 770bbd1349d..bb648d2eb83 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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; /* |