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
a7113cda
Commit
a7113cda
authored
21 years ago
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing crashing bugs as reported in bugs database
#195
parent
795f4ea6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
mysql-test/r/cast.result
mysql-test/r/cast.result
+3
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+1
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
sql/item_strfunc.h
sql/item_strfunc.h
+2
-1
No files found.
mysql-test/r/cast.result
View file @
a7113cda
...
@@ -40,3 +40,6 @@ cast("1:2:3" as TIME) = "1:02:03"
...
@@ -40,3 +40,6 @@ cast("1:2:3" as TIME) = "1:02:03"
select cast(NULL as DATE);
select cast(NULL as DATE);
cast(NULL as DATE)
cast(NULL as DATE)
NULL
NULL
select cast(NULL as BINARY);
cast(NULL as BINARY)
NULL
This diff is collapsed.
Click to expand it.
mysql-test/t/cast.test
View file @
a7113cda
...
@@ -21,3 +21,4 @@ select cast("2001-1-1" as date) = "2001-01-01";
...
@@ -21,3 +21,4 @@ select cast("2001-1-1" as date) = "2001-01-01";
select
cast
(
"2001-1-1"
as
datetime
)
=
"2001-01-01 00:00:00"
;
select
cast
(
"2001-1-1"
as
datetime
)
=
"2001-01-01 00:00:00"
;
select
cast
(
"1:2:3"
as
TIME
)
=
"1:02:03"
;
select
cast
(
"1:2:3"
as
TIME
)
=
"1:02:03"
;
select
cast
(
NULL
as
DATE
);
select
cast
(
NULL
as
DATE
);
select
cast
(
NULL
as
BINARY
);
This diff is collapsed.
Click to expand it.
sql/item_cmpfunc.cc
View file @
a7113cda
...
@@ -769,7 +769,8 @@ Item_func_if::val_str(String *str)
...
@@ -769,7 +769,8 @@ Item_func_if::val_str(String *str)
{
{
Item
*
arg
=
args
[
0
]
->
val_int
()
?
args
[
1
]
:
args
[
2
];
Item
*
arg
=
args
[
0
]
->
val_int
()
?
args
[
1
]
:
args
[
2
];
String
*
res
=
arg
->
val_str
(
str
);
String
*
res
=
arg
->
val_str
(
str
);
res
->
set_charset
(
charset
());
if
(
res
)
res
->
set_charset
(
charset
());
null_value
=
arg
->
null_value
;
null_value
=
arg
->
null_value
;
return
res
;
return
res
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sql/item_strfunc.h
View file @
a7113cda
...
@@ -512,7 +512,8 @@ class Item_func_binary :public Item_str_func
...
@@ -512,7 +512,8 @@ class Item_func_binary :public Item_str_func
{
{
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
null_value
=
args
[
0
]
->
null_value
;
null_value
=
args
[
0
]
->
null_value
;
tmp
->
set_charset
(
&
my_charset_bin
);
if
(
tmp
)
tmp
->
set_charset
(
&
my_charset_bin
);
return
tmp
;
return
tmp
;
}
}
void
fix_length_and_dec
()
void
fix_length_and_dec
()
...
...
This diff is collapsed.
Click to expand it.
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