diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-10-10 14:00:49 +0400 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-10-10 14:00:49 +0400 |
commit | c4e977ce0a2fc5662844e7beaf96764a800ef104 (patch) | |
tree | 33cb421b05b64a994fee8200f07ed66c5bc0822a /sql/sql_base.cc | |
parent | a7f8da2904525096fd6cf9c7999ce087ee4d9d4d (diff) | |
parent | 469ff92d81d496862ed1fcb7cf700390b7c2de72 (diff) | |
download | mariadb-git-c4e977ce0a2fc5662844e7beaf96764a800ef104.tar.gz |
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19111
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug19111
sql/sql_base.cc:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a530c7f7fdc..b0fed67701c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1365,6 +1365,10 @@ TABLE_LIST *find_table_in_list(TABLE_LIST *table, Also SELECT::exclude_from_table_unique_test used to exclude from check tables of main SELECT of multi-delete and multi-update + We also skip tables with TABLE_LIST::prelocking_placeholder set, + because we want to allow SELECTs from them, and their modification + will rise the error anyway. + TODO: when we will have table/view change detection we can do this check only once for PS/SP @@ -1411,12 +1415,13 @@ TABLE_LIST* unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list) if (((! (res= find_table_in_global_list(table_list, d_name, t_name))) && (! (res= mysql_lock_have_duplicate(thd, table, table_list)))) || ((!res->table || res->table != table->table) && - res->select_lex && !res->select_lex->exclude_from_table_unique_test)) + res->select_lex && !res->select_lex->exclude_from_table_unique_test && + !res->prelocking_placeholder)) break; /* - If we found entry of this table or or table of SELECT which already + If we found entry of this table or table of SELECT which already processed in derived table or top select of multi-update/multi-delete - (exclude_from_table_unique_test). + (exclude_from_table_unique_test) or prelocking placeholder. */ table_list= res->next_global; DBUG_PRINT("info", |