summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-05-08 23:14:40 +0300
committerunknown <bell@sanja.is.com.ua>2002-05-08 23:14:40 +0300
commit6ff06df2333d90021cb10a27f9285586908ee542 (patch)
tree23c58e5b8137b1a19b2371ec5ab4dadf69329e50 /sql/sql_update.cc
parent2c62a868a60058a8664dcf3e45cdd86b41635ddd (diff)
downloadmariadb-git-6ff06df2333d90021cb10a27f9285586908ee542.tar.gz
new SELECT_LEX structures used for storing global ORDER BY, global LIMIT & limit counters
mysql-test/r/union.result: correct result of union explain command
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index db520af61c1..7e3d10ee202 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -379,9 +379,10 @@ multi_update::multi_update(THD *thd_arg, TABLE_LIST *ut, List<Item> &fs,
}
int
-multi_update::prepare(List<Item> &values)
+multi_update::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
DBUG_ENTER("multi_update::prepare");
+ unit= u;
do_update = true;
thd->count_cuted_fields=1;
thd->cuted_fields=0L;
@@ -466,15 +467,19 @@ multi_update::prepare(List<Item> &values)
}
if (counter)
{
- Field_string offset(table_ref->table->file->ref_length,false,"offset",table_ref->table,true);
+ Field_string offset(table_ref->table->file->ref_length, false,
+ "offset", table_ref->table, true);
temp_fields->push_front(new Item_field(((Field *)&offset)));
// Here I make tmp tables
int cnt=counter-1;
TMP_TABLE_PARAM tmp_table_param;
bzero((char*) &tmp_table_param,sizeof(tmp_table_param));
tmp_table_param.field_count=temp_fields->elements;
- if (!(tmp_tables[cnt]=create_tmp_table(thd, &tmp_table_param, *temp_fields,
- (ORDER*) 0, 1, 0, 0, TMP_TABLE_ALL_COLUMNS)))
+ if (!(tmp_tables[cnt]=create_tmp_table(thd, &tmp_table_param,
+ *temp_fields,
+ (ORDER*) 0, 1, 0, 0,
+ TMP_TABLE_ALL_COLUMNS,
+ unit)))
{
error = 1; // A proper error message is due here
DBUG_RETURN(1);