diff options
author | Eugene Kosov <claprix@yandex.ru> | 2019-04-11 11:49:26 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-12 12:28:09 +0300 |
commit | 4dc10ec68d354241768ce4779c024b4bb2ca897b (patch) | |
tree | 5d35027fb2b4f8d0ef33b02a15d938953c14e7be | |
parent | a05f423554d0825997c1ff3de7e49e981e84e882 (diff) | |
download | mariadb-git-4dc10ec68d354241768ce4779c024b4bb2ca897b.tar.gz |
MDEV-19236 Improve error message for ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE
remove a sometimes misleading word INPLACE from error message
9 files changed, 10 insertions, 10 deletions
diff --git a/mysql-test/main/alter_table_errors.result b/mysql-test/main/alter_table_errors.result index 1e2a8100e84..5a3ecb6727d 100644 --- a/mysql-test/main/alter_table_errors.result +++ b/mysql-test/main/alter_table_errors.result @@ -1,6 +1,6 @@ create table t (a int, v int as (a)) engine=innodb; alter table t change column a b tinyint, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY show create table t; Table Create Table t CREATE TABLE `t` ( diff --git a/mysql-test/main/check_constraint_innodb.result b/mysql-test/main/check_constraint_innodb.result index 45af3f512b7..4b412491204 100644 --- a/mysql-test/main/check_constraint_innodb.result +++ b/mysql-test/main/check_constraint_innodb.result @@ -2,7 +2,7 @@ create table t1 (a int, b smallint) engine=innodb; connect con1,localhost,root,,test; alter table t1 add constraint check (b < 8); alter table t1 modify column b int, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY connection default; alter table t1 add primary key (a); drop table t1; diff --git a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result index 516ac333a87..56a1df7ce5d 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result +++ b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result @@ -8,7 +8,7 @@ ALGORITHM=COPY; ERROR 01000: Data truncated for column 'i1' at row 1 ALTER TABLE t1 CHANGE i1 id INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY(id), ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY ALTER IGNORE TABLE t1 ADD PRIMARY KEY(i1), ALGORITHM=INPLACE; ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows. Try ALGORITHM=COPY SET @old_sql_mode = @@sql_mode; diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index c596dbb497d..e7240dac770 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -513,7 +513,7 @@ ERROR 42000: Incorrect column name 'FTS_DOC_ID' ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY CREATE TABLE t1n LIKE t1o; ALTER TABLE t1n ADD FULLTEXT INDEX(ct); ALTER TABLE t1n CHANGE c1 Fts_DOC_ID INT, ALGORITHM=INPLACE; @@ -586,7 +586,7 @@ t1n CREATE TABLE `t1n` ( DROP TABLE t1n; ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL, DROP INDEX ct, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL, DROP INDEX ct; ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result index daa3ffc0a9f..0855d6b5148 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result +++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result @@ -781,7 +781,7 @@ ERROR 42000: Incorrect column name 'FTS_Doc_ID' ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY CREATE TABLE t1n LIKE t1o; ALTER TABLE t1n ADD FULLTEXT INDEX(ct); ### files in MYSQL_DATA_DIR/test diff --git a/mysql-test/suite/storage_engine/alter_table_online.result b/mysql-test/suite/storage_engine/alter_table_online.result index 574c46f8cda..2a27c5d108e 100644 --- a/mysql-test/suite/storage_engine/alter_table_online.result +++ b/mysql-test/suite/storage_engine/alter_table_online.result @@ -24,7 +24,7 @@ CREATE TABLE t1 (a <INT_COLUMN>, b <INT_COLUMN>, c <CHAR_COLUMN>) ENGINE=<STORAG INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); ALTER ONLINE TABLE t1 DROP COLUMN b, ADD b <INT_COLUMN>; ALTER ONLINE TABLE t1 MODIFY b BIGINT <CUSTOM_COL_OPTIONS>; -ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type INPLACE. Try LOCK=SHARED. +ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type. Try LOCK=SHARED. ALTER ONLINE TABLE t1 ENGINE=MEMORY; ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. DROP TABLE t1; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 3c646423f59..74aed792f1d 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7011,7 +7011,7 @@ ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME eng "Columns participating in a foreign key are renamed" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE - eng "Cannot change column type INPLACE" + eng "Cannot change column type" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK eng "Adding foreign keys needs foreign_key_checks=OFF" diff --git a/storage/myisam/mysql-test/storage_engine/alter_table_online.rdiff b/storage/myisam/mysql-test/storage_engine/alter_table_online.rdiff index 5ae99e2035c..58c7620f3b9 100644 --- a/storage/myisam/mysql-test/storage_engine/alter_table_online.rdiff +++ b/storage/myisam/mysql-test/storage_engine/alter_table_online.rdiff @@ -14,7 +14,7 @@ +# Also, this problem may cause a chain effect (more errors of different kinds in the test). +# ------------------------------------------- ALTER ONLINE TABLE t1 MODIFY b BIGINT <CUSTOM_COL_OPTIONS>; --ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type INPLACE. Try LOCK=SHARED. +-ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type. Try LOCK=SHARED. +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. +# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected results: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON) ALTER ONLINE TABLE t1 ENGINE=MEMORY; diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff index 854a00cfd81..857854a6115 100644 --- a/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff +++ b/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff @@ -61,7 +61,7 @@ +# Also, this problem may cause a chain effect (more errors of different kinds in the test). +# ------------------------------------------- ALTER ONLINE TABLE t1 MODIFY b BIGINT <CUSTOM_COL_OPTIONS>; --ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type INPLACE. Try LOCK=SHARED. +-ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type. Try LOCK=SHARED. +ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. +# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected results: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON) ALTER ONLINE TABLE t1 ENGINE=MEMORY; |