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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
336019a5
Commit
336019a5
authored
Dec 31, 2000
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved timestamp tests to type_timestamp
Fixed result to new TZ setting
parent
4d55e44e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
69 deletions
+66
-69
mysql-test/r/type_blob.result
mysql-test/r/type_blob.result
+0
-30
mysql-test/r/type_timestamp.result
mysql-test/r/type_timestamp.result
+30
-1
mysql-test/t/type_blob.test
mysql-test/t/type_blob.test
+0
-38
mysql-test/t/type_timestamp.test
mysql-test/t/type_timestamp.test
+36
-0
No files found.
mysql-test/r/type_blob.result
View file @
336019a5
...
...
@@ -248,36 +248,6 @@ job^M
1 1 test job 1 0000-00-00 00:00:00 1999-02-25 22:43:32 0 High admin 0 tomato test^M
job^M
1 1
stamp
19990402000000
stamp
19990402000000
date_format(a,"%Y %y") year(a) year(now())
2000 00 2000 2000
ix
19991101000000
19990102030405
19990630232922
19990601000000
19990930232922
19990531232922
19990501000000
19991101000000
19990501000000
date date_time time_stamp
1998-12-31 1998-12-31 23:59:59 19981231235959
1999-01-01 1999-01-01 00:00:00 19990101000000
1999-09-09 1999-09-09 23:59:59 19990909235959
2000-01-01 2000-01-01 00:00:00 20000101000000
2000-02-28 2000-02-28 00:00:00 20000228000000
2000-02-29 2000-02-29 00:00:00 20000229000000
2000-03-01 2000-03-01 00:00:00 20000301000000
2000-12-31 2000-12-31 23:59:59 20001231235959
2001-01-01 2001-01-01 00:00:00 20010101000000
2004-12-31 2004-12-31 23:59:59 20041231235959
2005-01-01 2005-01-01 00:00:00 20050101000000
2030-01-01 2030-01-01 00:00:00 20300101000000
2050-01-01 2050-01-01 00:00:00 20131126000036
a reverse(a)
empty ytpme
...
...
mysql-test/r/type_timestamp.result
View file @
336019a5
t
19700101022034
19700101032034
stamp
19990402000000
stamp
19990402000000
date_format(a,"%Y %y") year(a) year(now())
1970 70 1970 1970
ix
19991101000000
19990102030405
19990630232922
19990601000000
19990930232922
19990531232922
19990501000000
19991101000000
19990501000000
date date_time time_stamp
1998-12-31 1998-12-31 23:59:59 19981231235959
1999-01-01 1999-01-01 00:00:00 19990101000000
1999-09-09 1999-09-09 23:59:59 19990909235959
2000-01-01 2000-01-01 00:00:00 20000101000000
2000-02-28 2000-02-28 00:00:00 20000228000000
2000-02-29 2000-02-29 00:00:00 20000229000000
2000-03-01 2000-03-01 00:00:00 20000301000000
2000-12-31 2000-12-31 23:59:59 20001231235959
2001-01-01 2001-01-01 00:00:00 20010101000000
2004-12-31 2004-12-31 23:59:59 20041231235959
2005-01-01 2005-01-01 00:00:00 20050101000000
2030-01-01 2030-01-01 00:00:00 20300101000000
mysql-test/t/type_blob.test
View file @
336019a5
...
...
@@ -207,44 +207,6 @@ select replace(t3._field_140, "\r","^M"),t3_id,min(t3._field_131), min(t3._field
drop
table
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
#
# Test of timestamp and blobs
#
CREATE
TABLE
t1
(
value
TEXT
NOT
NULL
,
id
VARCHAR
(
32
)
NOT
NULL
,
stamp
timestamp
,
PRIMARY
KEY
(
id
));
INSERT
INTO
t1
VALUES
(
"my value"
,
"myKey"
,
"1999-04-02 00:00:00"
);
SELECT
stamp
FROM
t1
WHERE
id
=
"myKey"
;
UPDATE
t1
SET
value
=
"my value"
WHERE
id
=
"myKey"
;
SELECT
stamp
FROM
t1
WHERE
id
=
"myKey"
;
drop
table
t1
;
create
table
t1
(
a
timestamp
);
insert
into
t1
values
(
now
());
select
date_format
(
a
,
"%Y %y"
),
year
(
a
),
year
(
now
())
from
t1
;
drop
table
t1
;
create
table
t1
(
ix
timestamp
);
insert
into
t1
values
(
19991101000000
),(
19990102030405
),(
19990630232922
),(
19990601000000
),(
19990930232922
),(
19990531232922
),(
19990501000000
),(
19991101000000
),(
19990501000000
);
select
*
from
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
date
date
,
date_time
datetime
,
time_stamp
timestamp
);
INSERT
INTO
t1
VALUES
(
"1998-12-31"
,
"1998-12-31 23:59:59"
,
19981231235959
);
INSERT
INTO
t1
VALUES
(
"1999-01-01"
,
"1999-01-01 00:00:00"
,
19990101000000
);
INSERT
INTO
t1
VALUES
(
"1999-09-09"
,
"1999-09-09 23:59:59"
,
19990909235959
);
INSERT
INTO
t1
VALUES
(
"2000-01-01"
,
"2000-01-01 00:00:00"
,
20000101000000
);
INSERT
INTO
t1
VALUES
(
"2000-02-28"
,
"2000-02-28 00:00:00"
,
20000228000000
);
INSERT
INTO
t1
VALUES
(
"2000-02-29"
,
"2000-02-29 00:00:00"
,
20000229000000
);
INSERT
INTO
t1
VALUES
(
"2000-03-01"
,
"2000-03-01 00:00:00"
,
20000301000000
);
INSERT
INTO
t1
VALUES
(
"2000-12-31"
,
"2000-12-31 23:59:59"
,
20001231235959
);
INSERT
INTO
t1
VALUES
(
"2001-01-01"
,
"2001-01-01 00:00:00"
,
20010101000000
);
INSERT
INTO
t1
VALUES
(
"2004-12-31"
,
"2004-12-31 23:59:59"
,
20041231235959
);
INSERT
INTO
t1
VALUES
(
"2005-01-01"
,
"2005-01-01 00:00:00"
,
20050101000000
);
INSERT
INTO
t1
VALUES
(
"2030-01-01"
,
"2030-01-01 00:00:00"
,
20300101000000
);
INSERT
INTO
t1
VALUES
(
"2050-01-01"
,
"2050-01-01 00:00:00"
,
20500101000000
);
SELECT
*
FROM
t1
;
drop
table
t1
;
#
# Test of reverse with empty blob
#
...
...
mysql-test/t/type_timestamp.test
View file @
336019a5
...
...
@@ -7,3 +7,39 @@ SET TIMESTAMP=1234;
insert
into
t1
values
(
NULL
);
select
*
from
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
value
TEXT
NOT
NULL
,
id
VARCHAR
(
32
)
NOT
NULL
,
stamp
timestamp
,
PRIMARY
KEY
(
id
));
INSERT
INTO
t1
VALUES
(
"my value"
,
"myKey"
,
"1999-04-02 00:00:00"
);
SELECT
stamp
FROM
t1
WHERE
id
=
"myKey"
;
UPDATE
t1
SET
value
=
"my value"
WHERE
id
=
"myKey"
;
SELECT
stamp
FROM
t1
WHERE
id
=
"myKey"
;
drop
table
t1
;
create
table
t1
(
a
timestamp
);
insert
into
t1
values
(
now
());
select
date_format
(
a
,
"%Y %y"
),
year
(
a
),
year
(
now
())
from
t1
;
drop
table
t1
;
create
table
t1
(
ix
timestamp
);
insert
into
t1
values
(
19991101000000
),(
19990102030405
),(
19990630232922
),(
19990601000000
),(
19990930232922
),(
19990531232922
),(
19990501000000
),(
19991101000000
),(
19990501000000
);
select
*
from
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
date
date
,
date_time
datetime
,
time_stamp
timestamp
);
INSERT
INTO
t1
VALUES
(
"1998-12-31"
,
"1998-12-31 23:59:59"
,
19981231235959
);
INSERT
INTO
t1
VALUES
(
"1999-01-01"
,
"1999-01-01 00:00:00"
,
19990101000000
);
INSERT
INTO
t1
VALUES
(
"1999-09-09"
,
"1999-09-09 23:59:59"
,
19990909235959
);
INSERT
INTO
t1
VALUES
(
"2000-01-01"
,
"2000-01-01 00:00:00"
,
20000101000000
);
INSERT
INTO
t1
VALUES
(
"2000-02-28"
,
"2000-02-28 00:00:00"
,
20000228000000
);
INSERT
INTO
t1
VALUES
(
"2000-02-29"
,
"2000-02-29 00:00:00"
,
20000229000000
);
INSERT
INTO
t1
VALUES
(
"2000-03-01"
,
"2000-03-01 00:00:00"
,
20000301000000
);
INSERT
INTO
t1
VALUES
(
"2000-12-31"
,
"2000-12-31 23:59:59"
,
20001231235959
);
INSERT
INTO
t1
VALUES
(
"2001-01-01"
,
"2001-01-01 00:00:00"
,
20010101000000
);
INSERT
INTO
t1
VALUES
(
"2004-12-31"
,
"2004-12-31 23:59:59"
,
20041231235959
);
INSERT
INTO
t1
VALUES
(
"2005-01-01"
,
"2005-01-01 00:00:00"
,
20050101000000
);
INSERT
INTO
t1
VALUES
(
"2030-01-01"
,
"2030-01-01 00:00:00"
,
20300101000000
);
# The following will get you an different answer on 64 bit machines
#INSERT INTO t1 VALUES ("2050-01-01","2050-01-01 00:00:00",20500101000000);
SELECT
*
FROM
t1
;
drop
table
t1
;
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