diff options
author | unknown <bell@sanja.is.com.ua> | 2003-09-02 19:56:55 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-09-02 19:56:55 +0300 |
commit | 2d7b48987621f20a57487d460d3bd77be4f254d5 (patch) | |
tree | 354683527bb4727d44f35e20a3d4f06e5e53d9b3 /sql/item.h | |
parent | 0e2f62640500d2d8c0acfbcdc91f207b8457da48 (diff) | |
download | mariadb-git-2d7b48987621f20a57487d460d3bd77be4f254d5.tar.gz |
fixed BUG#1180 (changing WHERE clause of prepared statements by optimisation)
sql/item.h:
constructor and method for aloning AND/OR structure of WHERE clause
sql/item_cmpfunc.cc:
constructor and method for aloning AND/OR structure of WHERE clause
sql/item_cmpfunc.h:
constructor and method for aloning AND/OR structure of WHERE clause
sql/item_func.cc:
constructor for aloning AND/OR structure of WHERE clause
sql/item_func.h:
constructor for aloning AND/OR structure of WHERE clause
sql/sql_lex.cc:
field for saving WHERE root
sql/sql_lex.h:
field for saving WHERE root
sql/sql_prepare.cc:
saving WHERE root
creating new AND/OR structure before executing prepared statement
tests/client_test.c:
test suite for bug #1180
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index c7eb7fc2c1b..147c350878e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -120,6 +120,9 @@ public: Constructor used by Item_field, Item_ref & agregate (sum) functions. Used for duplicating lists in processing queries with temporary tables + Also it used for Item_cond_and/Item_cond_or for creating + top AND/OR ctructure of WHERE clause to protect it of + optimisation changes in prepared statements */ Item(THD *thd, Item &item); virtual ~Item() { name=0; } /*lint -e1509 */ @@ -184,6 +187,7 @@ public: virtual void save_in_result_field(bool no_conversions) {} virtual void no_rows_in_result() {} virtual Item *copy_or_same(THD *thd) { return this; } + virtual Item *copy_andor_structure(THD *thd) { return this; } virtual Item *real_item() { return this; } virtual Item *get_tmp_table_item(THD *thd) { return copy_or_same(thd); } @@ -541,7 +545,7 @@ class Item_result_field :public Item /* Item with result field */ public: Field *result_field; /* Save result here */ Item_result_field() :result_field(0) {} - // Constructor used for Item_sum (see Item comment) + // Constructor used for Item_sum/Item_cond_and/or (see Item comment) Item_result_field(THD *thd, Item_result_field &item): Item(thd, item), result_field(item.result_field) {} |