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
080b3f51
Commit
080b3f51
authored
Nov 01, 2007
by
mleich@four.local.lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge four.local.lan:/WORK2/merge/mysql-5.0-31408
into four.local.lan:/WORK/mysql-5.0-build/src-clean
parents
2f88dce6
770a6de9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
mysql-test/t/type_datetime.test
mysql-test/t/type_datetime.test
+16
-3
No files found.
mysql-test/t/type_datetime.test
View file @
080b3f51
...
...
@@ -155,13 +155,13 @@ set @@sql_mode='ansi,traditional';
insert
into
t1
values
(
'2007-03-23 13:49:38'
,
'2007-03-23 13:49:38'
);
insert
into
t1
set
dt
=
'2007-03-23 13:49:38'
,
da
=
dt
;
# Test error handling
--
error
1292
--
error
ER_TRUNCATED_WRONG_VALUE
insert
into
t1
values
(
'2007-03-32'
,
'2007-03-23 13:49:38'
);
select
*
from
t1
;
drop
table
t1
;
--
error
1067
--
error
ER_INVALID_DEFAULT
create
table
t1
(
da
date
default
'1962-03-32 23:33:34'
,
dt
datetime
default
'1962-03-03'
);
--
error
1067
--
error
ER_INVALID_DEFAULT
create
table
t1
(
t
time
default
'916:00:00 a'
);
set
@@
sql_mode
=
@
org_mode
;
...
...
@@ -169,6 +169,19 @@ set @@sql_mode= @org_mode;
#
# Bug#27590: Wrong DATE/DATETIME comparison.
#
## The following sub test will fail (difference to expected result) if the
## select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
## runs exact at midnight ('00:00:00').
## ( Bug#29290 type_datetime.test failure in 5.1 )
## Therefore we sleep a bit if we are too close to midnight.
## The complete test itself needs around 1 second.
## Therefore a time_distance to midnight of 5 seconds should be sufficient.
if
(
`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`
)
{
# We are here when CURTIME() is between '23:59:56' and '23:59:59'.
# So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'.
--
real_sleep
5
}
create
table
t1
(
f1
date
,
f2
datetime
,
f3
timestamp
);
insert
into
t1
(
f1
)
values
(
curdate
());
select
curdate
()
<
now
(),
f1
<
now
(),
cast
(
f1
as
date
)
<
now
()
from
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