summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-06-19 14:30:12 +0300
committermonty@hundin.mysql.fi <>2001-06-19 14:30:12 +0300
commit72fb81e888b5c5f9c1c7917709568d61cfb6663f (patch)
tree884d89c2f53eae988fe08259ab2953720d274ab2 /mysql-test
parent16d50ca46d41060240dffc761f12144395150ff6 (diff)
downloadmariadb-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')
-rw-r--r--mysql-test/r/bdb.result2
-rw-r--r--mysql-test/r/bigint.result6
-rw-r--r--mysql-test/r/count_distinct.result2
-rw-r--r--mysql-test/t/bdb.test10
-rw-r--r--mysql-test/t/bigint.test8
-rw-r--r--mysql-test/t/count_distinct.test10
6 files changed, 36 insertions, 2 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
index 5e227313e4a..c88b7375aec 100644
--- a/mysql-test/r/bdb.result
+++ b/mysql-test/r/bdb.result
@@ -509,3 +509,5 @@ id id3
1 1
2 2
100 2
+KINMU_DATE
+KINMU_DATE
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 08e21b279bc..46ce0fda2c1 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -5,5 +5,11 @@
+9999999999999999999 -9999999999999999999
10000000000000000000 -10000000000000000000
a
+18446744073709551614
18446744073709551615
+a
+18446744073709551615
+a
18446744073709551615
+a
+18446744073709551614
diff --git a/mysql-test/r/count_distinct.result b/mysql-test/r/count_distinct.result
index 6fc10f590ec..97d7b57f249 100644
--- a/mysql-test/r/count_distinct.result
+++ b/mysql-test/r/count_distinct.result
@@ -7,3 +7,5 @@ isbn city libname a
isbn city libname a
007 Berkeley Berkeley Public1 2
000 New York New York Public Libra 2
+f1 count(distinct t2.f2) count(distinct 1,NULL)
+1 0 0
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;