Bug #1212 FLUSH PRIVILEGES segfaults in embedded mysql

Submitted: 6 Sep 2003 3:31 Modified: 29 Sep 2003 3:33
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:4.1.1 OS:Linux (Linux)
Assigned to: Alexey Botchkov CPU Architecture:Any

[6 Sep 2003 3:31] Georg Richter
Description:
When you call "FLUSH PRIVILEGES" in embedded server, mysql_query will segfault.
GRANT ALL AND REVOKE work correct:

GRANT ALL ON emb_test.* TO 'foo'@'localhost' identified by 'foobar'
-> failed (Unknown command)
REVOKE ALL ON emb_test.* FROM 'foo'@'localhost'
-> failed (Unknown command)
FLUSH PRIVILEGES
-> Segmentation fault

In 4.0.15 FLUSH PRIVILEGES will show 030906 13:15:30  Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist

How to repeat:
mysql_server_init(0,NULL,NULL);

mysql = mysql_init(NULL);
mysql_real_connect(mysql, NULL, NULL, NULL, "", 0, NULL; 0);

mysql_query(mysql, "FLUSH PRIVILEGES");

Suggested fix:
Don't allow this command
[8 Sep 2003 3:05] Alexey Botchkov
Will be fixed in a few days with the implementing of the privileges conrol in embedded library
[22 Sep 2003 3:03] MySQL Verification Team
I am changing the status to verified since Alexey said that
already he is working in the fix.
[29 Sep 2003 3:33] Alexey Botchkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

fixed after WL#604 (privileges in embedded server)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.