Bug #10180 Table corruption when two users works with same table without locking
Submitted: 26 Apr 2005 15:18 Modified: 27 May 2005 13:50
Reporter: Sergio Costas Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version: OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[26 Apr 2005 15:18] Sergio Costas
Description:
I created a program that inserts data from forms into the database. Each time the user ends filling the form, it's sent to MySQL. When only a user works with the table in a local MySQL server, all works fine, but when two users works simultaneously, one in the same computer than the server and the other via network, there occurse serious table corruption.

After adding LOCK and UNLOCK commands in all commands that modifies the tables, the error got fixed. But there should not be needed to do this, since the commands are supposed to be atomic.

It occurred with the last 3.x version of MySQL and the 4.0.x versions. I don't know if it's already fixed because I didn't work more with MySQL.

How to repeat:
Create concurrent reads and writes, one in local and other from a remote computer.

Suggested fix:
no idea.
[27 Apr 2005 8:16] Geert Vanderkelen
Hi Sergio,

Would need a bit more info:
- What engine? MyISAM or InnoDB or ..?
- What exact version of MySQL?
- What connectors are used? None or ODBC?
- What kind of table corruption? What is the message returned by CHECK TABLE?

Regards,

Geert
[27 Apr 2005 8:36] Sergio Costas
Ops... sorry.

I used MyISAM, and worked directly with your C library. I tried several releases of the 3.23 and 4.0 versions, and all of them had this bug.

About the error returned by CHECK TABLE, I don't remember it exactly, but it was about that one client didn't close the table, like an operation don't finished.

Thanks for your efforts, and sorry if I'm not able to give a more specific info.
[27 Apr 2005 13:50] MySQL Verification Team
Thank you for writting this report.

This bug report forum is only for repeatable bug reports.
What we need is fully repeatable test case.

This test case should consist of the series of SQL commands or actaions that will always lead to the problem, in your case to the crash.

In your case, please send us a set of SQL commands for each of the users that will run those in parallel and produce corruption.

Thanks in advance.
[27 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".