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
f467f4bb
Commit
f467f4bb
authored
Apr 28, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5459 Illegal mix of collations for datetime
parent
1081e403
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+10
-0
mysql-test/t/ctype_cp1251.test
mysql-test/t/ctype_cp1251.test
+8
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-2
No files found.
mysql-test/r/ctype_cp1251.result
View file @
f467f4bb
...
@@ -3282,5 +3282,15 @@ SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
...
@@ -3282,5 +3282,15 @@ SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
COALESCE(IF(test1=1, NULL, 1), test2)
COALESCE(IF(test1=1, NULL, 1), test2)
DROP TABLE t1;
DROP TABLE t1;
#
#
# MDEV-5459 Illegal mix of collations for datetime
#
SET NAMES cp1251;
CREATE TABLE t1 (dt DATETIME);
INSERT INTO t1 VALUES ('2014-01-02 10:20:30');
SELECT date(dt) FROM t1 WHERE (CASE WHEN 1 THEN date(dt) ELSE null END >= '2013-12-01 00:00:00');
date(dt)
2014-01-02
DROP TABLE t1;
#
# End of 5.5 tests
# End of 5.5 tests
#
#
mysql-test/t/ctype_cp1251.test
View file @
f467f4bb
...
@@ -95,6 +95,14 @@ SELECT COALESCE(IF(test1=1, 1, NULL), test2) FROM t1;
...
@@ -95,6 +95,14 @@ SELECT COALESCE(IF(test1=1, 1, NULL), test2) FROM t1;
SELECT
COALESCE
(
IF
(
test1
=
1
,
NULL
,
1
),
test2
)
FROM
t1
;
SELECT
COALESCE
(
IF
(
test1
=
1
,
NULL
,
1
),
test2
)
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-5459 Illegal mix of collations for datetime
--
echo
#
SET
NAMES
cp1251
;
CREATE
TABLE
t1
(
dt
DATETIME
);
INSERT
INTO
t1
VALUES
(
'2014-01-02 10:20:30'
);
SELECT
date
(
dt
)
FROM
t1
WHERE
(
CASE
WHEN
1
THEN
date
(
dt
)
ELSE
null
END
>=
'2013-12-01 00:00:00'
);
DROP
TABLE
t1
;
--
echo
#
--
echo
#
--
echo
# End of 5.5 tests
--
echo
# End of 5.5 tests
...
...
sql/item_cmpfunc.cc
View file @
f467f4bb
...
@@ -549,8 +549,8 @@ void Item_bool_func2::fix_length_and_dec()
...
@@ -549,8 +549,8 @@ void Item_bool_func2::fix_length_and_dec()
*/
*/
DTCollation
coll
;
DTCollation
coll
;
if
(
args
[
0
]
->
result
_type
()
==
STRING_RESULT
&&
if
(
args
[
0
]
->
cmp
_type
()
==
STRING_RESULT
&&
args
[
1
]
->
result
_type
()
==
STRING_RESULT
&&
args
[
1
]
->
cmp
_type
()
==
STRING_RESULT
&&
agg_arg_charsets_for_comparison
(
coll
,
args
,
2
))
agg_arg_charsets_for_comparison
(
coll
,
args
,
2
))
return
;
return
;
...
...
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