Pregunta

I read most of example InnoDB on this website but I have no clue for InnoDB behavior.

As far As I found out

START TRANSACTION;

Is declaring this is a transaction connection. It's OK till here. NOW I have 3 tables:

  • tbl1 with InnoDB engine
  • tbl2 MyISAM Engine
  • tbl3 InnoDB

Sequence of updates:

SET AUTOCOMMIT=0
START TRANSACTION;
UPDATE tbl2 SET column=1 WHERE (SELECT clumn FROM tbl WHERE column2=1);
UPDATE tbl3 SET column=1;
Rollback;

What will happen to MyISAM table is it rollback or only tbl3 and tbl1 will be rollback?

¿Fue útil?

Solución

MyISAM doesn't know anything about transactions, and it cannot roll back changes.

So if you roll back, the changes to tbl3 will be discarded, but the changes to tbl2 will remain.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top