summaryrefslogtreecommitdiff
path: root/mysql-test/r/alter_table.result
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-01-28 18:35:52 +0100
committerserg@serg.mylan <>2004-01-28 18:35:52 +0100
commitc4326bc68efa6c2cdf71287be27753b5e879bc9f (patch)
tree2d6eb1e6377b62d611b5f0fde6f0f6437b9814ac /mysql-test/r/alter_table.result
parent8dea612a36da412cfa48ca0e07dee5ca9cece42c (diff)
downloadmariadb-git-c4326bc68efa6c2cdf71287be27753b5e879bc9f.tar.gz
better fix BUG#2361: ALTER TABLE ... DROP PRIMARY KEY drops a non-primary key
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r--mysql-test/r/alter_table.result9
1 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 33af0b30d1c..ce324dc1fa8 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -412,12 +412,15 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
DROP TABLE t1;
-CREATE TABLE t1 (a int UNIQUE);
+CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) default NULL,
- UNIQUE KEY `a` (`a`)
+ `a` int(11) NOT NULL default '0',
+ `b` int(11) default NULL,
+ UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1 DROP PRIMARY KEY;
+ERROR 42000: Can't DROP 'PRIMARY'. Check that column/key exists
DROP TABLE t1;