At 16:09 -0800 11/23/04, Gary Richardson wrote:
Hey guys,
We just had a small incident. I was hoping for confirmation on why
it happened.
A person updated a large table. They were trying to update one record
but due to keyboard fumbling sent the update without a where
statement. Left unchecked, it would have made a lot of records in the
database identical.
The table has around 6 million rows and is InnoDB. The command was
entered from the standard command line client.
The query ran for under 60 seconds before it was killed. As we were
preping to restore the table from backups, someone did a group by to
find out how many rows got fragged. It turns out the command didn't
affect the table at all.
I have two guesses as to why this happened:
1) For Inno tables, entering an update query actually runs BEGIN;
$query; COMMIT; Killing the query prevented the commit from happening.
The query was still running when it was killed (at least, that's what
it sounds like). Given that a query can't be committed until after
it finishes, the commit never happened.
2) The first 60 seconds of the query were spent preparing or sorting
or something.
Most likely I'm thinking it was #1, but I just wanted to see if that's
actually the case.
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]