[MTOS-dev] Making MT Transaction Safe

Hirotaka Ogawa hirotaka.ogawa at gmail.com
Mon Mar 10 01:01:39 PDT 2008


I've slightly modified the previous patch I've posted, and filed at:
http://bugs.movabletype.org/default.asp?69760

---

To begin making MT transaction safe and supporting InnoDB for MySQL,
we need at least two new directives, namely EnableTransaction and
MySQLStorageEngine.

EnableTransaction is to disable AutoCommit and to make
MT::ObjectDriverFactory->commit() and rollback() methods available.
And, MySQLStorageEngine is to specify one of MySQL Storage Engines,
such as "InnoDB", "MyISAM", "BDB".  MyISAM is selected if no
MySQLStorageEngine specified.

Attached patch is to realize these experimental directives.  But, this
patch only provides directives and methods, and doesn't provide any
utilities.  Actually, there are lots of things to do this work:

- we need to make mt-wizard.cgi to select user-defined DB engines.
- we need to insert MT::ObjectDriverFactory->commit() and rollback()
as they are required.  These methods have no side-effects; when
EnableTransaction disabled, these methods do nothing at all.

They are more than I can handle.  But, if some volunteers helped me,
it could be realized more quickly than I now expected.

On Tue, Mar 4, 2008 at 2:05 AM, Byrne Reese <byrne at sixapart.com> wrote:
> +1
>
>  Especially if it enabled more research into how to best leverage MySQL for
>  performance gain.
>
>
>
>
>  On 3/2/08 3:31 AM, "Hirotaka Ogawa" <hirotaka.ogawa at gmail.com> wrote:
>
>  > Hi,
>  >
>  > To begin supporting InnoDB and transactions, we need at least two new
>  > directives, namely MySQLStorageEngine and DisableAutoCommit.
>  >
>  > MySQLStorageEngine is to specify one of MySQL Storage Engines, such as
>  > "InnoDB", "MyISAM", "BDB".  MyISAM is selected if no
>  > MySQLStorageEngine specified.
>  > And, DisableAutoCommit is to disable AutoCommit.
>  > MT::ObjectDriverFactory disables AutoCommit feature only when
>  > mt-config.cgi has "DisableAutoCommit 1".
>  >
>  > Attached patch is to realize these experimental directives.  But, this
>  > patch only provides directives, and doesn't provide any utilities.
>  > For example, we need to modify mt-wizard.cgi to be able to configure
>  > to use InnoDB, besides this patch.  And, we have to add
>  > begin_transaction() and commit() methods, and then have to modify
>  > MT::Apps to use them properly.
>  >
>  > If you try to use InnoDB for testing purpose, please follow these steps:
>  >
>  > 1) Access http://.../mt-wizard.cgi to create mt-config.cgi
>  > 2) And then, add "MySQLStorageEngine InnoDB" line to mt-config.cgi by hand
>  > 3) Then, access http://.../mt-update.cgi?__mode=install to install
>  > initial settings.
>
>
>



-- 
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/


More information about the MTOS-dev mailing list