diff options
author | monty@hundin.mysql.fi <> | 2001-06-19 14:30:12 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-06-19 14:30:12 +0300 |
commit | 72fb81e888b5c5f9c1c7917709568d61cfb6663f (patch) | |
tree | 884d89c2f53eae988fe08259ab2953720d274ab2 /mysql-test/t | |
parent | 16d50ca46d41060240dffc761f12144395150ff6 (diff) | |
download | mariadb-git-72fb81e888b5c5f9c1c7917709568d61cfb6663f.tar.gz |
Fixed bug in mysqlcheck when using --fast
Fixed problem when converting bigint to double.
Fixed bug in count(distinct null)
Fixed bug with empty BDB tables.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/bdb.test | 10 | ||||
-rw-r--r-- | mysql-test/t/bigint.test | 8 | ||||
-rw-r--r-- | mysql-test/t/count_distinct.test | 10 |
3 files changed, 26 insertions, 2 deletions
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 96296e238fd..c61a6c7197d 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -705,3 +705,13 @@ commit; select id,id3 from t1; UNLOCK TABLES; 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; +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; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 9a819463f3f..6470b6f6a30 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -6,7 +6,11 @@ select 9223372036854775807,-009223372036854775808; select +9999999999999999999,-9999999999999999999; drop table if exists t1; -create table t1 (a bigint unsigned); -insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFF); +create table t1 (a bigint unsigned not null, primary key(a)); +insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); +select * from t1; +select * from t1 where a=18446744073709551615; +select * from t1 where a='18446744073709551615'; +delete from t1 where a=18446744073709551615; select * from t1; drop table t1; diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test index 1afb548c2ad..3d795d44821 100644 --- a/mysql-test/t/count_distinct.test +++ b/mysql-test/t/count_distinct.test @@ -32,3 +32,13 @@ insert into t1 values ('NYC Lib','New York'); select t2.isbn,city,t1.libname,count(t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city,t1.libname; select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1; drop table t1, t2, t3; + +# +# Problem with LEFT JOIN +# + +create table t1 (f1 int); +insert into t1 values (1); +create table t2 (f1 int,f2 int); +select t1.f1,count(distinct t2.f2),count(distinct 1,NULL) from t1 left join t2 on t1.f1=t2.f1 group by t1.f1; +drop table t1,t2; |