Author: jdrussel
Date: 2011-04-07 21:05:59 +0200 (Thu, 07 Apr 2011)
New Revision: 25785
Log:
Add a reference to innodb_print_all_deadlocks.
Modified:
trunk/dynamic-docs/glossary/innodb.xml
Modified: trunk/dynamic-docs/glossary/innodb.xml
===================================================================
--- trunk/dynamic-docs/glossary/innodb.xml 2011-04-07 18:51:10 UTC (rev 25784)
+++ trunk/dynamic-docs/glossary/innodb.xml 2011-04-07 19:05:59 UTC (rev 25785)
Changed blocks: 2, Lines Added: 14, Lines Deleted: 9; 2201 bytes
@@ -1958,13 +1958,13 @@
available, neither will ever release the locks it holds.
</para>
<para>
- A deadlock can occur when the transactions acquire locks on
- multiple tables, but in the opposite order. A deadlock can also
- occur when statements such as <literal>UPDATE</literal> or
- <literal>SELECT ... FOR UPDATE</literal> lock ranges of index
- records and <emphasis role="bold">gaps</emphasis>, with each
- transaction acquiring some locks but not others due to a timing
- issue.
+ A deadlock can occur when the transactions lock rows in multiple
+ tables (through statements such as <literal>UPDATE</literal> or
+ <literal>SELECT ... FOR UPDATE</literal>), but in the opposite
+ order. A deadlock can also occur when such statements lock
+ ranges of index records and
+ <emphasis role="bold">gaps</emphasis>, with each transaction
+ acquiring some locks but not others due to a timing issue.
</para>
<para>
To reduce the possibility of deadlocks, use transactions rather
@@ -1987,8 +1987,13 @@
transactions (the <emphasis role="bold">victim</emphasis>).
Thus, even if your application logic is perfectly correct, you
must still handle the case where a transaction must be retried.
- To monitor how frequently deadlocks occur, use the command
- <literal>SHOW ENGINE INNODB STATUS</literal>.
+ To see the last deadlock in an InnoDB user transaction, use the
+ command <literal>SHOW ENGINE INNODB STATUS</literal>. If
+ frequent deadlocks highlight a problem with transaction
+ structure or application error handling, run with the
+ <literal role="sysvar">innodb_print_all_deadlocks</literal>
+ setting enabled to print information about all deadlocks to the
+ <literal>mysqld</literal> error log.
</para>
</def>
| Thread |
|---|
| • svn commit - mysqldoc@oter02: r25785 - trunk/dynamic-docs/glossary | john.russell | 7 Apr |