1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge pmartin@bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/pem/work/mysql-4.0
This commit is contained in:
pem@mysql.com
2003-05-13 20:05:23 +02:00
5 changed files with 25 additions and 12 deletions

View File

@ -24,11 +24,9 @@ drop table if exists t1,t2;
!$1167 create table t1 (b char(0) not null, index(b));
!$1164 create table t1 (a int not null auto_increment,primary key (a)) type=heap;
!$1163 create table t1 (a int not null,b text) type=heap;
!$1171 create table t1 (a int ,primary key(a)) type=heap;
drop table if exists t1;
!$1164 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
!$1171 create table t1 (ordid int(8), primary key (ordid));
-- error 1044,1
create table not_existing_database.test (a int);
@ -119,3 +117,13 @@ show create table t1;
SET SESSION table_type=default;
drop table t1;
#
# ISO requires that primary keys are implicitly NOT NULL
#
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
!$1048 insert into t1 values ("c", NULL);
!$1048 insert into t1 values (NULL, 3);
!$1048 insert into t1 values (NULL, NULL);
drop table t1;

View File

@ -54,12 +54,12 @@ INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
drop table t1;
#
# problem med primary key
# No longer a problem with primary key
#
CREATE TABLE t1 (program enum('signup','unique','sliding') not null, type enum('basic','sliding','signup'), sites set('mt'), PRIMARY KEY (program));
# The following should give an error for wrong primary key
!$1171 ALTER TABLE t1 modify program enum('signup','unique','sliding');
# This no longer give an error for wrong primary key
ALTER TABLE t1 modify program enum('signup','unique','sliding');
drop table t1;
#