~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/timezone.test

  • Committer: Daniel Nichter
  • Date: 2011-10-23 16:01:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2448.
  • Revision ID: daniel@percona.com-20111023160137-7ac3blgz8z4tf8za
Add Administration Getting Started and Logging.  Capitalize SQL clause keywords.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Test of SYSTEM time zone handling ( for my_system_gmt_sec()).
3
3
# This script must be run with TZ=MET
4
4
 
 
5
#-- require r/have_met_timezone.require
5
6
disable_query_log;
 
7
# Drizzle bug #309403 - returning wrong value for FROM_UNIXTIME
6
8
select FROM_UNIXTIME(24*3600);
7
9
enable_query_log;
8
10
 
12
13
DROP TABLE IF EXISTS t1;
13
14
--enable_warnings
14
15
 
15
 
# The following is because of daylight saving time
16
 
--replace_result MEST MET
17
 
show variables like "system_time_zone";
18
 
 
19
16
#
20
17
# Test unix timestamp
21
18
#
47
44
#
48
45
CREATE TABLE t1 (ts timestamp);
49
46
INSERT INTO t1 (ts) VALUES ('2003-03-30 01:59:59'),
50
 
                           ('2003-03-30 02:59:59'),
51
47
                           ('2003-03-30 03:00:00');
 
48
# Jay believes this is related to bug Drizzle bug #309403 - 
 
49
# returning wrong value for FROM_UNIXTIME
 
50
# see beginning of this file
 
51
#                           ('2003-03-30 02:59:59');
52
52
DROP TABLE t1;
53
53
 
54
54
#
55
55
# Test for fix for Bug#2523 Check that boundary dates are processed
56
56
# correctly.
 
57
# -- scratch the above, Drizzle allows for longer dates.
57
58
#
58
 
select unix_timestamp('1970-01-01 01:00:00'), 
59
 
       unix_timestamp('1970-01-01 01:00:01'),
60
 
       unix_timestamp('2038-01-19 04:14:07'),
61
 
       unix_timestamp('2038-01-19 04:14:08');
 
59
select unix_timestamp('1970-01-01 00:00:00');
 
60
select unix_timestamp('1970-01-01 00:00:01');
 
61
select unix_timestamp('2038-01-19 03:14:07');
 
62
--error ER_INVALID_UNIX_TIMESTAMP_VALUE # Bad timestamp
 
63
select unix_timestamp('2038-01-19 03:14:08');
62
64
 
63
65
# End of 4.1 tests