Bug #20852 Partitions: crash if hash, innodb, composite primary key

Submitted: 4 Jul 2006 18:36 Modified: 19 Jul 2006 4:29
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.12-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Mikael Ronström CPU Architecture:Any

[4 Jul 2006 18:36] Peter Gulutzan
Description:
I create an InnoDB table with a 3-column primary key.
The last column in the primary key is the partition column (partition by hash).
I put 1,000 rows in the table.
I try to update one row.
The consequences are severe -- I have to 'kill -9' to get rid of the server.

How to repeat:
create procedure pc ()
begin
  declare v int default 0;
  create table t (s1 int, s2 timestamp, s3 decimal(10), primary key (s3,s2,s1)) engine=innodb partition by hash (s1);
  while v < 1000 do
    select 'insert', v;
    insert into t values (v, current_timestamp, 0);
    set v = v + 1;
    end while;
  update t set s3 = s3 + 1, s2 = current_timestamp where s1 = 462;
  end;//
call pc()//
[4 Jul 2006 19:00] MySQL Verification Team
Thank you for the bug report.
[12 Jul 2006 12:38] Mikael Ronström
It seems to be a InnoDB bug related to using rnd_init/rnd_next in an update
that changes the primary key.
[12 Jul 2006 22:52] Mikael Ronström
Fixed two missing variable assignments which are part of the handler interface
[18 Jul 2006 8:56] Mikael Ronström
Will appear in 5.1.12
[19 Jul 2006 4:29] Jon Stephens
Documented bugfix in 5.1.12 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.