summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <jimw@rama.(none)>2006-08-11 12:19:41 -0700
committerunknown <jimw@rama.(none)>2006-08-11 12:19:41 -0700
commit3662bc591fa1d92755ee90f56a369caf8cf540b6 (patch)
treeee6e842ce6ae58c7fc6d51c279a3b33cf2bf4c00 /sql/field.h
parent2353c5a60d38721605ce2463b12556f9dd6f5eab (diff)
parent919c5596d4b006742d0f7f4e54f9c36bca418ae0 (diff)
downloadmariadb-git-3662bc591fa1d92755ee90f56a369caf8cf540b6.tar.gz
Merge rama.(none):/home/jimw/my/mysql-5.0-21284
into rama.(none):/home/jimw/my/mysql-5.1-clean sql/field.h: Resolve conflict sql/ha_federated.cc: Resolve conflict
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index cd6439d1787..de76132f093 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -118,6 +118,11 @@ public:
*/
virtual String *val_str(String*,String *)=0;
String *val_int_as_str(String *val_buffer, my_bool unsigned_flag);
+ /*
+ str_needs_quotes() returns TRUE if the value returned by val_str() needs
+ to be quoted when used in constructing an SQL query.
+ */
+ virtual bool str_needs_quotes() { return FALSE; }
virtual Item_result result_type () const=0;
virtual Item_result cmp_type () const { return result_type(); }
virtual Item_result cast_to_int_type () const { return result_type(); }
@@ -412,6 +417,7 @@ public:
uint32 max_length() { return field_length; }
friend class create_field;
my_decimal *val_decimal(my_decimal *);
+ virtual bool str_needs_quotes() { return TRUE; }
uint is_equal(create_field *new_field);
};
@@ -1379,6 +1385,7 @@ public:
double val_real(void);
longlong val_int(void);
String *val_str(String*, String *);
+ virtual bool str_needs_quotes() { return TRUE; }
my_decimal *val_decimal(my_decimal *);
int cmp(const char *a, const char *b)
{ return cmp_binary(a, b); }