Bug #22845 Falcon: hang on partition drop

Submitted: 29 Sep 2006 21:57 Modified: 13 Jun 2007 23:50
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:5.1.12-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: CPU Architecture:Any

[29 Sep 2006 21:57] Peter Gulutzan
Description:
I have two connections running transactions, call them T1 and T2.

On T1, I create a partitioned table.

On T2, I insert into the table.

On T1, I try to drop the partition which T2 has changed. Error message. Okay.

On T1, I try again to drop the partition.

Hang.

How to repeat:
On T1, say:
create database d12;
use d12
set @@autocommit=0;
create table t9 (s1 int)
engine=falcon
partition by list (s1)
(partition p1 values in (1),
 partition p2 values in (2),
 partition p3 values in (null));
start transaction;

On T2, say:
use d12
set @@autocommit=0;
start transaction;
insert into t9 values (2);

On T1, say:
alter table t9 drop partition p2;          /* Error message */
alter table t9 drop partition p2;          /* Hang */

On T2, say "commit" or rollback" if you like -- it won't help.
[4 Oct 2006 5:38] Hakan Küçükyılmaz
Tested on Linux 32-bit, change set 1.2364, 2006-10-03 

[07:34] root@d12>alter table t9 drop partition p2;
ERROR 1296 (HY000): Got error 156 'table D12.T9#P#P2 has uncommitted updates and can't be dropped' from Falcon

This is intended behaviour of Falcon.

Try with:
T1:
create database d12;
use d12
set @@autocommit=0;
create table t9 (s1 int)
engine=falcon
partition by list (s1)
(partition p1 values in (1),
 partition p2 values in (2),
 partition p3 values in (null));
start transaction;

T2:
use d12
set @@autocommit=0;
start transaction;
insert into t9 values (2);
COMMIT;

T1:
alter table t9 drop partition p2;  

[07:42] root@d12>alter table t9 drop partition p2;
Query OK, 0 rows affected (0.22 sec)
Records: 0  Duplicates: 0  Warnings: 0

Regards, Hakan
[5 Oct 2006 15:53] Hakan Küçükyılmaz
Please note the COMMIT on T2:

insert into t9 values (2);
COMMIT;

Background: In Falcon one cannot drop objects with pending transactions.

Regards, Hakan
[5 Oct 2006 17:34] Hakan Küçükyılmaz
Verified on Linux 32-bit, change set 1.2368, 2006-10-04.

A COMMIT on T2 does not help. T1 hangs. Reproduced like:

T1, say:
create database d12;
use d12
set @@autocommit=0;
create table t9 (s1 int)
engine=falcon
partition by list (s1)
(partition p1 values in (1),
 partition p2 values in (2),
 partition p3 values in (null));
start transaction;

T2, say:
use d12
set @@autocommit=0;
start transaction;
insert into t9 values (2);

T1, say:
alter table t9 drop partition p2;
[19:33] root@d12>alter table t9 drop partition p2;
ERROR 1296 (HY000): Got error 156 'table D12.T9#P#P2 has uncommitted updates and can't be dropped' from Falcon

T2, say:
COMMIT;

T1, say:
alter table t9 drop partition p2;
-- hang

CPU usage goes up to 100%

Regards, Hakan
[20 Oct 2006 9:48] Hakan Küçükyılmaz
I tried it with InnoDB and it works. With Falcon it still hangs. Added test case falcon_bug_22845.test

Regards, Hakan
[13 Jun 2007 23:50] Calvin Sun
can not reproduce it with a recent binary. The connection 1 returns error for second alter table:

mysql> alter table t9 drop partition p2;
ERROR 1015 (HY000): Can't lock file (errno: 212)
mysql> alter table t9 drop partition p2;
ERROR 1015 (HY000): Can't lock file (errno: 212)

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

Page generated in 0.058 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.