diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-13 23:57:57 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-13 23:57:57 +0300 |
commit | d65fdb31681260ee0cb37ded28889bf9946da1d8 (patch) | |
tree | aec37a4d8c8ec20293732a0ba8bd595673728737 /sql/item_func.h | |
parent | 8969530cffde0c7a466cf3aa8c4b7462d0ace2d2 (diff) | |
parent | c08e6c8867db16245732101ee8603efc0773c7c4 (diff) | |
download | mariadb-git-d65fdb31681260ee0cb37ded28889bf9946da1d8.tar.gz |
Automerge
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 1aae0a5abb5..259316b0c41 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -189,6 +189,29 @@ public: null_value=1; return 0.0; } + bool has_timestamp_args() + { + DBUG_ASSERT(fixed == TRUE); + for (uint i= 0; i < arg_count; i++) + { + if (args[i]->type() == Item::FIELD_ITEM && + args[i]->field_type() == MYSQL_TYPE_TIMESTAMP) + return TRUE; + } + return FALSE; + } + /* + We assume the result of any function that has a TIMESTAMP argument to be + timezone-dependent, since a TIMESTAMP value in both numeric and string + contexts is interpreted according to the current timezone. + The only exception is UNIX_TIMESTAMP() which returns the internal + representation of a TIMESTAMP argument verbatim, and thus does not depend on + the timezone. + */ + virtual bool is_timezone_dependent_processor(uchar *bool_arg) + { + return has_timestamp_args(); + } }; |