mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
MDEV-30746 Regression in ucs2_general_mysql500_ci
1. Adding a separate MY_COLLATION_HANDLER my_collation_ucs2_general_mysql500_ci_handler implementing a proper order for ucs2_general_mysql500_ci The problem happened because ucs2_general_mysql500_ci erroneously used my_collation_ucs2_general_ci_handler. 2. Cosmetic changes: Renaming: - plane00_mysql500 to my_unicase_mysql500_page00 - my_unicase_pages_mysql500 to my_unicase_mysql500_pages to use the same naming style with: - my_unicase_default_page00 - my_unicase_defaul_pages 3. Moving code fragments from - handler::check_collation_compatibility() in handler.cc - upgrade_collation() in table.cc into new methods in class Charset, to reuse the code easier.
This commit is contained in:
parent
841e8877cc
commit
965bdf3e66
13 changed files with 251 additions and 58 deletions
|
|
@ -6442,5 +6442,22 @@ IS_IPV4('10.0.0.1')
|
|||
1
|
||||
SET NAMES utf8;
|
||||
#
|
||||
# MDEV-30746 Regression in ucs2_general_mysql500_ci
|
||||
#
|
||||
SET NAMES utf8mb3;
|
||||
CREATE TABLE t1 (a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_general_mysql500_ci);
|
||||
INSERT INTO t1 VALUES ('s'),('z'),(_latin1 0xDF);
|
||||
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a ORDER BY a;
|
||||
GROUP_CONCAT(a)
|
||||
s
|
||||
z
|
||||
ß
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
|
||||
a HEX(a) HEX(WEIGHT_STRING(a))
|
||||
s 0073 0053
|
||||
z 007A 005A
|
||||
ß 00DF 00DF
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,18 @@ SELECT IS_IPV6('::');
|
|||
SELECT IS_IPV4('10.0.0.1');
|
||||
SET NAMES utf8;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30746 Regression in ucs2_general_mysql500_ci
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8mb3;
|
||||
CREATE TABLE t1 (a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_general_mysql500_ci);
|
||||
INSERT INTO t1 VALUES ('s'),('z'),(_latin1 0xDF);
|
||||
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a ORDER BY a;
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
|
|
|||
|
|
@ -399,3 +399,56 @@ DROP TABLE maria050313_utf8_croatian_ci;
|
|||
DROP TABLE maria050533_xxx_croatian_ci;
|
||||
DROP TABLE maria100004_xxx_croatian_ci;
|
||||
DROP TABLE mysql050614_xxx_croatian_ci;
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-30746 Regression in ucs2_general_mysql500_ci
|
||||
#
|
||||
SET NAMES utf8mb3;
|
||||
SHOW CREATE TABLE t1;
|
||||
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.t1` FORCE" or dump/reload to fix it!
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.t1` FORCE" or dump/reload to fix it!
|
||||
SELECT * FROM t1 IGNORE KEY(a);
|
||||
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.t1` FORCE" or dump/reload to fix it!
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
|
||||
a HEX(a) HEX(WEIGHT_STRING(a))
|
||||
s 0073 0053
|
||||
z 007A 005A
|
||||
ß 00DF 00DF
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 FORCE KEY(a) ORDER BY a;
|
||||
a HEX(a) HEX(WEIGHT_STRING(a))
|
||||
s 0073 0053
|
||||
z 007A 005A
|
||||
ß 00DF 00DF
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 IGNORE KEY(a) ORDER BY a;
|
||||
a HEX(a) HEX(WEIGHT_STRING(a))
|
||||
s 0073 0053
|
||||
z 007A 005A
|
||||
ß 00DF 00DF
|
||||
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a ORDER BY a;
|
||||
GROUP_CONCAT(a)
|
||||
s
|
||||
z
|
||||
ß
|
||||
SELECT GROUP_CONCAT(a) FROM t1 IGNORE KEY(a) GROUP BY a ORDER BY a;
|
||||
GROUP_CONCAT(a)
|
||||
s
|
||||
z
|
||||
ß
|
||||
SELECT GROUP_CONCAT(a) FROM t1 FORCE KEY(a) GROUP BY a ORDER BY a;
|
||||
GROUP_CONCAT(a)
|
||||
s
|
||||
z
|
||||
ß
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
|
|
|||
|
|
@ -203,3 +203,38 @@ DROP TABLE maria050313_utf8_croatian_ci;
|
|||
DROP TABLE maria050533_xxx_croatian_ci;
|
||||
DROP TABLE maria100004_xxx_croatian_ci;
|
||||
DROP TABLE mysql050614_xxx_croatian_ci;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30746 Regression in ucs2_general_mysql500_ci
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8mb3;
|
||||
|
||||
copy_file std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.frm $MYSQLD_DATADIR/test/t1.frm;
|
||||
copy_file std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.MYD $MYSQLD_DATADIR/test/t1.MYD;
|
||||
copy_file std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.MYI $MYSQLD_DATADIR/test/t1.MYI;
|
||||
|
||||
--error ER_TABLE_NEEDS_REBUILD
|
||||
SHOW CREATE TABLE t1;
|
||||
--error ER_TABLE_NEEDS_REBUILD
|
||||
SELECT * FROM t1;
|
||||
--error ER_TABLE_NEEDS_REBUILD
|
||||
SELECT * FROM t1 IGNORE KEY(a);
|
||||
CHECK TABLE t1;
|
||||
REPAIR TABLE t1;
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 FORCE KEY(a) ORDER BY a;
|
||||
SELECT a, HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 IGNORE KEY(a) ORDER BY a;
|
||||
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a ORDER BY a;
|
||||
SELECT GROUP_CONCAT(a) FROM t1 IGNORE KEY(a) GROUP BY a ORDER BY a;
|
||||
SELECT GROUP_CONCAT(a) FROM t1 FORCE KEY(a) GROUP BY a ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue