diff options
author | monty@mashka.mysql.fi <> | 2002-11-22 13:38:37 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-11-22 13:38:37 +0200 |
commit | b6446addf71b223a3c842ccccfacf0949fe97a40 (patch) | |
tree | d7ae45b828a389751dd4e9225ec1c1d2150e127e /mysql-test | |
parent | a7fe266e54ae842978baf1662d612f27a1e86d4e (diff) | |
parent | e1af5fb24d986d1b810415fe31af9fa5c88c4102 (diff) | |
download | mariadb-git-b6446addf71b223a3c842ccccfacf0949fe97a40.tar.gz |
Merge work:/home/bk/mysql into mashka.mysql.fi:/home/my/mysql-3.23
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 3 | ||||
-rw-r--r-- | mysql-test/r/null_key.result | 17 | ||||
-rw-r--r-- | mysql-test/t/null_key.test | 21 |
3 files changed, 40 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 514ef9e704a..fcddf52c66b 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -249,6 +249,7 @@ SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid" SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log" SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err" +CLIENT_MYLOG="$MYSQL_TEST_DIR/var/log/client.log" SMALL_SERVER="-O key_buffer_size=1M -O sort_buffer=256K -O max_heap_table_size=1M" export MASTER_MYPORT @@ -344,7 +345,7 @@ SLAVE_MYSQLD=$MYSQLD #this can be changed later if we are doing gcov #-- wait_for_server_start () { - $MYSQLADMIN --no-defaults -u $DBUSER --silent -O connect_timeout=10 -w3 --host=$hostname --port=$1 ping >/dev/null 2>&1 + $MYSQLADMIN --no-defaults -u $DBUSER --silent -O connect_timeout=10 -w3 --host=$hostname --port=$1 ping >> $CLIENT_MYLOG 2>&1 exit_code=$? if [ $exit_code != 0 ]; then echo "Error: Could not start $2, exit code $exit_code"; diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index a0f88b804aa..46bcbebe170 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -126,3 +126,20 @@ order_id product_id product_type 3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3 id id id id +id id2 +NULL 0 +1 1 +id id2 +NULL 0 +id id2 +NULL 0 +1 1 +id id2 +NULL 0 +1 1 +id id2 +1 1 +id id2 +1 1 +id id2 +1 1 diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index 3ab8b993f43..b1cbd5cdfb0 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -135,3 +135,24 @@ 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; + +# +# Check bug when doing <=> NULL on an indexed null field +# + +create table t1 ( + id integer, + id2 integer not null, + index (id), + index (id2) +); +insert into t1 values(null,null),(1,1); +select * from t1; +select * from t1 where id <=> null; +select * from t1 where id <=> null or id > 0; +select * from t1 where id is null or id > 0; +select * from t1 where id2 <=> null or id2 > 0; +select * from t1 where id2 is null or id2 > 0; +delete from t1 where id <=> NULL; +select * from t1; +drop table t1; |