[MDEV-10763] Wrong result - server does not return NULL values from default list partition after ALTER table Created: 2016-09-07  Updated: 2016-09-09  Resolved: 2016-09-09

Status: Closed
Project: MariaDB Server
Component/s: Partitioning
Affects Version/s: 10.2
Fix Version/s: 10.2.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-8348 Add catchall to all table partitionin... Closed
Sprint: 10.2.2-3

 Description   

Output

MariaDB [test]> create table t1 (i int) partition by list (i) ( partition p1 default);
Query OK, 0 rows affected (0.62 sec)
 
MariaDB [test]> insert into t1 values (null);
Query OK, 1 row affected (0.08 sec)
 
MariaDB [test]> select * from t1 where i is null;
+------+
| i    |
+------+
| NULL |
+------+
1 row in set (0.00 sec)
 
MariaDB [test]> alter table t1 partition by list (i) ( partition p1 values in (1), partition p2 default);
Query OK, 1 row affected (1.38 sec)
Records: 1  Duplicates: 0  Warnings: 0
 
MariaDB [test]> select * from t1 where i is null;
Empty set (0.01 sec)

Test case

create table t1 (i int) partition by list (i) ( partition p1 default);
insert into t1 values (null);
select * from t1 where i is null;
alter table t1 partition by list (i) ( partition p1 values in (1), partition p2 default);
select * from t1 where i is null;



 Comments   
Comment by Oleksandr Byelkin [ 2016-09-08 ]

revision-id: da23542ce515c27b7999b8d5603cb8fcf4464826 (mariadb-10.1.8-242-gda23542)
parent(s): effb65bc863da0f1115e16ef5f11d11a13cdc7a0
committer: Oleksandr Byelkin
timestamp: 2016-09-08 16:47:14 +0200
message:

MDEV-10763: Wrong result - server does not return NULL values from default list partition after ALTER table

Fixed partition pruning for NULL value.

Comment by Sergei Petrunia [ 2016-09-08 ]

Ok to push.

Generated at Thu Feb 08 07:44:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.