diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-10-06 16:22:54 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-10-06 16:22:54 +0200 |
commit | 2ef1c756db41b003f6e634104f9024cdb4f2b982 (patch) | |
tree | 5a9c201e4c85d6a70c25248afc77e589b29e3747 | |
parent | c6e67a9b04289ccf78f5f11485c34875ddf8ad89 (diff) | |
download | mariadb-git-2ef1c756db41b003f6e634104f9024cdb4f2b982.tar.gz |
BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record, added more tests
-rw-r--r-- | mysql-test/r/partition_column.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index f5b5b49de56..621a127f310 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,11 +1,37 @@ drop table if exists t1; create table t1 (a int signed) +partition by list (a) +( partition p0 values in (1, 3, 5, 7, 9, NULL), +partition p1 values in (2, 4, 6, 8, 0)); +insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8); +select * from t1 where NULL <= a; +a +select * from t1 where a is null; +a +NULL +explain partitions select * from t1 where a is null; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where +select * from t1 where a <= 1; +a +1 +0 +drop table t1; +create table t1 (a int signed) partition by list column_list(a) ( partition p0 values in (column_list(1), column_list(3), column_list(5), column_list(7), column_list(9), column_list(NULL)), partition p1 values in (column_list(2), column_list(4), column_list(6), column_list(8), column_list(0))); insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8); +select * from t1 where a <= NULL; +a +select * from t1 where a is null; +a +NULL +explain partitions select * from t1 where a is null; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where select * from t1 where a <= 1; a 1 |