diff options
author | unknown <monty@hundin.mysql.fi> | 2002-10-16 13:11:25 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-10-16 13:11:25 +0300 |
commit | 7013d8ef0ae0a21fadfcc0a159ee1d83fdad8a9d (patch) | |
tree | d165b4baadac24102545d94c8f9fe180537a64f5 /mysql-test | |
parent | e1d7b8414f14de681127f4e19340e4f7737d5bdb (diff) | |
parent | 74b73109c1304e62430faa85d2a63a6f2ffa626d (diff) | |
download | mariadb-git-7013d8ef0ae0a21fadfcc0a159ee1d83fdad8a9d.tar.gz |
Merge with 3.23.54
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-LICENSE~4cfaff8de837acb8:
Auto merged
BitKeeper/deleted/.del-MySQLEULA.txt:
Delete: Docs/MySQLEULA.txt
BitKeeper/deleted/.del-global.h~e80d28157acfdcb5:
Auto merged
Build-tools/mysql-copyright-2:
Auto merged
Build-tools/mysql-copyright:
Auto merged
heap/heapdef.h:
Auto merged
heap/hp_open.c:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/os/os0thread.c:
Auto merged
myisam/mi_open.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/t/null_key.test:
Auto merged
mysys/safemalloc.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
scripts/mysqlhotcopy.sh:
Auto merged
sql/field.h:
Auto merged
sql/field_conv.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/item.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
tests/grant.res:
Auto merged
Build-tools/Do-compile:
merge
Docs/manual.texi:
merge
configure.in:
merge
mysql-test/r/distinct.result:
merge
mysql-test/r/null_key.result:
merge
sql/ha_innodb.cc:
merge
sql/item.h:
merge
sql/log.cc:
merge
sql/mysqld.cc:
merge
support-files/mysql.spec.sh:
merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/distinct.result | 2 | ||||
-rw-r--r-- | mysql-test/r/null_key.result | 6 | ||||
-rw-r--r-- | mysql-test/t/null_key.test | 44 |
3 files changed, 51 insertions, 1 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 68fb8c39e6c..c9b90094f77 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -190,7 +190,7 @@ insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary -t3 ref a a 5 t1.a 10 Using index; Distinct +t3 ref a a 5 t1.a 10 where used; Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a 1 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index a28830a696d..91cd9dbbc7c 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -188,4 +188,10 @@ id uniq_id 4 2 7 3 8 4 +order_id product_id product_type +order_id product_id product_type +3d7ce39b5d4b3e3d22aaafe9b633de51 1206029 3 +3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3 +id id +id id DROP table t1,t2; diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index e5d8fc59e4f..3ab8b993f43 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -91,3 +91,47 @@ DELETE FROM t2 WHERE uniq_id IS NULL; SELECT * FROM t1 ORDER BY uniq_id, id; SELECT * FROM t2 ORDER BY uniq_id, id; DROP table t1,t2; + +# +# This crashed MySQL 3.23.47 +# + +CREATE TABLE `t1` ( + `order_id` char(32) NOT NULL default '', + `product_id` char(32) NOT NULL default '', + `product_type` int(11) NOT NULL default '0', + PRIMARY KEY (`order_id`,`product_id`,`product_type`) +) TYPE=MyISAM; +CREATE TABLE `t2` ( + `order_id` char(32) NOT NULL default '', + `product_id` char(32) NOT NULL default '', + `product_type` int(11) NOT NULL default '0', + PRIMARY KEY (`order_id`,`product_id`,`product_type`) +) TYPE=MyISAM; +INSERT INTO t1 (order_id, product_id, product_type) VALUES +('3d7ce39b5d4b3e3d22aaafe9b633de51',1206029, 3), +('3d7ce39b5d4b3e3d22aaafe9b633de51',5880836, 3), +('9d9aad7764b5b2c53004348ef8d34500',2315652, 3); +INSERT INTO t2 (order_id, product_id, product_type) VALUES +('9d9aad7764b5b2c53004348ef8d34500',2315652, 3); + +select t1.* from t1 +left join t2 using(order_id, product_id, product_type) +where t2.order_id=NULL; +select t1.* from t1 +left join t2 using(order_id, product_id, product_type) +where t2.order_id is NULL; +drop table t1,t2; + +# +# The last select returned wrong results in 3.23.52 +# + +create table t1 (id int); +insert into t1 values (null), (0); +create table t2 (id int); +insert into t2 values (null); +select * from t1, t2 where t1.id = t2.id; +alter table t1 add key id (id); +select * from t1, t2 where t1.id = t2.id; +drop table t1,t2; |