Skip to content

Commit

Permalink
Merge 10.5 into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jul 4, 2022
2 parents 494a75c + 9d5718c commit f43145a
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 20 deletions.
19 changes: 19 additions & 0 deletions mysql-test/suite/innodb/r/change_column_collation.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# MDEV-26294 Duplicate entries in unique index not detected when
# changing collation with INPLACE algorithm
#
SET NAMES utf8;
CREATE TABLE t1 (
id INT PRIMARY KEY,
msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci UNIQUE
) ENGINE=INNODB;
INSERT INTO t1 VALUES (1, 'aaa');
INSERT INTO t1 VALUES (2, 'ååå');
ALTER TABLE t1
MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
ALGORITHM=NOCOPY;
ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
ALTER TABLE t1 DROP INDEX msg,
MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
ALGORITHM=NOCOPY;
DROP TABLE t1;
13 changes: 8 additions & 5 deletions mysql-test/suite/innodb/r/instant_alter_charset,redundant.rdiff
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
--- instant_alter_charset.result 2019-06-17 14:36:02.311515062 +0300
+++ instant_alter_charset,redundant.result 2019-06-17 14:50:11.888705725 +0300
@@ -279,7 +279,6 @@
@@ -288,7 +288,6 @@
alter table boundary_255
modify a varchar(70) charset utf8mb4,
algorithm=instant;
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
drop table boundary_255;
create table t (
a char(10) collate utf8mb3_general_ci,
@@ -297,32 +296,21 @@
@@ -306,35 +305,21 @@
repeat('a', 10), repeat('a', 10)
);
alter table t modify a char(10) collate utf8mb4_general_ci, algorithm=instant;
Expand All @@ -27,25 +25,30 @@
-test.t check status OK
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
alter table t modify aa char(10) collate utf8mb4_general_ci, algorithm=instant;
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
-check table t;
-Table Op Msg_type Msg_text
-test.t check status OK
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
alter table t modify bb char(70) collate utf8mb4_general_ci, algorithm=instant;
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
-check table t;
-Table Op Msg_type Msg_text
-test.t check status OK
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
alter table t modify cc char(100) collate utf8mb4_general_ci, algorithm=instant;
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
-check table t;
-Table Op Msg_type Msg_text
-test.t check status OK
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
alter table t modify d char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
alter table t modify dd char(10) collate utf8mb4_spanish_ci, algorithm=instant;
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY
-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
select * from t;
a b c aa bb cc d dd
aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaa

mysqltest: Result length mismatch
Loading

0 comments on commit f43145a

Please sign in to comment.