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
9900d2f2
Commit
9900d2f2
authored
Mar 05, 2007
by
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/ram/work/b23616/b23616.5.0
parents
7217d207
4a5dd695
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
mysql-test/r/func_sapdb.result
mysql-test/r/func_sapdb.result
+1
-3
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+4
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql-common/my_time.c
sql-common/my_time.c
+1
-1
No files found.
mysql-test/r/func_sapdb.result
View file @
9900d2f2
...
@@ -240,9 +240,7 @@ a
...
@@ -240,9 +240,7 @@ a
10000
10000
select microsecond(19971231235959.01) as a;
select microsecond(19971231235959.01) as a;
a
a
0
10000
Warnings:
Warning 1292 Truncated incorrect time value: '19971231235959.01'
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
a
a
1997-12-31 00:00:10.090000
1997-12-31 00:00:10.090000
...
...
mysql-test/r/func_time.result
View file @
9900d2f2
...
@@ -1050,6 +1050,10 @@ H
...
@@ -1050,6 +1050,10 @@ H
select last_day('0000-00-00');
select last_day('0000-00-00');
last_day('0000-00-00')
last_day('0000-00-00')
NULL
NULL
select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
week(20061108), week(20061108.01), week(20061108085411.000002);
isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
0 0 45 45 45
End of 4.1 tests
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
...
...
mysql-test/t/func_time.test
View file @
9900d2f2
...
@@ -570,6 +570,13 @@ union
...
@@ -570,6 +570,13 @@ union
select
last_day
(
'0000-00-00'
);
select
last_day
(
'0000-00-00'
);
#
# Bug 23616: datetime functions with double argumets
#
select
isnull
(
week
(
now
()
+
0
)),
isnull
(
week
(
now
()
+
0.2
)),
week
(
20061108
),
week
(
20061108.01
),
week
(
20061108085411.000002
);
--
echo
End
of
4.1
tests
--
echo
End
of
4.1
tests
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
...
...
sql-common/my_time.c
View file @
9900d2f2
...
@@ -206,7 +206,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
...
@@ -206,7 +206,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
digits
=
(
uint
)
(
pos
-
str
);
digits
=
(
uint
)
(
pos
-
str
);
start_loop
=
0
;
/* Start of scan loop */
start_loop
=
0
;
/* Start of scan loop */
date_len
[
format_position
[
0
]]
=
0
;
/* Length of year field */
date_len
[
format_position
[
0
]]
=
0
;
/* Length of year field */
if
(
pos
==
end
)
if
(
pos
==
end
||
*
pos
==
'.'
)
{
{
/* Found date in internal format (only numbers like YYYYMMDD) */
/* Found date in internal format (only numbers like YYYYMMDD) */
year_length
=
(
digits
==
4
||
digits
==
8
||
digits
>=
14
)
?
4
:
2
;
year_length
=
(
digits
==
4
||
digits
==
8
||
digits
>=
14
)
?
4
:
2
;
...
...
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