mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into hynda.(none):/home/my/bk/mysql-4.0
This commit is contained in:
@ -25,13 +25,9 @@ create table t1 (a int not null auto_increment,primary key (a)) type=heap;
|
||||
The used table type doesn't support AUTO_INCREMENT columns
|
||||
create table t1 (a int not null,b text) type=heap;
|
||||
The used table type doesn't support BLOB/TEXT columns
|
||||
create table t1 (a int ,primary key(a)) type=heap;
|
||||
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
|
||||
drop table if exists t1;
|
||||
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
|
||||
The used table type doesn't support AUTO_INCREMENT columns
|
||||
create table t1 (ordid int(8), primary key (ordid));
|
||||
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
|
||||
create table not_existing_database.test (a int);
|
||||
Got one of the listed errors
|
||||
create table `a/a` (a int);
|
||||
@ -171,3 +167,12 @@ t1 CREATE TABLE `t1` (
|
||||
) TYPE=MyISAM
|
||||
SET SESSION table_type=default;
|
||||
drop table t1;
|
||||
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
||||
insert into t1 values ("a", 1), ("b", 2);
|
||||
insert into t1 values ("c", NULL);
|
||||
Column 'k2' cannot be null
|
||||
insert into t1 values (NULL, 3);
|
||||
Column 'k1' cannot be null
|
||||
insert into t1 values (NULL, NULL);
|
||||
Column 'k1' cannot be null
|
||||
drop table t1;
|
||||
|
@ -138,15 +138,6 @@ id parent_id level
|
||||
1008 102 2
|
||||
1010 102 2
|
||||
1015 102 2
|
||||
explain select level from t1 where level=1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ref level level 1 const 12 Using where; Using index
|
||||
explain select level,id from t1 where level=1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ref level level 1 const 12 Using where; Using index
|
||||
explain select level,id,parent_id from t1 where level=1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ref level level 1 const 12 Using where
|
||||
select level,id from t1 where level=1;
|
||||
level id
|
||||
1 1002
|
||||
@ -595,9 +586,6 @@ id parent_id level
|
||||
1009 102 2
|
||||
1025 102 2
|
||||
1016 102 2
|
||||
explain select level from t1 where level=1;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ref level level 1 const 6 Using where; Using index
|
||||
select level,id from t1 where level=1;
|
||||
level id
|
||||
1 1004
|
||||
|
@ -42,7 +42,6 @@ price area type transityes shopsyes schoolsyes petsyes
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (program enum('signup','unique','sliding') not null, type enum('basic','sliding','signup'), sites set('mt'), PRIMARY KEY (program));
|
||||
ALTER TABLE t1 modify program enum('signup','unique','sliding');
|
||||
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
name varchar(50) DEFAULT '' NOT NULL,
|
||||
|
@ -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;
|
||||
|
@ -40,9 +40,9 @@ update ignore t1 set id=id+1; # This will change all rows
|
||||
select * from t1;
|
||||
update ignore t1 set id=1023 where id=1010;
|
||||
select * from t1 where parent_id=102;
|
||||
explain select level from t1 where level=1;
|
||||
explain select level,id from t1 where level=1;
|
||||
explain select level,id,parent_id from t1 where level=1;
|
||||
# explain select level from t1 where level=1;
|
||||
# explain select level,id from t1 where level=1;
|
||||
# explain select level,id,parent_id from t1 where level=1;
|
||||
select level,id from t1 where level=1;
|
||||
select level,id,parent_id from t1 where level=1;
|
||||
optimize table t1;
|
||||
@ -339,7 +339,7 @@ update ignore t1 set id=id+1; # This will change all rows
|
||||
select * from t1;
|
||||
update ignore t1 set id=1023 where id=1010;
|
||||
select * from t1 where parent_id=102;
|
||||
explain select level from t1 where level=1;
|
||||
# explain select level from t1 where level=1;
|
||||
select level,id from t1 where level=1;
|
||||
select level,id,parent_id from t1 where level=1;
|
||||
select level,id from t1 where level=1 order by id;
|
||||
|
@ -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;
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user