diff options
author | unknown <bell@sanja.is.com.ua> | 2003-04-05 09:29:28 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-04-05 09:29:28 +0300 |
commit | 933e16a388704a449fba42fa1eee0b139ecf27a3 (patch) | |
tree | ffac8504b24d3edf10316c26976cce754bba41fc /sql/sql_update.cc | |
parent | 308362a0e38e47fae2022ef54e93f7deb6aaa7a5 (diff) | |
download | mariadb-git-933e16a388704a449fba42fa1eee0b139ecf27a3.tar.gz |
fixed st_select_lex initialization
fixed mustiupdate subselect compatibility
(bug 217)
mysql-test/r/subselect.result:
test of multi-update & subselect
mysql-test/t/subselect.test:
test of multi-update & subselect
sql/sql_update.cc:
added subselect compatibility to query cache
sql/sql_yacc.yy:
right st_select_lex initialization
layout fix
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index ec1183819dc..3e72f79da62 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -400,6 +400,7 @@ int mysql_multi_update(THD *thd, table_list->grant.want_privilege=(SELECT_ACL & ~table_list->grant.privilege); if ((res=open_and_lock_tables(thd,table_list))) DBUG_RETURN(res); + fix_tables_pointers(thd->lex.all_selects_list); thd->select_limit=HA_POS_ERROR; if (setup_fields(thd, 0, table_list, *fields, 1, 0, 0)) @@ -408,7 +409,7 @@ int mysql_multi_update(THD *thd, /* Count tables and setup timestamp handling */ - for (tl= (TABLE_LIST*) table_list ; tl ; tl=tl->next) + for (tl= select_lex->get_table_list() ; tl ; tl=tl->next) { TABLE *table= tl->table; if (table->timestamp_field) @@ -426,7 +427,8 @@ int mysql_multi_update(THD *thd, List<Item> total_list; res= mysql_select(thd, &select_lex->ref_pointer_array, - table_list, select_lex->with_wild, total_list, + select_lex->get_table_list(), select_lex->with_wild, + total_list, conds, 0, (ORDER *) NULL, (ORDER *)NULL, (Item *) NULL, (ORDER *)NULL, options | SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK, |