diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-23 11:22:30 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-23 11:22:30 -0700 |
commit | e3cfd4ef0cda7cd46940454ab82f1a509d21cb92 (patch) | |
tree | 11a7803101cbf7b5a82af191b7a2e86927f5aab1 /sql/sql_select.h | |
parent | 85a7014de65c2475462852d253d9d6331572c107 (diff) | |
parent | d9a7e4e0dc2abb92f3328104f6b3394c25c355e3 (diff) | |
download | mariadb-git-e3cfd4ef0cda7cd46940454ab82f1a509d21cb92.tar.gz |
Manual merge
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index e5266944251..885b50016af 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -448,6 +448,7 @@ class store_key :public Sql_alloc char *null_ptr; char err; public: + enum store_key_result { STORE_KEY_OK, STORE_KEY_FATAL, STORE_KEY_CONV }; store_key(THD *thd, Field *field_arg, char *ptr, char *null, uint length) :null_ptr(null),err(0) { @@ -463,7 +464,7 @@ class store_key :public Sql_alloc ptr, (uchar*) null, 1); } virtual ~store_key() {} /* Not actually needed */ - virtual bool copy()=0; + virtual enum store_key_result copy()=0; virtual const char *name() const=0; }; @@ -484,10 +485,10 @@ class store_key_field: public store_key copy_field.set(to_field,from_field,0); } } - bool copy() + enum store_key_result copy() { copy_field.do_copy(©_field); - return err != 0; + return err != 0 ? STORE_KEY_FATAL : STORE_KEY_OK; } const char *name() const { return field_name; } }; @@ -504,9 +505,11 @@ public: null_ptr_arg ? null_ptr_arg : item_arg->maybe_null ? &err : NullS, length), item(item_arg) {} - bool copy() + enum store_key_result copy() { - return item->save_in_field_no_warnings(to_field, 1) || err != 0; + int res= item->save_in_field(to_field, 1); + return (err != 0 || res > 2 ? STORE_KEY_FATAL : (store_key_result) res); + } const char *name() const { return "func"; } }; @@ -524,15 +527,19 @@ public: &err : NullS, length, item_arg), inited(0) { } - bool copy() + enum store_key_result copy() { + int res; if (!inited) { inited=1; - if (item->save_in_field(to_field, 1)) - err= 1; + if ((res= item->save_in_field(to_field, 1))) + { + if (!err) + err= res; + } } - return err != 0; + return (err > 2 ? STORE_KEY_FATAL : (store_key_result) err); } const char *name() const { return "const"; } }; |