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
8ba5af7e
Commit
8ba5af7e
authored
Oct 24, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20890 Illegal mix of collations with UUID()
parent
88cdfc5c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
13 deletions
+26
-13
mysql-test/main/ctype_binary.result
mysql-test/main/ctype_binary.result
+2
-2
mysql-test/main/ctype_cp1251.result
mysql-test/main/ctype_cp1251.result
+2
-2
mysql-test/main/ctype_latin1.result
mysql-test/main/ctype_latin1.result
+2
-2
mysql-test/main/ctype_ucs.result
mysql-test/main/ctype_ucs.result
+2
-2
mysql-test/main/ctype_utf8.result
mysql-test/main/ctype_utf8.result
+8
-1
mysql-test/main/ctype_utf8.test
mysql-test/main/ctype_utf8.test
+7
-0
mysql-test/main/func_misc.result
mysql-test/main/func_misc.result
+2
-2
sql/item_strfunc.h
sql/item_strfunc.h
+1
-2
No files found.
mysql-test/main/ctype_binary.result
View file @
8ba5af7e
...
...
@@ -807,12 +807,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` var
char(36) CHARACTER SET utf8
DEFAULT NULL
`c1` var
binary(36)
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
4
2
5
2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
...
...
mysql-test/main/ctype_cp1251.result
View file @
8ba5af7e
...
...
@@ -1216,12 +1216,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(36) CHARACTER SET
utf8
DEFAULT NULL
`c1` varchar(36) CHARACTER SET
cp1251
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
4
2
5
2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
...
...
mysql-test/main/ctype_latin1.result
View file @
8ba5af7e
...
...
@@ -1525,12 +1525,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(36)
CHARACTER SET utf8
DEFAULT NULL
`c1` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
4
2
5
2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
...
...
mysql-test/main/ctype_ucs.result
View file @
8ba5af7e
...
...
@@ -2409,12 +2409,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(36) CHARACTER SET u
tf8
DEFAULT NULL
`c1` varchar(36) CHARACTER SET u
cs2
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
4
2
5
2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
...
...
mysql-test/main/ctype_utf8.result
View file @
8ba5af7e
...
...
@@ -3281,7 +3281,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
4
2
5
2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
...
...
@@ -11341,5 +11341,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# MDEV-20890 Illegal mix of collations with UUID()
#
SET NAMES utf8 COLLATE utf8_unicode_ci;
SELECT uuid()>'';
uuid()>''
1
#
# End of 10.5 tests
#
mysql-test/main/ctype_utf8.test
View file @
8ba5af7e
...
...
@@ -2276,6 +2276,13 @@ CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-20890 Illegal mix of collations with UUID()
--
echo
#
SET
NAMES
utf8
COLLATE
utf8_unicode_ci
;
SELECT
uuid
()
>
''
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
mysql-test/main/func_misc.result
View file @
8ba5af7e
...
...
@@ -22,7 +22,7 @@ hex(inet_aton('127.1.1'))
7F010001
select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
36
utf8
16
36
latin1
16
set @a= uuid_short();
set @b= uuid_short();
select @b - @a;
...
...
@@ -107,7 +107,7 @@ create table t1 as select uuid(), length(uuid());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`uuid()` varchar(36)
CHARACTER SET utf8
DEFAULT NULL,
`uuid()` varchar(36) DEFAULT NULL,
`length(uuid())` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
...
...
sql/item_strfunc.h
View file @
8ba5af7e
...
...
@@ -1663,8 +1663,7 @@ class Item_func_uuid: public Item_str_func
Item_func_uuid
(
THD
*
thd
)
:
Item_str_func
(
thd
)
{}
bool
fix_length_and_dec
()
{
collation
.
set
(
system_charset_info
,
DERIVATION_COERCIBLE
,
MY_REPERTOIRE_ASCII
);
collation
.
set
(
DTCollation_numeric
());
fix_char_length
(
MY_UUID_STRING_LENGTH
);
return
FALSE
;
}
...
...
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