diff options
author | sachin <sachin.setiya@mariadb.com> | 2019-03-03 17:56:48 +0530 |
---|---|---|
committer | sachinsetia1001@gmail.com <sachinsetia1001@gmail.com> | 2019-03-13 15:09:16 +0530 |
commit | 560598c9b2f0f38bb5eec281ef1b00dbe964ed87 (patch) | |
tree | fd6b14f01f1669ecf85e155de09152bac2c714a2 /mysql-test/main/long_unique_bugs.result | |
parent | c3cfcd5b5e0818b26e5766138f3c85c4f332de68 (diff) | |
download | mariadb-git-560598c9b2f0f38bb5eec281ef1b00dbe964ed87.tar.gz |
MDEV-18799 Long unique does not work after failed alter table
Restore table->key_info after calling setup_keyinfo_hash in
mysql_prepare_alter_table.
Diffstat (limited to 'mysql-test/main/long_unique_bugs.result')
-rw-r--r-- | mysql-test/main/long_unique_bugs.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index 716c343f9c4..0dec6572879 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -63,3 +63,24 @@ ALTER TABLE t1 DROP x, ALGORITHM=INPLACE; ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY UPDATE t1 SET x = 'bar'; DROP TABLE t1; +create table t1(a blob unique , b blob); +insert into t1 values(1,1),(2,1); +alter table t1 add unique(b); +ERROR 23000: Duplicate entry '1' for key 'b' +show keys from t1;; +Table t1 +Non_unique 0 +Key_name a +Seq_in_index 1 +Column_name a +Collation A +Cardinality NULL +Sub_part NULL +Packed NULL +Null YES +Index_type HASH +Comment +Index_comment +insert into t1 values(1,1); +ERROR 23000: Duplicate entry '1' for key 'a' +DROP TABLE t1; |