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
2b8920cd
Commit
2b8920cd
authored
Feb 06, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/home/ram/work/b23782/b23782.5.1
parents
c406b25e
278eb555
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/cast.result
mysql-test/r/cast.result
+4
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+7
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+3
-0
No files found.
mysql-test/r/cast.result
View file @
2b8920cd
...
@@ -348,6 +348,10 @@ Warnings:
...
@@ -348,6 +348,10 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
DROP TABLE t1;
DROP TABLE t1;
select isnull(date(NULL)), isnull(cast(NULL as DATE));
isnull(date(NULL)) isnull(cast(NULL as DATE))
1 1
End of 4.1 tests
select cast('1.2' as decimal(3,2));
select cast('1.2' as decimal(3,2));
cast('1.2' as decimal(3,2))
cast('1.2' as decimal(3,2))
1.20
1.20
...
...
mysql-test/t/cast.test
View file @
2b8920cd
...
@@ -176,7 +176,13 @@ INSERT INTO t1 SET f1 = +1.0e+30 ;
...
@@ -176,7 +176,13 @@ INSERT INTO t1 SET f1 = +1.0e+30 ;
SELECT
f1
AS
double_val
,
CAST
(
f1
AS
SIGNED
INT
)
AS
cast_val
FROM
t1
;
SELECT
f1
AS
double_val
,
CAST
(
f1
AS
SIGNED
INT
)
AS
cast_val
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
# End of 4.1 tests
#
# Bug #23938: cast(NULL as DATE)
#
select
isnull
(
date
(
NULL
)),
isnull
(
cast
(
NULL
as
DATE
));
--
echo
End
of
4.1
tests
#decimal-related additions
#decimal-related additions
...
...
sql/item_timefunc.cc
View file @
2b8920cd
...
@@ -2528,7 +2528,10 @@ longlong Item_date_typecast::val_int()
...
@@ -2528,7 +2528,10 @@ longlong Item_date_typecast::val_int()
DBUG_ASSERT
(
fixed
==
1
);
DBUG_ASSERT
(
fixed
==
1
);
TIME
ltime
;
TIME
ltime
;
if
(
args
[
0
]
->
get_date
(
&
ltime
,
TIME_FUZZY_DATE
))
if
(
args
[
0
]
->
get_date
(
&
ltime
,
TIME_FUZZY_DATE
))
{
null_value
=
1
;
return
0
;
return
0
;
}
return
(
longlong
)
(
ltime
.
year
*
10000L
+
ltime
.
month
*
100
+
ltime
.
day
);
return
(
longlong
)
(
ltime
.
year
*
10000L
+
ltime
.
month
*
100
+
ltime
.
day
);
}
}
...
...
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