Bug #56810 Add from_unixtime function to partitioning allowed list
| Submitted: | 15 Sep 2010 23:24 | Modified: | 29 Sep 2010 22:22 |
|---|---|---|---|
| Reporter: | Joseph Womack | Email Updates: | |
| Status: | Won't fix | Impact on me: | |
| Category: | MySQL Server: Partitions | Severity: | S4 (Feature request) |
| Version: | 5.1 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | functions, limitations, partitioning | ||
[15 Sep 2010 23:24]
Joseph Womack
[16 Sep 2010 3:33]
Valeriy Kravchuk
Thank you for the feature request.
[29 Sep 2010 10:18]
Mattias Jonsson
FROM_UNIXTIME() uses the session variable time_zone, so it cannot be allowed to be used as a partitioning function as it would not be deterministic: # (gnu): date -d "2000-01-01 UTC" +%s # (gnu): 946684800 SET time_zone = "+00:00"; SELECT FROM_UNIXTIME(946684800); FROM_UNIXTIME(946684800) 2000-01-01 00:00:00 CREATE TABLE t1 SELECT FROM_UNIXTIME(946684800); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `FROM_UNIXTIME(946684800)` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t1; FROM_UNIXTIME(946684800) 2000-01-01 00:00:00 SET time_zone = "+01:00"; SELECT FROM_UNIXTIME(946684800); FROM_UNIXTIME(946684800) 2000-01-01 01:00:00
[29 Sep 2010 22:22]
Joseph Womack
Do you have a suggestion for a work around? The application uses the timestamp, and I can not change that as it is not my application and it was not developed in house. Somehow mysqld must be able to deal with timezones (i.e. system_time_zone). Could not the same argument be made for UNIX_TIMESTAMP which is allowed?
[1 Sep 2017 10:08]
feng guo
Also affecting me,hope solve this!
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.