Bug #11243 MySql service crash
Submitted: 10 Jun 2005 12:54 Modified: 10 Jun 2005 14:51
Reporter: Stefan Patra Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:4.1.12a OS:Windows (Windows XP Pro)
Assigned to: CPU Architecture:Any

[10 Jun 2005 12:54] Stefan Patra
Description:
I hava a currency rates table (CURSBNR) with 3 columns.
I've executed an UNION query and the MySQL service crashed with a generic error message:

The instruction as "0x00515a21" referenced memory at "0x00cb5000".
The memory could not be "written".
...

I'll put some extras from mysql.exe command line client:

Your MySQL connection id is 2 to server version: 4.1.12a-nt
mysql> SHOW COLUMNS FROM CURSBNR;
+--------+---------+------+-----+------------+-------+
| Field  | Type    | Null | Key | Default    | Extra |
+--------+---------+------+-----+------------+-------+
| DATA   | date    |      | PRI | 0000-00-00 |       |
| VALUTA | char(3) |      | PRI |            |       |
| CURS   | double  |      |     | 0          |       |
+--------+---------+------+-----+------------+-------+
3 rows in set (0.00 sec)
mysql> (SELECT FORMAT(SUM(CURS),0) FROM CURSBNR) UNION (SELECT FORMAT(SUM(CURS),
0) FROM CURSBNR);
ERROR 2013 (HY000): Lost connection to MySQL server during query

The UNION query without the FORMAT function works just fine.

How to repeat:
After restarting the service reexecute the UNION query.
[10 Jun 2005 14:15] Jorge del Conde
Hi

Can you please upload the three tables (or their definitions) that you used to produce this crash ?

Thanks!
[10 Jun 2005 14:17] Stefan Patra
frm file

Attachment: cursbnr.frm (application/octet-stream, text), 8.42 KiB.

[10 Jun 2005 14:18] Stefan Patra
myd file

Attachment: cursbnr.MYD (application/octet-stream, text), 270 bytes.

[10 Jun 2005 14:18] Stefan Patra
myi file

Attachment: cursbnr.MYI (application/octet-stream, text), 3.00 KiB.

[10 Jun 2005 14:18] Stefan Patra
Done.
[10 Jun 2005 14:51] MySQL Verification Team
I was unable to repeat with current BK source server:

C:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.13-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW COLUMNS FROM CURSBNR;
+--------+---------+------+-----+------------+-------+
| Field  | Type    | Null | Key | Default    | Extra |
+--------+---------+------+-----+------------+-------+
| DATA   | date    |      | PRI | 0000-00-00 |       |
| VALUTA | char(3) |      | PRI |            |       |
| CURS   | double  |      |     | 0          |       |
+--------+---------+------+-----+------------+-------+
3 rows in set (0.03 sec)

mysql> (SELECT FORMAT(SUM(CURS),0) FROM CURSBNR) UNION (SELECT
    -> FORMAT(SUM(CURS),
    -> 0) FROM CURSBNR);
+---------------------+
| FORMAT(SUM(CURS),0) |
+---------------------+
| 387,235             |
+---------------------+
1 row in set (0.02 sec)

mysql>
[10 Jun 2005 14:56] Stefan Patra
K. I suppose in v.4.1.13 this bug is solved.
I'll try my query when this version will be public.
Thanks.