summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-12-03 13:08:25 +0200
committerunknown <monty@hundin.mysql.fi>2002-12-03 13:08:25 +0200
commit80b143c111fc3df20e3fe2dcfe4880c30b001498 (patch)
tree4cad7c11d248679cf59fce6e92c37d2d7dc6e486 /sql/item.h
parent4f221e351df6c05fdeb95d0b328cf155204195cd (diff)
downloadmariadb-git-80b143c111fc3df20e3fe2dcfe4880c30b001498.tar.gz
Change of internal key_field=NULL handling to avoid error messages.
Optimized SELECT DISTINCT ... ORDER BY ... LIMIT Fixed reference to uninitalized variable mysql-test/r/distinct.result: Updated results for new tests mysql-test/r/func_math.result: Fixed test of RND() mysql-test/r/innodb.result: Updated results for new tests mysql-test/r/null.result: Updated results for new tests mysql-test/t/distinct.test: New distinct test mysql-test/t/func_math.test: Fixed test of RND() mysql-test/t/innodb.test: Test for bugs mysql-test/t/null.test: TEst for bugs sql/field.h: Change of NULL handling to avoid error messages sql/field_conv.cc: Change of NULL handling to avoid error messages sql/item.cc: Change of NULL handling to avoid error messages sql/item.h: Change of NULL handling to avoid error messages sql/item_cmpfunc.cc: Change of NULL handling to avoid error messages sql/item_func.cc: Change of NULL handling to avoid error messages sql/item_func.h: Cleaned up RND() handling sql/item_timefunc.cc: Change of NULL handling to avoid error messages sql/item_timefunc.h: Change of NULL handling to avoid error messages sql/opt_range.cc: Fixed bug in <=> NULL sql/password.c: Indentation cleanup sql/sql_base.cc: Change of NULL handling to avoid error messages sql/sql_class.cc: Fixed reference to uninitalized variable sql/sql_handler.cc: Change of NULL handling to avoid error messages sql/sql_select.cc: Change of NULL handling to avoid error messages Optimized SELECT DISTINCT ... ORDER BY ... LIMIT sql/sql_select.h: Change of NULL handling to avoid error messages sql/unireg.cc: Change of NULL handling to avoid error messages
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/sql/item.h b/sql/item.h
index 563db2291fb..ad68287a92c 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -53,11 +53,11 @@ public:
void set_name(char* str,uint length=0);
void init_make_field(Send_field *tmp_field,enum enum_field_types type);
virtual bool fix_fields(THD *,struct st_table_list *);
- virtual bool save_in_field(Field *field);
+ virtual bool save_in_field(Field *field, bool no_conversions);
virtual void save_org_in_field(Field *field)
- { (void) save_in_field(field); }
+ { (void) save_in_field(field, 1); }
virtual bool save_safe_in_field(Field *field)
- { return save_in_field(field); }
+ { return save_in_field(field, 1); }
virtual bool send(THD *thd, String *str);
virtual bool eq(const Item *, bool binary_cmp) const;
virtual Item_result result_type () const { return REAL_RESULT; }
@@ -130,7 +130,7 @@ public:
}
void make_field(Send_field *field);
bool fix_fields(THD *,struct st_table_list *);
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field,bool no_conversions);
void save_org_in_field(Field *field);
table_map used_tables() const;
enum Item_result result_type () const
@@ -156,7 +156,7 @@ public:
longlong val_int();
String *val_str(String *str);
void make_field(Send_field *field);
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field, bool no_conversions);
bool save_safe_in_field(Field *field);
enum Item_result result_type () const
{ return STRING_RESULT; }
@@ -190,7 +190,7 @@ public:
double val() { return (double) value; }
String *val_str(String*);
void make_field(Send_field *field);
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field, bool no_conversions);
bool basic_const_item() const { return 1; }
Item *new_item() { return new Item_int(name,value,max_length); }
void print(String *str);
@@ -232,7 +232,7 @@ public:
max_length=length;
}
Item_real(double value_par) :value(value_par) {}
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field, bool no_conversions);
enum Type type() const { return REAL_ITEM; }
double val() { return value; }
longlong val_int() { return (longlong) (value+(value > 0 ? 0.5 : -0.5));}
@@ -277,7 +277,7 @@ public:
double val() { return atof(str_value.ptr()); }
longlong val_int() { return strtoll(str_value.ptr(),(char**) 0,10); }
String *val_str(String*) { return (String*) &str_value; }
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field, bool no_conversions);
void make_field(Send_field *field);
enum Item_result result_type () const { return STRING_RESULT; }
bool basic_const_item() const { return 1; }
@@ -298,7 +298,7 @@ public:
Item_default() { name= (char*) "DEFAULT"; }
enum Type type() const { return DEFAULT_ITEM; }
void make_field(Send_field *field) {}
- bool save_in_field(Field *field)
+ bool save_in_field(Field *field, bool no_conversions)
{
field->set_default();
return 0;
@@ -339,7 +339,7 @@ public:
double val() { return (double) Item_varbinary::val_int(); }
longlong val_int();
String *val_str(String*) { return &str_value; }
- bool save_in_field(Field *field);
+ bool save_in_field(Field *field, bool no_conversions);
void make_field(Send_field *field);
enum Item_result result_type () const { return INT_RESULT; }
unsigned int size_of() { return sizeof(*this);}
@@ -401,7 +401,8 @@ public:
bool send(THD *thd, String *tmp) { return (*ref)->send(thd, tmp); }
void make_field(Send_field *field) { (*ref)->make_field(field); }
bool fix_fields(THD *,struct st_table_list *);
- bool save_in_field(Field *field) { return (*ref)->save_in_field(field); }
+ bool save_in_field(Field *field, bool no_conversions)
+ { return (*ref)->save_in_field(field, no_conversions); }
void save_org_in_field(Field *field) { (*ref)->save_org_in_field(field); }
enum Item_result result_type () const { return (*ref)->result_type(); }
table_map used_tables() const { return (*ref)->used_tables(); }
@@ -421,9 +422,9 @@ class Item_int_with_ref :public Item_int
public:
Item_int_with_ref(longlong i, Item *ref_arg) :Item_int(i), ref(ref_arg)
{}
- bool save_in_field(Field *field)
+ bool save_in_field(Field *field, bool no_conversions)
{
- return ref->save_in_field(field);
+ return ref->save_in_field(field, no_conversions);
}
unsigned int size_of() { return sizeof(*this);}
};