diff options
author | Gleb Shchepa <gshchepa@mysql.com> | 2008-10-08 02:34:00 +0500 |
---|---|---|
committer | Gleb Shchepa <gshchepa@mysql.com> | 2008-10-08 02:34:00 +0500 |
commit | e219979e7db09522249a55de97f9bf0f74db7e22 (patch) | |
tree | 384f8d90fd9749658c189cb58badeb9a8114b295 /sql/sql_lex.cc | |
parent | eaa10e76cb3b44b239a8a4c8ad056e75997a2f4d (diff) | |
download | mariadb-git-e219979e7db09522249a55de97f9bf0f74db7e22.tar.gz |
Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
``FLUSH TABLES WITH READ LOCK''
Concurrent execution of 1) multitable update with a
NATURAL/USING join and 2) a such query as "FLUSH TABLES
WITH READ LOCK" or "ALTER TABLE" of updating table led
to a server crash.
The mysql_multi_update_prepare() function call is optimized
to lock updating tables only, so it postpones locking to
the last, and if locking fails, it does cleanup of modified
syntax structures and repeats a query analysis. However,
that cleanup procedure was incomplete for NATURAL/USING join
syntax data: 1) some Field_item items pointed into freed
table structures, and 2) the TABLE_LIST::join_columns fields
was not reset.
Major change:
short-living Field *Natural_join_column::table_field has
been replaced with long-living Item*.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0cf7c11b447..ba9c0e93134 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1205,6 +1205,7 @@ void st_select_lex::init_query() subquery_in_having= explicit_limit= 0; is_item_list_lookup= 0; first_execution= 1; + first_natural_join_processing= 1; first_cond_optimization= 1; parsing_place= NO_MATTER; exclude_from_table_unique_test= no_wrap_view_item= FALSE; |