Bug #2757 --read-only gives weird error on update
Submitted: 12 Feb 2004 14:14 Modified: 28 Feb 2004 14:39
Reporter: Harrison Fisk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.17 OS:Windows (Windows 2000)
Assigned to: Guilhem Bichot CPU Architecture:Any

[12 Feb 2004 14:14] Harrison Fisk
Description:
If you start up the server with the --read-only option, and try to drop a table, then it will give an odd error.  It still works and prevents you from doing it, but definately not what one expects.

The error it gives is:
foo:world~> drop table nccaps;
ERROR 1223: Can't execute the query because you have a conflicting read lock

How to repeat:
-- start mysqld with --read-only
-- or you can set it on the fly with:
SET GLOBAL read_only=1;

-- login as a non-root user
-- try to drop a table, or do any other operation
drop table foo;

-- see error 
ERROR 1223: Can't execute the query because you have a conflicting read lock

Suggested fix:
Change the error message to be something a bit more helpful, mentioning the read-only setting in the server.
[12 Feb 2004 14:53] Guilhem Bichot
Will fix this in 4.1.2 (4.0 branch is too frozen)
[28 Feb 2004 14:39] Guilhem Bichot
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

Additional info:

Fixed in 4.1 in ChangeSet@1.1696.28.1, 2004-02-21 15:15:26+01:00, guilhem@mysql.com