diff options
author | unknown <antony@ltantony.rdg.cyberkinetica.homeunix.net> | 2003-12-10 04:31:42 +0000 |
---|---|---|
committer | unknown <antony@ltantony.rdg.cyberkinetica.homeunix.net> | 2003-12-10 04:31:42 +0000 |
commit | 80ec807976ca5ae291883b1096e4af7233788af0 (patch) | |
tree | 786b29c1b82119fc7dc8cadff03c8bd8607d3deb /mysql-test/t/bdb.test | |
parent | b6df8bb66ac8eefcbea86aecb0f8c067dcbe004c (diff) | |
download | mariadb-git-80ec807976ca5ae291883b1096e4af7233788af0.tar.gz |
WorkLog#1323
Deprecate the use of TYPE=... Preferred syntax is ENGINE=
include/mysqld_error.h:
New warning for deprecated syntax
sql/lex.h:
Introduce ENGINE keyword
Sort order of symbols
sql/share/czech/errmsg.txt:
New warning for deprecated syntax
sql/share/danish/errmsg.txt:
New warning for deprecated syntax
sql/share/dutch/errmsg.txt:
New warning for deprecated syntax
sql/share/english/errmsg.txt:
New warning for deprecated syntax
sql/share/estonian/errmsg.txt:
New warning for deprecated syntax
sql/share/french/errmsg.txt:
New warning for deprecated syntax
sql/share/german/errmsg.txt:
New warning for deprecated syntax
sql/share/greek/errmsg.txt:
New warning for deprecated syntax
sql/share/hungarian/errmsg.txt:
New warning for deprecated syntax
sql/share/italian/errmsg.txt:
New warning for deprecated syntax
sql/share/japanese/errmsg.txt:
New warning for deprecated syntax
sql/share/korean/errmsg.txt:
New warning for deprecated syntax
sql/share/norwegian-ny/errmsg.txt:
New warning for deprecated syntax
sql/share/norwegian/errmsg.txt:
New warning for deprecated syntax
sql/share/polish/errmsg.txt:
New warning for deprecated syntax
sql/share/portuguese/errmsg.txt:
New warning for deprecated syntax
sql/share/romanian/errmsg.txt:
New warning for deprecated syntax
sql/share/russian/errmsg.txt:
New warning for deprecated syntax
sql/share/serbian/errmsg.txt:
New warning for deprecated syntax
sql/share/slovak/errmsg.txt:
New warning for deprecated syntax
sql/share/spanish/errmsg.txt:
New warning for deprecated syntax
sql/share/swedish/errmsg.txt:
New warning for deprecated syntax
sql/share/ukrainian/errmsg.txt:
New warning for deprecated syntax
sql/sql_show.cc:
Change TYPE= with ENGINE=
sql/sql_yacc.yy:
Introduce ENGINE keyword,
Deprecate TYPE= syntax,
Introduce SHOW ENGINE syntax,
Deprecate SHOW INNODB/BDB syntax.
mysql-test/r/alias.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/alter_table.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/auto_increment.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-alter-table-1.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-crash.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-deadlock.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb_cache.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/case.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/cast.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/constraints.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/create.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_collate.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_latin1_de.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_many.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_mb.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_recoding.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_ucs.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/delete.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/distinct.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext2.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext_distinct.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext_left_join.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_compress.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_date_add.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_group.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_if.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_str.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_system.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_test.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/func_time.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/gis-rtree.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/group_by.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/handler.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/heap.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_auto_increment.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_btree.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_hash.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/help.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb-deadlock.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb_cache.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb_handler.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/insert_select.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/isam.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/join.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/join_crash.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/join_outer.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/key.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/lock.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/lock_tables_lost_commit.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/merge.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/mix_innodb_myisam_binlog.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/multi_update.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/myisam.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/null.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/null_key.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/order_by.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/query_cache.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/range.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/repair_part1.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/replace.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/rollback.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl000006.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_flush_tables.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_insert_id.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_relayrotate.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/select.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/select_found.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/show_check.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/sql_mode.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/status.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect2.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect_innodb.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/symlink.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/temp_table.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/type_blob.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/type_datetime.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/type_enum.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/type_nchar.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/type_set.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/union.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/update.result:
Change occurances of TYPE= to ENGINE=
mysql-test/r/warnings.result:
Change occurances of TYPE= to ENGINE=
mysql-test/t/alias.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/alter_table.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/auto_increment.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-alter-table-1.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-crash.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-deadlock.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb_cache.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/create.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/ctype_ucs.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/delete.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/distinct.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext2.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext_distinct.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext_left_join.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_compress.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_date_add.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_group.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_if.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_str.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_test.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/func_time.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/gis-rtree.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/group_by.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/handler.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/heap.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_auto_increment.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_btree.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_hash.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/help.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb-deadlock.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb_cache.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb_handler.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/insert_select.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/isam.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/join.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/join_crash.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/join_outer.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/key.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/lock.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/lock_tables_lost_commit.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/merge.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/mix_innodb_myisam_binlog.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/multi_update.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/myisam.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/null.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/null_key.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/order_by.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/outfile.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/query_cache.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/query_cache_merge.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/range.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/repair_part1.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/replace.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/rollback.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl000006.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_flush_tables.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_insert_id.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_relayrotate.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/select.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/select_found.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/show_check.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/sql_mode.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/status.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect2.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect_innodb.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/symlink.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/temp_table.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/type_datetime.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/type_set.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/union.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/update.test:
Change occurances of TYPE= to ENGINE=
mysql-test/t/warnings.test:
Change occurances of TYPE= to ENGINE=
New test for deprecated syntax
Diffstat (limited to 'mysql-test/t/bdb.test')
-rw-r--r-- | mysql-test/t/bdb.test | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index a0fbc56a9da..44bb753d6a1 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -7,7 +7,7 @@ --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; --enable_warnings -create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=bdb; +create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=bdb; insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); select id, code, name from t1 order by id; @@ -30,7 +30,7 @@ CREATE TABLE t1 ( PRIMARY KEY (id), KEY parent_id (parent_id), KEY level (level) -) type=bdb; +) engine=bdb; INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2); update t1 set parent_id=parent_id+100; select * from t1 where parent_id=102; @@ -59,7 +59,7 @@ CREATE TABLE t1 ( gesuchnr int(11) DEFAULT '0' NOT NULL, benutzer_id int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (gesuchnr,benutzer_id) -) type=BDB; +) engine=BDB; replace into t1 (gesuchnr,benutzer_id) values (2,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); @@ -68,7 +68,7 @@ select * from t1; drop table t1; # test for bug in replace with secondary key -create table t1 (id int not null primary key, x int not null, key (x)) type=bdb; +create table t1 (id int not null primary key, x int not null, key (x)) engine=bdb; insert into t1 (id, x) values (1, 1); replace into t1 (id, x) values (1, 2); select * from t1; @@ -78,7 +78,7 @@ drop table t1; # test delete using hidden_primary_key # -create table t1 (a int) type=bdb; +create table t1 (a int) engine=bdb; insert into t1 values (1), (2); optimize table t1; delete from t1 where a = 1; @@ -86,7 +86,7 @@ select * from t1; check table t1; drop table t1; -create table t1 (a int,b varchar(20)) type=bdb; +create table t1 (a int,b varchar(20)) engine=bdb; insert into t1 values (1,""), (2,"testing"); delete from t1 where a = 1; select * from t1; @@ -98,7 +98,7 @@ drop table t1; # Test of reading on secondary key with may be null -create table t1 (a int,b varchar(20),key(a)) type=bdb; +create table t1 (a int,b varchar(20),key(a)) engine=bdb; insert into t1 values (1,""), (2,"testing"); select * from t1 where a = 1; drop table t1; @@ -107,7 +107,7 @@ drop table t1; # Test auto_increment on sub key # -create table t1 (a char(10) not null, b int not null auto_increment, primary key(a,b)) type=BDB; +create table t1 (a char(10) not null, b int not null auto_increment, primary key(a,b)) engine=BDB; insert into t1 values ("a",1),("b",2),("a",2),("c",1); insert into t1 values ("a",NULL),("b",NULL),("c",NULL),("e",NULL); insert into t1 (a) values ("a"),("b"),("c"),("d"); @@ -123,7 +123,7 @@ drop table t1; # Test rollback # -create table t1 (n int not null primary key) type=bdb; +create table t1 (n int not null primary key) engine=bdb; set autocommit=0; insert into t1 values (4); rollback; @@ -150,7 +150,7 @@ drop table t1; # Testing transactions # -create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=BDB; +create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=BDB; begin; insert into t1 values(1,'hamdouni'); select id as afterbegin_id,nom as afterbegin_nom from t1; @@ -168,7 +168,7 @@ drop table t1; # Simple not autocommit test # -CREATE TABLE t1 (id char(8) not null primary key, val int not null) type=bdb; +CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=bdb; insert into t1 values ('pippo', 12); -- error 1062 insert into t1 values ('pippo', 12); # Gives error @@ -191,12 +191,12 @@ set autocommit=1; # The following simple tests failed at some point # -CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) TYPE=BDB; +CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=BDB; INSERT INTO t1 VALUES (1, 'Jochen'); select * from t1; drop table t1; -CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) TYPE=BDB; +CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=BDB; set autocommit=0; INSERT INTO t1 SET _userid='marc@anyware.co.uk'; COMMIT; @@ -215,7 +215,7 @@ CREATE TABLE t1 ( ref_email varchar(100) DEFAULT '' NOT NULL, detail varchar(200), PRIMARY KEY (user_id,ref_email) -)type=bdb; +)engine=bdb; INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar'); select * from t1 where user_id=10292; @@ -240,7 +240,7 @@ drop table t1; # create table t1 (col1 int not null, col2 char(4) not null, primary key(col1)); -alter table t1 type=BDB; +alter table t1 engine=BDB; insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4'); select * from t1; update t1 set col2='7' where col1='4'; @@ -255,8 +255,8 @@ drop table t1; # INSERT INTO BDB tables # -create table t1 (a int not null , b int, primary key (a)) type = BDB; -create table t2 (a int not null , b int, primary key (a)) type = myisam; +create table t1 (a int not null , b int, primary key (a)) engine = BDB; +create table t2 (a int not null , b int, primary key (a)) engine = myisam; insert into t1 VALUES (1,3) , (2,3), (3,3); select * from t1; insert into t2 select * from t1; @@ -279,7 +279,7 @@ CREATE TABLE t1 ( passwd varchar(32) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE ggid (ggid) -) TYPE=BDB; +) ENGINE=BDB; insert into t1 (ggid,passwd) values ('test1','xxx'); insert into t1 (ggid,passwd) values ('test2','yyy'); @@ -317,7 +317,7 @@ CREATE TABLE t1 ( approved datetime, dummy_primary_key int(11) NOT NULL auto_increment, PRIMARY KEY (dummy_primary_key) -) TYPE=BDB; +) ENGINE=BDB; INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1); INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2); INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3); @@ -337,7 +337,7 @@ CREATE TABLE t1 ( KEY (id), KEY parent_id (parent_id), KEY level (level) -) type=bdb; +) engine=bdb; INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1); INSERT INTO t1 values (179,5,2); update t1 set parent_id=parent_id+100; @@ -370,7 +370,7 @@ CREATE TABLE t1 ( sca_sch_desc varchar(16), PRIMARY KEY (sca_code, cat_code, lan_code), INDEX sca_pic (sca_pic) -) type = bdb ; +) engine = bdb ; INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING'); select count(*) from t1 where sca_code = 'PD'; @@ -392,7 +392,7 @@ drop table t1; # Test of opening table twice and timestamps # set @a:=now(); -CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) type=bdb; +CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=bdb; insert into t1 (a) values(1),(2),(3); select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a; update t1 set a=5 where a=1; @@ -407,7 +407,7 @@ flush logs; # # Test key on blob with null values # -create table t1 (b blob, i int, key (b(100)), key (i), key (i, b(20))) type=bdb; +create table t1 (b blob, i int, key (b(100)), key (i), key (i, b(20))) engine=bdb; insert into t1 values ('this is a blob', 1), (null, -1), (null, null),("",1),("",2),("",3); select b from t1 where b = 'this is a blob'; select * from t1 where b like 't%'; @@ -421,7 +421,7 @@ drop table t1; # # Test with variable length primary key # -create table t1 (a varchar(100) not null, primary key(a), b int not null) type=bdb; +create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=bdb; insert into t1 values("hello",1),("world",2); select * from t1 order by b desc; optimize table t1; @@ -431,7 +431,7 @@ drop table t1; # # Test of bug in create index with NULL columns # -create table t1 (i int, j int )TYPE=BDB; +create table t1 (i int, j int )ENGINE=BDB; insert into t1 values (1,2); select * from t1 where i=1 and j=2; create index ax1 on t1 (i,j); @@ -451,7 +451,7 @@ create table t1 unique branch_name(branch_name), index branch_active(branch_active) -) type=bdb; +) engine=bdb; create table t2 ( target_id int auto_increment primary key, @@ -460,7 +460,7 @@ create table t2 unique target_name(target_name), index target_active(target_active) -) type=bdb; +) engine=bdb; create table t3 ( platform_id int auto_increment primary key, @@ -469,7 +469,7 @@ create table t3 unique platform_name(platform_name), index platform_active(platform_active) -) type=bdb; +) engine=bdb; create table t4 ( product_id int auto_increment primary key, @@ -479,7 +479,7 @@ create table t4 unique product_name(product_name), index product_active(product_active) -) type=bdb; +) engine=bdb; create table t5 ( product_file_id int auto_increment primary key, @@ -492,7 +492,7 @@ create table t5 unique product_file(product_id,file_name), index file_included(file_included) -) type=bdb; +) engine=bdb; create table t6 ( file_platform_id int auto_increment primary key, @@ -505,7 +505,7 @@ create table t6 archive_filename varchar(255) not null, unique file_platform(product_file_id,platform_id,branch_id) -) type=bdb; +) engine=bdb; create table t8 ( archive_id int auto_increment primary key, @@ -517,7 +517,7 @@ create table t8 unique archive(branch_id,target_id,platform_id,product_id), index status_id(status_id) -) type=bdb; +) engine=bdb; create table t7 ( build_id int auto_increment primary key, @@ -531,7 +531,7 @@ create table t7 build_path text not null, unique build(branch_id,target_id,build_number) -) type=bdb; +) engine=bdb; insert into t1 (branch_name) values ('RealMedia'); @@ -659,7 +659,7 @@ CREATE TABLE t1 ( a tinytext NOT NULL, b tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (a(32),b) -) TYPE=BDB; +) ENGINE=BDB; INSERT INTO t1 VALUES ('a',1),('a',2); SELECT * FROM t1 WHERE a='a' AND b=2; SELECT * FROM t1 WHERE a='a' AND b in (2); @@ -674,7 +674,7 @@ CREATE TABLE t1 ( a int3 unsigned NOT NULL, b int1 unsigned NOT NULL, UNIQUE (a, b) -) TYPE = BDB; +) ENGINE = BDB; INSERT INTO t1 VALUES (1, 1); SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1; @@ -684,7 +684,7 @@ drop table t1; # Test problem with BDB and lock tables with duplicate write. # -create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb; +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=bdb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; --error 1062 @@ -694,7 +694,7 @@ select id from t1; UNLOCK TABLES; DROP TABLE t1; -create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb; +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=bdb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; begin; @@ -711,8 +711,8 @@ DROP TABLE t1; # Test with empty tables (crashed with lock error) # -CREATE TABLE t1 (SYAIN_NO char(5) NOT NULL default '', KINMU_DATE char(6) NOT NULL default '', PRIMARY KEY (SYAIN_NO,KINMU_DATE)) TYPE=BerkeleyDB; -CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL default '',PRIMARY KEY (SYAIN_NO,STR_DATE) ) TYPE=BerkeleyDB; +CREATE TABLE t1 (SYAIN_NO char(5) NOT NULL default '', KINMU_DATE char(6) NOT NULL default '', PRIMARY KEY (SYAIN_NO,KINMU_DATE)) ENGINE=BerkeleyDB; +CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL default '',PRIMARY KEY (SYAIN_NO,STR_DATE) ) ENGINE=BerkeleyDB; select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; DROP TABLE t1,t2; @@ -721,7 +721,7 @@ DROP TABLE t1,t2; # Test problem with joining table to itself on a multi-part unique key # -create table t1 (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb; +create table t1 (a int(11) not null, b int(11) not null, unique (a,b)) engine=bdb; insert into t1 values (1,1), (1,2); select * from t1 where a = 1; select t1.*, t2.* from t1, t1 t2 where t1.a = t2.a and t2.a = 1; @@ -732,9 +732,9 @@ drop table t1; # This caused a deadlock in BDB internal locks # -create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb; +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=bdb; insert into t1 values (0,0,0,'ABCDEFGHIJ'); -create table t2 (id int NOT NULL,primary key (id)) type=bdb; +create table t2 (id int NOT NULL,primary key (id)) engine=bdb; LOCK TABLES t1 WRITE, t2 WRITE; insert into t2 values(1); SELECT t1.* FROM t1 WHERE id IN (1); @@ -746,7 +746,7 @@ drop table t1,t2; # Test problems with NULL # -CREATE TABLE t1 (i varchar(48) NOT NULL default '', p varchar(255) default NULL,s varchar(48) NOT NULL default '', PRIMARY KEY (i), UNIQUE(p,s)) TYPE=BDB; +CREATE TABLE t1 (i varchar(48) NOT NULL default '', p varchar(255) default NULL,s varchar(48) NOT NULL default '', PRIMARY KEY (i), UNIQUE(p,s)) ENGINE=BDB; INSERT INTO t1 VALUES ('00000000-e6c4ddeaa6-003b8-83458387','programs/xxxxxxxx.wmv','00000000-e6c4ddeb32-003bc-83458387'); SELECT * FROM t1 WHERE p='programs/xxxxxxxx.wmv'; drop table t1; @@ -755,7 +755,7 @@ drop table t1; # Test problem which gave error 'Can't find record in 't1'' # -CREATE TABLE t1 ( STR_DATE varchar(8) NOT NULL default '',INFO_NOTE varchar(200) default NULL,PRIMARY KEY (STR_DATE) ) TYPE=BerkeleyDB; +CREATE TABLE t1 ( STR_DATE varchar(8) NOT NULL default '',INFO_NOTE varchar(200) default NULL,PRIMARY KEY (STR_DATE) ) ENGINE=BerkeleyDB; select INFO_NOTE from t1 where STR_DATE = '20010610'; select INFO_NOTE from t1 where STR_DATE < '20010610'; select INFO_NOTE from t1 where STR_DATE > '20010610'; @@ -765,8 +765,8 @@ drop table t1; # Test problem with multi table delete which quickly shows up with bdb tables. # -create table t1 (a int not null, b int, primary key (a)) type =bdb; -create table t2 (a int not null, b int, primary key (a)) type =bdb; +create table t1 (a int not null, b int, primary key (a)) engine =bdb; +create table t2 (a int not null, b int, primary key (a)) engine =bdb; insert into t1 values (2, 3),(1, 7),(10, 7); insert into t2 values (2, 3),(1, 7),(10, 7); select * from t1; @@ -781,7 +781,7 @@ drop table t1,t2; # The bug #971 # -create table t1 (x int not null, index(x)) type=bdb; +create table t1 (x int not null, index(x)) engine=bdb; insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); select * from t1 where x <= 10 and x >= 7; select * from t1 where x <= 10 and x >= 7 order by x; |