diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-10-06 16:22:15 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-10-06 16:22:15 +0200 |
commit | c6e67a9b04289ccf78f5f11485c34875ddf8ad89 (patch) | |
tree | d9308e481af7e82829423a1f7d70f0ebc9fa598f /mysql-test/t/partition_column.test | |
parent | 01072e22fe7cc5e7a53e9ea0a065ba22027d52bf (diff) | |
download | mariadb-git-c6e67a9b04289ccf78f5f11485c34875ddf8ad89.tar.gz |
BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record
Diffstat (limited to 'mysql-test/t/partition_column.test')
-rw-r--r-- | mysql-test/t/partition_column.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index 4edb03405b5..5eef85b4fa2 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -8,6 +8,33 @@ drop table if exists t1; --enable_warnings +# +# BUG#47838, List partitioning have problems with <= and >= +# +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; +select * from t1 where a is null; +explain partitions select * from t1 where a is null; +select * from t1 where a <= 1; +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; +select * from t1 where a is null; +explain partitions select * from t1 where a is null; +select * from t1 where a <= 1; +drop table t1; + create table t1 (a int, b int) partition by list column_list(a,b) ( partition p0 values in (column_list(1, NULL), column_list(2, NULL), |