Bug #19316 Partitions: hang if update with order by in procedure
Submitted: 24 Apr 2006 21:38 Modified: 14 Jun 2006 21:39
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.12-beta-debug, 5.1.10-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[24 Apr 2006 21:38] Peter Gulutzan
Description:
I create a table with range partitioning.
I insert a row.
I create a procedure which will update to an illegal value.
One of the UPDATE statements has an ORDER BY clause.
I call the procedure.
It hangs.

How to repeat:
mysql> delimiter //
mysql> create table tz (s1 int) partition by range (s1) (partition p1 values less than (100))//
Query OK, 0 rows affected (0.08 sec)

mysql> insert into tz values (99)//
Query OK, 1 row affected (0.00 sec)

mysql> create procedure pz () begin declare continue handler for sqlexception begin end; update tz set s1 = 100; update tz set s1 = 100 order by s1; end//
Query OK, 0 rows affected (0.00 sec)

mysql> call pz()//

/* there is no return */
[24 Apr 2006 22:42] MySQL Verification Team
Thank you for the bug report. Verified as reported.
[29 May 2006 7:41] Mikael Ronström
Could not reproduce this with latest bk version
[29 May 2006 21:04] Valeriy Kravchuk
Verified just as described with 5.1.12-BK (ChangeSet@1.2172, 2006-05-29 15:43:00+02:00).
[14 Jun 2006 21:39] Mikael Ronström
This bug is a side effect on an SP bug. There is an SP bug that causes
execution of the procedure to continue even after a fatal error occurred on
the previous statement.

This is what happens here. The fact that the query before got a fatal error is
however a bug and this bug is BUG#17138.

So this bug is a duplicate of bug#17138 and the SP bug that I don't remember the
number of.