From: Stewart Smith Date: June 21 2012 4:35am Subject: Re: purpose of thd_mark_transaction_to_rollback List-Archive: http://lists.mysql.com/internals/38537 Message-Id: <87a9zxs2o9.fsf@flamingspork.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 20 Jun 2012 13:22:50 -0400, Zardosht Kasheff w= rote: > Thank you for your response. Why does InnoDB do this when a deadlock > is detected? Does every storage engine need to do this? Is this part > of some specification that calls for this? Or is it some sort of > performance optimization? Any storage engine that initiates rollback needs to call it. This basically means any transactional engine, as there are situtions where ROLLBACK is inevitable (e.g. ENOSPC if you're lucky enough to be able to handle it). It's not a performance optimization, it's about correctness. This is telling the MySQL server that anybody else involved in the transaction should now execute ROLLBACK as you've already done it. e.g. to ensure that binlog doesn't contain operations that have been rolled back by your engine. =2D-=20 Stewart Smith --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJP4qR2AAoJEP08notdpDyvSG0P/RYyHVRqM2AJec7QtA5hLUbb c57mtD36Hxp6DL3iqR22xF8fHY3QO71OgFANN0E0NOEetmlmQ5WWkPw3NjEvAr2n 63xmEvgWKCppTI6xHvekbFp+vmAZC0aus4mOaWVC3XmW7SGb3oIrkrGfpDyIRTYk eBA0ETL3/+FDqj8sZLHlxo3PRY7IPaa48Fr/P/VulKwRGdNApqyPy1/qbdQUTxlh 0rhZs8CmiJ8jm4PYsFJthtSMQQ3GhpX8kuFLv1bDuSGK+gTn9UfYwR1Su8sT82ao fjBlNF0LuFQ4meoqio9P1v37IWioruURukKBpOd/91HnxfQNwy9QibIhvl1IzQPh p4d4NTSo4yNzr+MeREMTuyz3V3wKNBOI/E0N3ZZ9p9uo8iuCZQcuWFikmRCYWQl9 Cl0o0JtgtgA02Z9OhDMBjlcBC45ODaaYklCoQo196kDBVzP+8ZpURasi4Hugpr4M LFoikUSI7ywPDbqprjdt0Yi5u+3vrgEtyNiHu/zMt1M+gz7T4f89ZCPM/0NA4VUw 1aDBuSz/l0YdI+J7JN4uI0nOjrTF6B0v0/dx5lehBOylpwghFoyAF5RS64iWSRVi 7z12OGbDp4q3np7vn5gRYQ6ePUDldNkohQYw3+gZW0GX9d2hsBLzaYmZD65ujoqm n/nZfEZ6Ey0SOzqTShx/ =fYLo -----END PGP SIGNATURE----- --=-=-=--