Bug #64519 Cursor with order clause in procedure called from trigger do not sort rows
Submitted: 2 Mar 2012 0:38 Modified: 2 Apr 2012 4:54
Reporter: Piotr Dabrowiecki Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.54 OS:Linux
Assigned to: CPU Architecture:Any
Tags: cursor, order, trigger

[2 Mar 2012 0:38] Piotr Dabrowiecki
Description:
I have a cursor in stored procedure called from after insert trigger on table X.
This cursor joins 4 tables and one of them is X and order clause is based on data from table X. The results of cursor where fetch in order of inserts (last inserted row was first in cursor). 

How to repeat:
I observed this behavior when I was testing my trigger on table X (the called stored procedure is quite complex) with 3 inserts in sequence. The X table didn't had a index that could be used for ordering (After adding index the bad behaviour disappeared)
[2 Mar 2012 4:54] Valeriy Kravchuk
Please, check if the same problem still happens with a newer version, 5.1.61. If it does, please, send complete test case that demonstrates this.
[3 Apr 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".