summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-13 23:57:57 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-13 23:57:57 +0300
commit4a12f66cc9fea527058161c461dbaa1af66c9d5c (patch)
treeaec37a4d8c8ec20293732a0ba8bd595673728737 /sql/item_func.h
parent983770aa6aaa3ce7a231a80472e0ebb7095c9f86 (diff)
parenta8cfe3d4f74db680084c3ec8a8b6fbd8f71780d6 (diff)
downloadmariadb-git-4a12f66cc9fea527058161c461dbaa1af66c9d5c.tar.gz
Automerge
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h23
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();
+ }
};