summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <igor@igor-inspiron.creware.com>2005-07-12 05:18:05 -0700
committerunknown <igor@igor-inspiron.creware.com>2005-07-12 05:18:05 -0700
commitf36db3540a71af51103ac5a92711e1f7e85b4213 (patch)
treed9688a780acd5267215d4e8af81bc1e9cd026fd5 /sql/sql_base.cc
parent83772bc5765719dde16f3bd19d61f82f26df7e55 (diff)
downloadmariadb-git-f36db3540a71af51103ac5a92711e1f7e85b4213.tar.gz
view.result, view.test:
Added a test case for bug #11771. item.h: Fixed bug #11771. Added method reset_query_id_processor to be able to adjust query_id for fields generated from * in queries like this: SELECT * FROM <view> ... sql_base.cc: Fixed bug #11771. Adjusted query_id for fields generated from * in queries like this: SELECT * FROM <view> ... sql/sql_base.cc: Fixed bug #11771. Adjusted query_id for fields generated from * in queries like this: SELECT * FROM <view> ... sql/item.h: Fixed bug #11771. Added method reset_query_id_processor to be able to adjust query_id for fields generated from * in queries like this: SELECT * FROM <view> ... mysql-test/t/view.test: Added a test case for bug #11771. mysql-test/r/view.result: Added a test case for bug #11771.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7a7f2292703..57f46b59c13 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -3495,6 +3495,12 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
field->query_id=thd->query_id;
table->used_keys.intersect(field->part_of_key);
}
+ else
+ {
+ Item *item= ((Field_iterator_view *) iterator)->item();
+ item->walk(&Item::reset_query_id_processor,
+ (byte *)(&thd->query_id));
+ }
}
/*
All fields are used in case if usual tables (in case of view used