From d93705b83746b68d730e0c88bd3c21c58312fe6f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Jun 2005 12:46:21 -0700 Subject: 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. --- mysql-test/t/key.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/t') 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; -- cgit v1.2.1