diff options
author | monty@hundin.mysql.fi <> | 2001-09-21 03:38:35 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-09-21 03:38:35 +0300 |
commit | 5a14bb2a7ee1f5461f73004833fe7439a282de35 (patch) | |
tree | bd27d62de7286eca9070d981c59b7cc1c889d9f1 /sql/item.cc | |
parent | ea0523bd719e59205cb0259a0977ae6c07a7ca00 (diff) | |
download | mariadb-git-5a14bb2a7ee1f5461f73004833fe7439a282de35.tar.gz |
Integrated table->ref_primary_key into table->part_of_key
Fixed bug in UNION
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index d5961fe1733..dbb9c4ec38d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -298,13 +298,21 @@ bool Item::fix_fields(THD *thd, bool Item_field::fix_fields(THD *thd,TABLE_LIST *tables) { - if (!field) + if (!field) // If field is not checked { Field *tmp; if (!(tmp=find_field_in_tables(thd,this,tables))) return 1; set_field(tmp); } + else if (thd && thd->set_query_id && field->query_id != thd->query_id) + { + /* We only come here in unions */ + TABLE *table=field->table; + field->query_id=thd->query_id; + table->used_fields++; + table->used_keys&=field->part_of_key; + } return 0; } |