Bug #9744 Server crashs on FLUSH PRIVILEGES;
Submitted: 8 Apr 2005 6:59 Modified: 19 Jul 2005 13:46
Reporter: MySQL-Front Team Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3-beta OS:Windows (Windows XP)
Assigned to: Ingo Strüwing CPU Architecture:Any

[8 Apr 2005 6:59] MySQL-Front Team
Description:
Sometimes the mysqld.exe crashes while executing FLUSH PRIVILEGES;.

Unfortunately I'm unable to offer a reproduceable procedure for this.

But while the last 20 FLUSH PRIVILEGES queries the server crashes more than 10 times:

Die Anweisung in "0x0049fce5" verweist auf Speicher in "0x4a00003b". Der Vorgang "read" konnte nicht auf dem Speicher durchgeführt werden.

Klicken Sie auf "OK" um das Programm zu beenden.
Klicken Sie auf "Abbrechen", um das Programm zu debuggen.

[OK] [Abbrechen]

My translation to english:

The command on "0x0049fce5" pointed to the memory at "0x4a00003b". It's impossible to proceed "read" for this memory.

Click to "OK" for exit program.
Click to "Cancel" for debug program.

[OK] [Cancel]

How to repeat:
FLUSH PRIVILEGES;

But this is only randomly. I feel it depends on some GRANT / REVOKE queries before - but I'm not sure.
[9 Apr 2005 17:14] Jorge del Conde
Hi!

I ran 1000 consecutive FLUSH PRIVILEGES in my system, and I was unable to reproduce the problem.

Do you have another system where you can test this out ?

Thanks
[14 Apr 2005 2:09] MySQL-Front Team
Seems this bug depends on GRANT / REVOKE queries run before the FLUSH PRIVILEGES; query.
[14 Apr 2005 14:44] Jorge del Conde
Hi!

Can you please try to provide us a reproducible test-case that shows this behaviour ? .. maybe the sequence of GRANT/REVOKE statements followed by the FLUSH command ?

Thanks !
[14 Apr 2005 14:49] MySQL-Front Team
Like mentioned in my first comment:

> Unfortunately I'm unable to offer a reproduceable procedure for this.
[15 Apr 2005 15:31] MySQL-Front Team
Maybe a missing table mysql.procs_priv forces this bug...

http://bugs.mysql.com/bug.php?id=9934
[15 Apr 2005 19:11] MySQL Verification Team
With a version 5.0.5 Windows from source and dropping that table
I wasn't able to repeat.
[15 Apr 2005 19:23] MySQL-Front Team
Since I run the mysql_fix_privilege_tables.sql of 5.0.3-beta I was able to run FLUSH PRIVILEGES several times without problems.
[8 Jul 2005 13:25] Carsten Segieth
... seems to be also the reason for crashing the server (5.0.8-beta) on my Windows machine when running the test case "grant". 

Copying the last 3 lines which were processed before the test case crashes the server into a new test file the crash can be reproduced each time this small test case is run:

use mysql;
insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_grantor',CURRENT_TIMESTAMP,'Select','Select');
flush privileges;

A userdump can be sent, but as it's size is zipped ~7MB I'll send it only on request.
[19 Jul 2005 1:41] Jim Winstead
This is probably a duplicate of Bug #11330, which was fixed in 5.0.9.
[19 Jul 2005 12:55] MySQL-Front Team
I've tested 10 times to execute FLUSH PRIVILEGES after updating to 5.0.9-beta: Everytime it works fine.
[19 Jul 2005 13:46] MySQL Verification Team
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

Thank you for the feedback.