summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-07-01 01:37:20 +0400
committerunknown <evgen@moonbone.local>2006-07-01 01:37:20 +0400
commitb3523520f86d11744e0cad01039ec4189518a35e (patch)
tree591d4f4c1aefba5ba7f1b24cfe60b11d34d8ab08 /mysql-test
parent9bec41887e80099151d25875124ec3ba61c79d57 (diff)
downloadmariadb-git-b3523520f86d11744e0cad01039ec4189518a35e.tar.gz
Reverted wrong bug fix (Bug#11228)
mysql-test/t/key.test: Added SHOW CREATE TABLE, which is the proper way to check for table definitions mysql-test/r/key.result: Fixed result after removing wrong bug fix sql/table.cc: Reverted wrong bug fix. The intention with the original code was to show that MySQL treats the first given unique key as a primary key. Clients can use the marked primary key as a real primary key to validate row changes in case of conflicting updates. The ODBC driver (and other drivers) may also use this fact to optimize/check updates and handle conflicts. The marked key also shows what some engines, like InnoDB or NDB, will use as it's internal primary key. For checking if someone has declared a true PRIMARY KEY, one should use 'SHOW CREATE TABLE'
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/key.result10
-rw-r--r--mysql-test/t/key.test1
2 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index af1db92b1ef..ea8d4338d08 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -336,8 +336,16 @@ UNIQUE i1idx (i1),
UNIQUE i2idx (i2));
desc t1;
Field Type Null Key Default Extra
-i1 int(11) NO UNI
+i1 int(11) NO PRI
i2 int(11) NO UNI
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i1` int(11) NOT NULL,
+ `i2` int(11) NOT NULL,
+ UNIQUE KEY `i1idx` (`i1`),
+ UNIQUE KEY `i2idx` (`i2`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (
c1 int,
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index 34a66febcac..7c6b38cb871 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -334,6 +334,7 @@ create table t1 (
UNIQUE i1idx (i1),
UNIQUE i2idx (i2));
desc t1;
+show create table t1;
drop table t1;
#