[MDEV-10438] Error on row deletion (partitioning by virtual column): Found a row in wrong partition Created: 2016-07-26  Updated: 2017-10-17

Status: Open
Project: MariaDB Server
Component/s: Partitioning
Affects Version/s: 10.1.12, 5.5, 10.0, 10.1
Fix Version/s: 10.1

Type: Bug Priority: Major
Reporter: Sergey Antonyuk Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None
Environment:

3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux



 Description   

Scenario:

  1. CREATE TABLE `t4` (
      `hour` tinyint(3) unsigned AS (HOUR(period)) VIRTUAL,
      `period` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PARTITION BY HASH (`hour`) PARTITIONS 24;
     
    insert into t4 select null, NOW() + INTERVAL RAND()*100 HOUR from seq_1_to_10000;
    

  2. Repeat the following query:

    delete from t4 limit 1000;
    

    Actual result: Error: Found a row in wrong partition.



 Comments   
Comment by Elena Stepanova [ 2016-07-30 ]

Thanks for the report.

It seems the problem has disappeared after this revision in 10.2:

commit f93a2a3b3b5c781c164805f352e9dea948500628
Author: Sergei Golubchik <serg@mariadb.org>
Date:   Wed Jun 29 21:27:34 2016 +0200
 
    various cleanups
    
    * remove a confusing method name - Field::set_default_expression()
    * remove handler::register_columns_for_write()
    * rename stuff
    * add asserts
    * remove unlikely unlikely
    * remove redundant if() conditions
    * fix mark_unsupported_function() to report the most important violation
    * don't scan vfield list for default values (vfields don't have defaults)
    * move handling for DROP CONSTRAINT IF EXIST where it belongs
    * don't protect engines from Alter_inplace_info::ALTER_ADD_CONSTRAINT
    * comments

I'll assign it to serg to confirm it was indeed fixed by the change, and not just masked.

Comment by Elena Stepanova [ 2017-10-17 ]

... and decide whether it needs to be backported into earlier versions.

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