diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-16 16:47:07 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-12-16 16:47:07 +0300 |
commit | efe619585840b27ef156b35f2be6ef3c9809d2e5 (patch) | |
tree | fa68ffcd1dbdaf248e483a5692358fe7330ec507 /sql/item_func.h | |
parent | a1218bb782f646111c9302740b4c443e3fed6d88 (diff) | |
parent | 8f32ccff6032e03782ad805b97328f2e5e047384 (diff) | |
download | mariadb-git-efe619585840b27ef156b35f2be6ef3c9809d2e5.tar.gz |
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
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 f22bc0c301c..e3690232904 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -192,6 +192,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(); + } }; |