summaryrefslogtreecommitdiff
path: root/sql/item.h
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
commiteeeacce0eb805b043e64dfe543f733441c2629ad (patch)
treed9688a780acd5267215d4e8af81bc1e9cd026fd5 /sql/item.h
parentc78fb0786fb9e378ea77963f77c476c02010ba78 (diff)
downloadmariadb-git-eeeacce0eb805b043e64dfe543f733441c2629ad.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/item.h')
-rw-r--r--sql/item.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 560f1124fb4..12acb8dd28d 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -641,6 +641,7 @@ public:
virtual bool cleanup_processor(byte *arg);
virtual bool collect_item_field_processor(byte * arg) { return 0; }
virtual bool change_context_processor(byte *context) { return 0; }
+ virtual bool reset_query_id_processor(byte *query_id) { return 0; }
virtual Item *equal_fields_propagator(byte * arg) { return this; }
virtual Item *set_no_const_sub(byte *arg) { return this; }
@@ -895,6 +896,13 @@ public:
bool is_null() { return field->is_null(); }
Item *get_tmp_table_item(THD *thd);
bool collect_item_field_processor(byte * arg);
+ bool reset_query_id_processor(byte *arg)
+ {
+ field->query_id= *((query_id_t *) arg);
+ if (result_field)
+ result_field->query_id= field->query_id;
+ return 0;
+ }
void cleanup();
Item_equal *find_item_equal(COND_EQUAL *cond_equal);
Item *equal_fields_propagator(byte *arg);