Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
217226f9
Commit
217226f9
authored
Dec 14, 2003
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portablity fix
parent
427ce41c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
15 deletions
+27
-15
mysql-test/r/have_met_timezone.require
mysql-test/r/have_met_timezone.require
+2
-2
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+1
-1
mysql-test/r/timezone.result
mysql-test/r/timezone.result
+9
-6
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+3
-0
mysql-test/t/timezone.test
mysql-test/t/timezone.test
+12
-6
No files found.
mysql-test/r/have_met_timezone.require
View file @
217226f9
Variable_name Value
FROM_UNIXTIME(24*3600)
timezone MET
1970-01-02 01:00:00
mysql-test/r/mysqldump.result
View file @
217226f9
...
@@ -32,6 +32,6 @@ CREATE TABLE t1 (
...
@@ -32,6 +32,6 @@ CREATE TABLE t1 (
a double default NULL
a double default NULL
) TYPE=MyISAM;
) TYPE=MyISAM;
INSERT INTO t1 VALUES (
NULL
);
INSERT INTO t1 VALUES (
RES
);
DROP TABLE t1;
DROP TABLE t1;
mysql-test/r/timezone.result
View file @
217226f9
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
show variables like "timezone";
Variable_name Value
timezone MET
select @a:=FROM_UNIXTIME(1);
@a:=FROM_UNIXTIME(1)
1970-01-01 01:00:01
select unix_timestamp(@a);
unix_timestamp(@a)
1
CREATE TABLE t1 (ts int);
CREATE TABLE t1 (ts int);
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
...
@@ -23,9 +32,3 @@ ts from_unixtime(ts)
...
@@ -23,9 +32,3 @@ ts from_unixtime(ts)
1048989599 2003-03-30 03:59:59
1048989599 2003-03-30 03:59:59
1048989601 2003-03-30 04:00:01
1048989601 2003-03-30 04:00:01
DROP TABLE t1;
DROP TABLE t1;
select @a:=FROM_UNIXTIME(1);
@a:=FROM_UNIXTIME(1)
1970-01-01 01:00:01
select unix_timestamp(@a);
unix_timestamp(@a)
1
mysql-test/t/mysqldump.test
View file @
217226f9
...
@@ -25,5 +25,8 @@ DROP TABLE t1;
...
@@ -25,5 +25,8 @@ DROP TABLE t1;
CREATE
TABLE
t1
(
a
double
);
CREATE
TABLE
t1
(
a
double
);
INSERT
INTO
t1
VALUES
(
-
9
e999999
);
INSERT
INTO
t1
VALUES
(
-
9
e999999
);
# The following replaces is here because some systems replaces the above
# double with '-inf' and others with MAX_DOUBLE
--
replace_result
(
-
1.79769313486232e+308
)
(
RES
)
(
NULL
)
(
RES
)
--
exec
$MYSQL_DUMP
--
skip
-
comments
test
t1
--
exec
$MYSQL_DUMP
--
skip
-
comments
test
t1
DROP
TABLE
t1
;
DROP
TABLE
t1
;
mysql-test/t/timezone.test
View file @
217226f9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
--
require
r
/
have_met_timezone
.
require
--
require
r
/
have_met_timezone
.
require
disable_query_log
;
disable_query_log
;
s
how
variables
like
"timezone"
;
s
elect
FROM_UNIXTIME
(
24
*
3600
)
;
enable_query_log
;
enable_query_log
;
# Initialization
# Initialization
...
@@ -11,6 +11,17 @@ enable_query_log;
...
@@ -11,6 +11,17 @@ enable_query_log;
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
enable_warnings
show
variables
like
"timezone"
;
#
# Test unix timestamp
#
select
@
a
:=
FROM_UNIXTIME
(
1
);
select
unix_timestamp
(
@
a
);
#
# Test of some values, including some with daylight saving time
#
CREATE
TABLE
t1
(
ts
int
);
CREATE
TABLE
t1
(
ts
int
);
INSERT
INTO
t1
(
ts
)
VALUES
(
Unix_timestamp
(
'2002-10-27 01:00'
));
INSERT
INTO
t1
(
ts
)
VALUES
(
Unix_timestamp
(
'2002-10-27 01:00'
));
...
@@ -27,8 +38,3 @@ INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
...
@@ -27,8 +38,3 @@ INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
SELECT
ts
,
from_unixtime
(
ts
)
FROM
t1
;
SELECT
ts
,
from_unixtime
(
ts
)
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Test unix timestamp
#
select
@
a
:=
FROM_UNIXTIME
(
1
);
select
unix_timestamp
(
@
a
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment