fix deletion of partitioned tables

* when the WHERE clause had no match all partitions were deleted