Bug #3322 Inserting items after a LOCK TABLES fails

Submitted: 29 Mar 2004 5:12 Modified: 2 Apr 2004 8:07
Reporter: Matt Raines Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.0a OS:Linux (Linux x86)
Assigned to: CPU Architecture:Any

[29 Mar 2004 5:12] Matt Raines
Description:
When I lock tables for writing, then try to insert a row, I get an error that the table 'proc' was not locked. The table I am writing to is not called 'proc'. In fact, there is no 'proc' table in my database, although there is one in the 'mysql' database.

How to repeat:
LOCK TABLES foo WRITE;
INSERT INTO foo VALUES(...);
[30 Mar 2004 6:57] MySQL Verification Team
Worked for me with the latest 5.0.0:

mysql> create table foo (id int(11));
Query OK, 0 rows affected (0.01 sec)

mysql> lock table foo write;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into  foo values (1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0
[30 Mar 2004 8:25] Sergei Golubchik
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.
[2 Apr 2004 8:07] Per-Erik Martin
Just for the record:
This behaviour is typical when using an older mysql database where the
table mysql.proc is missing. This can be fixed by running the script
mysql_fix_privilege_tables (or by doing the CREATE TABLE statement found
there manually).
This is problem was due to a weirdness in the parser at the time of the
first binary release (which forced it to lookup things in this table even
when not obviously needed) - this has since been fixed, which is why it
doesn't happen in the current source version.

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.