List:Internals« Previous MessageNext Message »
From:Shaukat Mahmood Ahmad Date:December 4 2012 3:15pm
Subject:Can I use tables with different engines in single transaction?
View as plain text  
Dear All,

I am planning to develop some mysql storage engines with transaction
support, however I have a confusion, i,e.  can I use tables from
different tables in a single transaction, if yes what will happen on
handler (concrete storage engine) level, will each involved engine
process its part as a septate part (in context of following example/
scenario will all three engine receive their part as septate
transaction?)? And then mysql will make decision (success or failure
of transaction)  from the  result of these individual / sub
transactions.

I am unable to validate this scenario, because  I have only one
transactional storage engine (InnoDB).

[Example Tables]
----------------------------------------------------------------------------------------
Table Name                              Engine
----------------------------------------------------------------------------------------
Table1                                      [InnoDB]
Table2                                      [MyTransactionalEngine1]
Table3                                      [MyTransactionalEngine2]
----------------------------------------------------------------------------------------

[Example Transaction]
----------------------------------------------------------------------------------------
START TRANSACTION;
INSERT INTO Table1 VALUES (1, 'SMA');
INSERT INTO Table2 VALUES ('url', 'www.sma.im');
INSERT INTO Table2 VALUES (1001, 'sample entry');
COMMIT;
----------------------------------------------------------------------------------------

Regards,
Shaukat Mahmood Ahmad
Thread
Can I use tables with different engines in single transaction?Shaukat Mahmood Ahmad4 Dec
Re: Can I use tables with different engines in single transaction?Shaukat Mahmood Ahmad4 Dec
  • Re: Can I use tables with different engines in single transaction?Shaukat Mahmood Ahmad5 Dec
    • Re: Can I use tables with different engines in single transaction?Kristian Nielsen5 Dec