Bug #24332 mysql client crashes with long-running command
Submitted: 15 Nov 2006 10:02 Modified: 20 Jan 2007 15:05
Reporter: Osku Salerma Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.1 OS:Linux (linux)
Assigned to: Assigned Account CPU Architecture:Any

[15 Nov 2006 10:02] Osku Salerma
Description:
The command line client crashed when I ran a ~33h command with the latest public 5.1 tree:

mysql> delete from bulk where id < 1619499;
Segmentation fault

bulk is a 8.6 GB table with 16 million rows; this deletes 10% of them. The server was fine, and 1619499 rows were deleted as should have been, so this is purely a client problem.

I don't have the time to try repeating this, but if the client does crash with every >30h command, it should be easy enough to fix.

How to repeat:
Try running a command that takes more than 30 hours.
[20 Dec 2006 15:05] Sveta Smirnova
Thank you for the report.

I can not repeat problem using below code:

USE test;

DROP PROCEDURE IF EXISTS bug24332;

DELIMITER |

CREATE PROCEDURE bug24332()
BEGIN
  DECLARE v1 DATETIME;
  DECLARE v2 INT DEFAULT 0;
  
  SET v1 = NOW() + INTERVAL 33 HOUR;

  WHILE v1 > NOW() DO
    SET v2 = v2 + 1;
  END WHILE;
END
|

DELIMITER ;

CALL bug24332();

Please try to repeat it using same procedure on your version and say results.
[21 Jan 2007 0: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".