List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:December 27 1999 9:44pm
Subject:Insert delayed causing table corruption?
View as plain text  
Hi!

>>>>> "struanb" == struanb  <struanb@stripped> writes:

>> Description:
struanb> Our high-load database application involves large numbers of "insert delayed"
> statements to four separate tables (out of fifteen tables used by our application).
> Several times a week, we notice that MySQL is processing slowly. After running isamchk on
> each table, we discover corruption in only those tables to which we write using "insert
> delayed".

>> From the mysql.err file, it appears that the corruption of the tables are
> preceded (if not caused) by a MySQL crash.

struanb> During various tests, we have managed to observe MySQL crashing following
> execution of "insert delayed" statements on a similar system.

struanb> In the mysql.err file we sometimes (but not always) get lines such as:

struanb> "Delayed insert thread couldn't get requested lock for table XYZ"

struanb> (in fact we get hundreds of thousands of these when we get them at all!)

>> How-To-Repeat:
struanb> Don't know for sure. Try lots of "insert delayed" statements mixed with other
> statements on tables with hundreds of thousands of rows.

>> Fix:
struanb> Shutdown MySQL and then run isamchk -r on affected tables.
struanb> Alternatively, avoiding use of "insert delayed" may prevent this problem.

The glibc Linux library has a fatal bug in pthread_cond_timedwait()
that is used in MySQL when you use INSERT DELAYED.  MySQL 3.23.7 has and
MySQL 3.22.8 will have a workaround for this.

Regards
Monty

PS: Starting next year we will create a new mailing list:
    bugs@stripped ;  To this list we will only accept bug reports,
    posted with mysqlbug and with a repeatable example. All MySQL
    developers will subscribe and read this list! This will ensure that
    all posted bugs will get solved quickly!
Thread
Insert delayed causing table corruption?struanb29 Nov
  • Re: Insert delayed causing table corruption?sinisa29 Nov
  • Insert delayed causing table corruption?Michael Widenius28 Dec
    • RE: Insert delayed causing table corruption?Steven Roussey29 Dec
      • RE: Insert delayed causing table corruption?Michael Widenius29 Dec
        • RE: Insert delayed causing table corruption?Steven Roussey29 Dec
          • Re: Insert delayed causing table corruption?Sasha Pachev29 Dec
          • RE: Insert delayed causing table corruption?Michael Widenius30 Dec
        • Table lockingSteven Roussey4 Jan
          • Re: Table lockingBenjamin Pflugmann4 Jan
            • Re: Table lockingMichael Widenius4 Jan
              • Optimize TableSteven Roussey5 Jan
                • Optimize TableMichael Widenius5 Jan
            • RE: Table lockingSteven Roussey4 Jan
RE: Insert delayed causing table corruption?Andy29 Dec
  • RE: Insert delayed causing table corruption?Michael Widenius30 Dec
RE: Insert delayed causing table corruption?Andy30 Dec
  • RE: Insert delayed causing table corruption?Michael Widenius30 Dec
    • The table 'SQL24d1ab_0' is fullDavid Moreno S.30 Dec
      • Re: The table 'SQL24d1ab_0' is fulljpabuyer30 Dec