summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-03-22 14:03:42 +0200
committermonty@hundin.mysql.fi <>2002-03-22 14:03:42 +0200
commited040fe21e981bae96f0b81fa8a8dfcae67a9995 (patch)
tree41557706d9a6634dd90773de01ff3d7a12fd8d5f /sql/item.h
parent82d87ebd16825e9237f541bf3d966e9c7d132c49 (diff)
downloadmariadb-git-ed040fe21e981bae96f0b81fa8a8dfcae67a9995.tar.gz
Fix for bug in WHERE key='j' or key='J'
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/item.h b/sql/item.h
index c868f9d3bf7..41b897956db 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -56,7 +56,7 @@ public:
virtual void save_org_in_field(Field *field)
{ (void) save_in_field(field); }
virtual bool send(String *str);
- virtual bool eq(const Item *) const;
+ virtual bool eq(const Item *, bool binary_cmp) const;
virtual Item_result result_type () const { return REAL_RESULT; }
virtual enum Type type() const =0;
virtual double val()=0;
@@ -109,7 +109,7 @@ public:
{}
Item_field(Field *field);
enum Type type() const { return FIELD_ITEM; }
- bool eq(const Item *item) const;
+ bool eq(const Item *item, bool binary_cmp) const;
double val();
longlong val_int();
String *val_str(String*);
@@ -138,7 +138,7 @@ public:
Item_null(char *name_par=0)
{ maybe_null=null_value=TRUE; name= name_par ? name_par : (char*) "NULL";}
enum Type type() const { return NULL_ITEM; }
- bool eq(const Item *item) const;
+ bool eq(const Item *item, bool binary_cmp) const;
double val();
longlong val_int();
String *val_str(String *str);
@@ -247,6 +247,7 @@ public:
void make_field(Send_field *field);
enum Item_result result_type () const { return STRING_RESULT; }
bool basic_const_item() const { return 1; }
+ bool eq(const Item *item, bool binary_cmp) const;
Item *new_item() { return new Item_string(name,str_value.ptr(),max_length); }
String *const_string() { return &str_value; }
inline void append(char *str,uint length) { str_value.append(str,length); }
@@ -306,7 +307,8 @@ public:
Item_ref(Item **item, char *table_name_par,char *field_name_par)
:Item_ident(NullS,table_name_par,field_name_par),ref(item) {}
enum Type type() const { return REF_ITEM; }
- bool eq(const Item *item) const { return (*ref)->eq(item); }
+ bool eq(const Item *item, bool binary_cmp) const
+ { return (*ref)->eq(item, binary_cmp); }
~Item_ref() { if (ref) delete *ref; }
double val()
{