summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-09-02 19:56:55 +0300
committerbell@sanja.is.com.ua <>2003-09-02 19:56:55 +0300
commit51374e569ddf25822dec7a084cff0265714313f5 (patch)
tree354683527bb4727d44f35e20a3d4f06e5e53d9b3 /sql/item.h
parent0f456a480e25521f7d712c7043a7ec27d9c171d8 (diff)
downloadmariadb-git-51374e569ddf25822dec7a084cff0265714313f5.tar.gz
fixed BUG#1180 (changing WHERE clause of prepared statements by optimisation)
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h6
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)
{}