سؤال

I tried the start transaction on a MyISAM table, and it replied "Query OK, 0 rows affected (0.00 sec)".

But I'm not sure if the same thing will happen on all versions of MySQL.

Is there any spec about the behavior in non-transaction mode of those queries which involve being in transaction ?

هل كانت مفيدة؟

المحلول

No, no error or warnng will be raised. WHen you start a transaction, you do it for all transactional engines available, not for any specific table.

You can run queries on tables using both transactional and non-transactional engines within a transaction, but of course only changes performed on tableswith transactional engines will need to be commit/rollback.

Queries performed on tables with non-transactional engines will just have an immediate effect as usual.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top