mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
This commit is contained in:
@ -11435,6 +11435,57 @@ i
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp932_japanese_ci
|
||||
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
|
||||
INSERT INTO t1 (a) VALUES ("a");
|
||||
INSERT INTO t1 (a) VALUES ("b");
|
||||
INSERT INTO t1 (a) VALUES ("c");
|
||||
INSERT INTO t1 (a) VALUES ("d");
|
||||
INSERT INTO t1 (a) VALUES ("e");
|
||||
INSERT INTO t1 (a) VALUES ("f");
|
||||
INSERT INTO t1 (a) VALUES ("g");
|
||||
INSERT INTO t1 (a) VALUES ("h");
|
||||
INSERT INTO t1 (a) VALUES ("i");
|
||||
INSERT INTO t1 (a) VALUES ("j");
|
||||
INSERT INTO t1 (a) VALUES ("k");
|
||||
INSERT INTO t1 (a) VALUES ("l");
|
||||
INSERT INTO t1 (a) VALUES ("m");
|
||||
SELECT * FROM t1 ORDER BY LOWER(a);
|
||||
a
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
|
||||
a
|
||||
m
|
||||
l
|
||||
k
|
||||
j
|
||||
i
|
||||
h
|
||||
g
|
||||
f
|
||||
e
|
||||
d
|
||||
c
|
||||
b
|
||||
a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
@ -11479,6 +11530,57 @@ i
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp932_bin
|
||||
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
|
||||
INSERT INTO t1 (a) VALUES ("a");
|
||||
INSERT INTO t1 (a) VALUES ("b");
|
||||
INSERT INTO t1 (a) VALUES ("c");
|
||||
INSERT INTO t1 (a) VALUES ("d");
|
||||
INSERT INTO t1 (a) VALUES ("e");
|
||||
INSERT INTO t1 (a) VALUES ("f");
|
||||
INSERT INTO t1 (a) VALUES ("g");
|
||||
INSERT INTO t1 (a) VALUES ("h");
|
||||
INSERT INTO t1 (a) VALUES ("i");
|
||||
INSERT INTO t1 (a) VALUES ("j");
|
||||
INSERT INTO t1 (a) VALUES ("k");
|
||||
INSERT INTO t1 (a) VALUES ("l");
|
||||
INSERT INTO t1 (a) VALUES ("m");
|
||||
SELECT * FROM t1 ORDER BY LOWER(a);
|
||||
a
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
|
||||
a
|
||||
m
|
||||
l
|
||||
k
|
||||
j
|
||||
i
|
||||
h
|
||||
g
|
||||
f
|
||||
e
|
||||
d
|
||||
c
|
||||
b
|
||||
a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
|
@ -11435,6 +11435,57 @@ i
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp932_japanese_ci
|
||||
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
|
||||
INSERT INTO t1 (a) VALUES ("a");
|
||||
INSERT INTO t1 (a) VALUES ("b");
|
||||
INSERT INTO t1 (a) VALUES ("c");
|
||||
INSERT INTO t1 (a) VALUES ("d");
|
||||
INSERT INTO t1 (a) VALUES ("e");
|
||||
INSERT INTO t1 (a) VALUES ("f");
|
||||
INSERT INTO t1 (a) VALUES ("g");
|
||||
INSERT INTO t1 (a) VALUES ("h");
|
||||
INSERT INTO t1 (a) VALUES ("i");
|
||||
INSERT INTO t1 (a) VALUES ("j");
|
||||
INSERT INTO t1 (a) VALUES ("k");
|
||||
INSERT INTO t1 (a) VALUES ("l");
|
||||
INSERT INTO t1 (a) VALUES ("m");
|
||||
SELECT * FROM t1 ORDER BY LOWER(a);
|
||||
a
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
|
||||
a
|
||||
m
|
||||
l
|
||||
k
|
||||
j
|
||||
i
|
||||
h
|
||||
g
|
||||
f
|
||||
e
|
||||
d
|
||||
c
|
||||
b
|
||||
a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
@ -11479,6 +11530,57 @@ i
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp932_bin
|
||||
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
|
||||
INSERT INTO t1 (a) VALUES ("a");
|
||||
INSERT INTO t1 (a) VALUES ("b");
|
||||
INSERT INTO t1 (a) VALUES ("c");
|
||||
INSERT INTO t1 (a) VALUES ("d");
|
||||
INSERT INTO t1 (a) VALUES ("e");
|
||||
INSERT INTO t1 (a) VALUES ("f");
|
||||
INSERT INTO t1 (a) VALUES ("g");
|
||||
INSERT INTO t1 (a) VALUES ("h");
|
||||
INSERT INTO t1 (a) VALUES ("i");
|
||||
INSERT INTO t1 (a) VALUES ("j");
|
||||
INSERT INTO t1 (a) VALUES ("k");
|
||||
INSERT INTO t1 (a) VALUES ("l");
|
||||
INSERT INTO t1 (a) VALUES ("m");
|
||||
SELECT * FROM t1 ORDER BY LOWER(a);
|
||||
a
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
|
||||
a
|
||||
m
|
||||
l
|
||||
k
|
||||
j
|
||||
i
|
||||
h
|
||||
g
|
||||
f
|
||||
e
|
||||
d
|
||||
c
|
||||
b
|
||||
a
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
|
Reference in New Issue
Block a user