summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2005-05-24 13:38:46 +0100
committerunknown <acurtis@xiphis.org>2005-05-24 13:38:46 +0100
commit1a8f64d71557fee049497827a6fbc6da46fed3d8 (patch)
tree39c1beee23fdf84f4a413c4c840d88c59abe51b6 /sql
parentefc7b884ebaa81416743b98fdbf909189443e70a (diff)
downloadmariadb-git-1a8f64d71557fee049497827a6fbc6da46fed3d8.tar.gz
Add comments
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2c1723be5d9..80c68dad247 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1992,6 +1992,10 @@ mysql_execute_command(THD *thd)
#endif
}
#endif /* !HAVE_REPLICATION */
+
+ /* When subselects or time_zone info is used in a query
+ * we create a new TABLE_LIST containing all referenced tables
+ * and set local variable 'tables' to point to this list. */
if ((&lex->select_lex != lex->all_selects_list ||
lex->time_zone_tables_used) &&
lex->unit.create_total_list(thd, lex, &tables))
@@ -5438,6 +5442,9 @@ int multi_delete_precheck(THD *thd, TABLE_LIST *tables, uint *table_count)
}
walk->lock_type= target_tbl->lock_type;
target_tbl->table_list= walk; // Remember corresponding table
+
+ /* in case of subselects, we need to set lock_type in
+ * corresponding table in list of all tables */
if (walk->table_list)
{
target_tbl->table_list= walk->table_list;