diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
commit | 76f0b94bb0b2994d639353530c5b251d0f1a204b (patch) | |
tree | 9ed50628aac34f89a37637bab2fc4915b86b5eb4 /sql/item_sum.h | |
parent | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff) | |
parent | 5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff) | |
download | mariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz |
merge with 5.3
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index cf5a08ca271..cd5ce3df9fc 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -1,6 +1,5 @@ #ifndef ITEM_SUM_INCLUDED #define ITEM_SUM_INCLUDED - /* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -486,6 +485,7 @@ public: virtual Field *create_tmp_field(bool group, TABLE *table, uint convert_blob_length); bool walk(Item_processor processor, bool walk_subquery, uchar *argument); + virtual bool collect_outer_ref_processor(uchar *param); bool init_sum_func_check(THD *thd); bool check_sum_func(THD *thd, Item **ref); bool register_sum_func(THD *thd, Item **ref); @@ -546,6 +546,7 @@ public: { return trace_unsupported_by_check_vcol_func_processor(func_name()); } + bool clear_sum_processor(uchar *arg) { clear(); return 0; } }; @@ -1061,11 +1062,6 @@ protected: void restore_to_before_no_rows_in_result(); Field *create_tmp_field(bool group, TABLE *table, uint convert_blob_length); - /* - MIN/MAX uses Item_cache_datetime for storing DATETIME values, thus - in this case a correct INT value can be provided. - */ - bool result_as_longlong() { return args[0]->result_as_longlong(); } }; @@ -1456,8 +1452,13 @@ public: void make_unique(); double val_real() { - String *res; res=val_str(&str_value); - return res ? my_atof(res->c_ptr()) : 0.0; + int error; + const char *end; + String *res; + if (!(res= val_str(&str_value))) + return 0.0; + end= res->ptr() + res->length(); + return (my_strtod(res->ptr(), (char**) &end, &error)); } longlong val_int() { |