mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
f015cbdc7e
Add ISAM to Windows version Fix of test results Fixes for NULL keys in HEAP tables. Docs/manual.texi: Changelog heap/hp_open.c: Add support for NULL=NULL in keys (for GROUP BY) heap/hp_rkey.c: Cleanup heap/hp_write.c: Cleanup include/config-win.h: Add ISAM to Windows version include/my_base.h: Add support for NULL=NULL in keys (for GROUP BY) libmysqld/Makefile.am: Rename of innobase to innodb myisam/mi_write.c: Add support for NULL=NULL in keys (for GROUP BY) BitKeeper/etc/ignore: Added libmysqld/ha_innodb.cc to the ignore list mysql-test/r/group_by.result: Test of NULL keys in HEAP tables mysql-test/r/heap.result: Test of NULL keys in HEAP tables mysql-test/r/null.result: Cleanup mysql-test/r/order_by.result: Fix for result of new ORDER BY optimization mysql-test/t/group_by.test: Test of NULL keys in HEAP tables mysql-test/t/heap.test: Test of NULL keys in HEAP tables mysql-test/t/null.test: Cleanup sql/ha_heap.cc: Add support of NULL keys sql/item_strfunc.h: Fix for BINARY and CAST functions sql/item_timefunc.h: Fix for BINARY and CAST functions sql/sql_parse.cc: Cleanup sql/sql_select.cc: Add support for NULL=NULL in keys (for GROUP BY)
36 lines
1.4 KiB
Text
36 lines
1.4 KiB
Text
#
|
|
# Testing of NULL in a lot of different places
|
|
#
|
|
|
|
select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
|
|
select 1 | NULL,1 & NULL,1+NULL,1-NULL;
|
|
select NULL=NULL,NULL<>NULL,IFNULL(NULL,1.1)+0,IFNULL(NULL,1) | 0;
|
|
select strcmp("a",NULL),(1<NULL)+0.0,NULL regexp "a",null like "a%","a%" like null;
|
|
select concat("a",NULL),replace(NULL,"a","b"),replace("string","i",NULL),replace("string",NULL,"i"),insert("abc",1,1,NULL),left(NULL,1);
|
|
select repeat("a",0),repeat("ab",5+5),repeat("ab",-1),reverse(NULL);
|
|
select field(NULL,"a","b","c");
|
|
select 2 between null and 1,2 between 3 AND NULL,NULL between 1 and 2,2 between NULL and 3, 2 between 1 AND null;
|
|
SELECT NULL AND NULL, 1 AND NULL, NULL AND 1, NULL OR NULL, 0 OR NULL, NULL OR 0;
|
|
SELECT (NULL OR NULL) IS NULL;
|
|
select NULL AND 0, 0 and NULL;
|
|
select inet_ntoa(null),inet_aton(null),inet_aton("122.256"),inet_aton("122.226."),inet_aton("");
|
|
|
|
drop table if exists t1;
|
|
create table t1 (x int);
|
|
insert into t1 values (null);
|
|
select * from t1 where x != 0;
|
|
drop table t1;
|
|
|
|
#
|
|
# Test problem med index on NULL columns and testing with =NULL;
|
|
#
|
|
|
|
CREATE TABLE t1 (
|
|
indexed_field int default NULL,
|
|
KEY indexed_field (indexed_field)
|
|
);
|
|
INSERT INTO t1 VALUES (NULL),(NULL);
|
|
SELECT * FROM t1 WHERE indexed_field=NULL;
|
|
SELECT * FROM t1 WHERE indexed_field IS NULL;
|
|
SELECT * FROM t1 WHERE indexed_field<=>NULL;
|
|
DROP TABLE t1;
|