diff options
author | unknown <monty@donna.mysql.fi> | 2001-04-09 21:08:56 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-04-09 21:08:56 +0300 |
commit | c7105d8008aa42e90e830ede25e7cbf0c22893c0 (patch) | |
tree | 8f547099445a7673d67da016f7a567772cd5552c /mysql-test | |
parent | 5dfbb2ca7bc7fff9db96f1f95315c511a7728780 (diff) | |
download | mariadb-git-c7105d8008aa42e90e830ede25e7cbf0c22893c0.tar.gz |
Fixed INSERT DELAYED with Innobase
Fix for shutdown on NT
Fixed bug when using wrong dates from blob field.
BitKeeper/deleted/.del-df_crash.result~4a3dbee64843953d:
Delete: mysql-test/r/df_crash.result
BitKeeper/deleted/.del-df_crash.test~4c365178fe437f6:
Delete: mysql-test/t/df_crash.test
Docs/manual.texi:
Changelog
innobase/ib_config.h.in:
automatic changed file
innobase/ib_config.h:
automatic changed file
mysql-test/r/func_time.result:
Test case for bug in time functions
mysql-test/r/innobase.result:
Test for INSERT DELAYED
mysql-test/t/func_time.test:
Test case for bug in time functions
mysql-test/t/innobase.test:
Test for INSERT DELAYED
scripts/mysql_convert_table_format.sh:
Added --socket and --port
sql/ha_innobase.cc:
Fix bug when compiling with SAFE_MUTEX
Cleaner comment when using SHOW TABLE STATUS
sql/mysqld.cc:
Fix for shutdown on NT
sql/sql_insert.cc:
Fixed problem with Innobase and INSERT DELAYED
sql/sql_udf.cc:
Support for UDF on windows
sql/time.cc:
Fixed bug when using wrong dates from blob field.
strings/ctype-tis620.c:
Removed not used variable
support-files/mysql-max.spec.sh:
Removed old not used section
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/df_crash.result | 6 | ||||
-rw-r--r-- | mysql-test/r/func_time.result | 4 | ||||
-rw-r--r-- | mysql-test/r/innobase.result | 2 | ||||
-rw-r--r-- | mysql-test/t/df_crash.test | 10 | ||||
-rw-r--r-- | mysql-test/t/func_time.test | 9 | ||||
-rw-r--r-- | mysql-test/t/innobase.test | 62 |
6 files changed, 52 insertions, 41 deletions
diff --git a/mysql-test/r/df_crash.result b/mysql-test/r/df_crash.result deleted file mode 100644 index 5f0c5e1d38a..00000000000 --- a/mysql-test/r/df_crash.result +++ /dev/null @@ -1,6 +0,0 @@ -month(updated) -10 -NULL -year(updated) -1999 -NULL diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 5c55475e628..a24dc044a9a 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -192,3 +192,7 @@ January monthname(date) NULL January +month(updated) +NULL +year(updated) +NULL diff --git a/mysql-test/r/innobase.result b/mysql-test/r/innobase.result index 4e2c659bffb..12f193bbdd9 100644 --- a/mysql-test/r/innobase.result +++ b/mysql-test/r/innobase.result @@ -445,5 +445,7 @@ i j 1 2 MIN(B) MAX(b) 1 1 +a +1 table type possible_keys key key_len ref rows Extra t1 range PRIMARY PRIMARY 4 NULL 1 where used diff --git a/mysql-test/t/df_crash.test b/mysql-test/t/df_crash.test deleted file mode 100644 index 2f83de04d1c..00000000000 --- a/mysql-test/t/df_crash.test +++ /dev/null @@ -1,10 +0,0 @@ -drop table if exists db_crash; -CREATE TABLE df_crash ( - updated text -) TYPE=MyISAM; -INSERT INTO df_crash VALUES ('1999-10-5'); -insert into df_crash values (''); - -select month(updated) from df_crash; -select year(updated) from df_crash; -drop table df_crash; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index f9424ed4320..062cbea9f84 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -119,3 +119,12 @@ insert into t2 values (2, "2000-01-01"); select monthname(date) from t1 inner join t2 on t1.id = t2.id; select monthname(date) from t1 inner join t2 on t1.id = t2.id order by t1.id; drop table t1,t2; + +# +# Test bug with month() and year() on text fields with wrong information + +CREATE TABLE t1 (updated text) TYPE=MyISAM; +INSERT INTO t1 VALUES (''); +SELECT month(updated) from t1; +SELECT year(updated) from t1; +drop table t1; diff --git a/mysql-test/t/innobase.test b/mysql-test/t/innobase.test index 66fb864f93c..ee1bd7cddca 100644 --- a/mysql-test/t/innobase.test +++ b/mysql-test/t/innobase.test @@ -5,7 +5,7 @@ # drop table if exists t1,t2; -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=innobase; +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=innodb; 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; @@ -28,7 +28,7 @@ CREATE TABLE t1 ( PRIMARY KEY (id), KEY parent_id (parent_id), KEY level (level) -) type=innobase; +) type=innodb; 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; @@ -57,7 +57,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=innobase; +) type=innodb; replace into t1 (gesuchnr,benutzer_id) values (2,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); @@ -69,7 +69,7 @@ drop table t1; # test delete using hidden_primary_key # -create table t1 (a int) type=innobase; +create table t1 (a int) type=innodb; insert into t1 values (1), (2); optimize table t1; delete from t1 where a = 1; @@ -77,7 +77,7 @@ select * from t1; check table t1; drop table t1; -create table t1 (a int,b varchar(20)) type=innobase; +create table t1 (a int,b varchar(20)) type=innodb; insert into t1 values (1,""), (2,"testing"); delete from t1 where a = 1; select * from t1; @@ -90,7 +90,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=innobase; +create table t1 (a int,b varchar(20),key(a)) type=innodb; insert into t1 values (1,""), (2,"testing"); select * from t1 where a = 1; drop table t1; @@ -99,7 +99,7 @@ drop table t1; # Test rollback # -create table t1 (n int not null primary key) type=innobase; +create table t1 (n int not null primary key) type=innodb; set autocommit=0; insert into t1 values (4); rollback; @@ -126,7 +126,7 @@ drop table t1; # Testing transactions # -create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=innobase; +create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=innodb; begin; insert into t1 values(1,'hamdouni'); select id as afterbegin_id,nom as afterbegin_nom from t1; @@ -144,7 +144,7 @@ drop table t1; # Simple not autocommit test # -CREATE TABLE t1 (id char(8) not null primary key, val int not null) type=innobase; +CREATE TABLE t1 (id char(8) not null primary key, val int not null) type=innodb; insert into t1 values ('pippo', 12); -- error 1062 insert into t1 values ('pippo', 12); # Gives error @@ -167,12 +167,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=innobase; +CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) TYPE=innodb; INSERT INTO t1 VALUES (1, 'Jochen'); select * from t1; drop table t1; -CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) TYPE=innobase; +CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) TYPE=innodb; set autocommit=0; INSERT INTO t1 SET _userid='marc@anyware.co.uk'; COMMIT; @@ -191,7 +191,7 @@ CREATE TABLE t1 ( ref_email varchar(100) DEFAULT '' NOT NULL, detail varchar(200), PRIMARY KEY (user_id,ref_email) -)type=innobase; +)type=innodb; 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; @@ -212,11 +212,11 @@ show index from t1; drop table t1; # -# Test of ALTER TABLE and innobase tables +# Test of ALTER TABLE and innodb tables # create table t1 (col1 int not null, col2 char(4) not null, primary key(col1)); -alter table t1 type=innobase; +alter table t1 type=innodb; 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'; @@ -228,10 +228,10 @@ select * from t1; drop table t1; # -# INSERT INTO innobase tables +# INSERT INTO innodb tables # -create table t1 (a int not null , b int, primary key (a)) type = innobase; +create table t1 (a int not null , b int, primary key (a)) type = innodb; create table t2 (a int not null , b int, primary key (a)) type = myisam; insert into t1 VALUES (1,3) , (2,3), (3,3); select * from t1; @@ -255,7 +255,7 @@ CREATE TABLE t1 ( passwd varchar(32) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE ggid (ggid) -) TYPE=innobase; +) TYPE=innodb; insert into t1 (ggid,passwd) values ('test1','xxx'); insert into t1 (ggid,passwd) values ('test2','yyy'); @@ -293,7 +293,7 @@ CREATE TABLE t1 ( approved datetime, dummy_primary_key int(11) NOT NULL auto_increment, PRIMARY KEY (dummy_primary_key) -) TYPE=innobase; +) TYPE=innodb; 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); @@ -313,7 +313,7 @@ CREATE TABLE t1 ( KEY (id), KEY parent_id (parent_id), KEY level (level) -) type=innobase; +) type=innodb; 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; @@ -346,7 +346,7 @@ CREATE TABLE t1 ( sca_sch_desc varchar(16), PRIMARY KEY (sca_code, cat_code, lan_code), INDEX sca_pic (sca_pic) -) type = innobase ; +) type = innodb ; 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'; @@ -368,7 +368,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=innobase; +CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) type=innodb; 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; @@ -378,7 +378,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=innobase; +create table t1 (a varchar(100) not null, primary key(a), b int not null) type=innodb; insert into t1 values("hello",1),("world",2); select * from t1 order by b desc; optimize table t1; @@ -388,7 +388,7 @@ drop table t1; # # Test of create index with NULL columns # -create table t1 (i int, j int ) TYPE=innobase; +create table t1 (i int, j int ) TYPE=innodb; insert into t1 values (1,2); select * from t1 where i=1 and j=2; create index ax1 on t1 (i,j); @@ -403,17 +403,29 @@ CREATE TABLE t1 ( a int3 unsigned NOT NULL, b int1 unsigned NOT NULL, UNIQUE (a, b) -) TYPE = innobase; +) TYPE = innodb; INSERT INTO t1 VALUES (1, 1); SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1; drop table t1; # +# Test INSERT DELAYED +# + +CREATE TABLE t1 (a int unsigned NOT NULL) type=innodb; +--error 1031 +INSERT DELAYED INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +SELECT * FROM t1; +DROP TABLE t1; + + +# # Crash when using many tables (Test case by Jeremy D Zawodny) # -create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) type = Innobase; +create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) type = innodb; insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); explain select * from t1 where a > 0 and a < 50; drop table t1; |