diff options
author | unknown <jimw@mysql.com> | 2005-06-22 12:46:21 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-06-22 12:46:21 -0700 |
commit | d93705b83746b68d730e0c88bd3c21c58312fe6f (patch) | |
tree | 543baf0f88c15a91f035d35d565cf56621d5f115 /mysql-test/t/key.test | |
parent | bbc0211304fe7beb47fef9f188e413effeea4470 (diff) | |
download | mariadb-git-d93705b83746b68d730e0c88bd3c21c58312fe6f.tar.gz |
Fix reporting of type for unique key on VARCHAR field. (Bug #11227)
mysql-test/r/key.result:
Add new results
mysql-test/t/key.test:
Add new regression test
sql/table.cc:
Use keyinfo->key_parts to determine if key is part of a
multiple-field key or is unique.
Diffstat (limited to 'mysql-test/t/key.test')
-rw-r--r-- | mysql-test/t/key.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index 9db1523be51..96407a3d1bc 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -337,3 +337,19 @@ show create table t1; alter table t1 modify a varchar(20); show create table t1; drop table t1; + +# +# Bug #11227: Incorrectly reporting 'MUL' vs. 'UNI' on varchar +# +create table t1 (a int not null primary key, b varchar(20) not null unique); +desc t1; +drop table t1; +create table t1 (a int not null primary key, b int not null unique); +desc t1; +drop table t1; +create table t1 (a int not null primary key, b varchar(20) not null, unique (b(10))); +desc t1; +drop table t1; +create table t1 (a int not null primary key, b varchar(20) not null, c varchar(20) not null, unique(b(10),c(10))); +desc t1; +drop table t1; |