Mysql database classes - why do we have three options on install?

32 views
Skip to first unread message

Corina

unread,
Apr 11, 2012, 7:27:03 AM4/11/12
to xe-...@googlegroups.com
We recently started discussing about whether it is necessary to have three Mysql database classes: Mysql, Mysql_InnoDB and Mysqli.

It is obvious that at least two classes are needed - one for Mysql driver and one for the Mysqli PHP driver. The question is why have separate classes for different storage engines only with the Mysql driver? Why not two Mysqli classes? Or why don't we merge the Mysql and Mysql_InnoDB classes into one?

There are two main differences between the Mysql and Mysql_InnoDB classes - the latter uses transactions (otherwise the begin, commit and rollback just returned true) and overrides the createTable method to use ENGINE = InnoDB, instead of ENGINE = MyISAM (as used in the Mysql base class).

The Mysqli class also extends Mysql and uses its default createTable method, thus creating all tables as MyISAM.

Wouldn't it be better to remove the explicit reference to storage engine from XE and just use whatever is set as default on the database server?

Treasurej

unread,
Feb 23, 2013, 1:20:37 AM2/23/13
to xe-...@googlegroups.com
Mysql_InooDB

2012년 4월 11일 수요일 오후 8시 27분 3초 UTC+9, Corina 님의 말:
Reply all
Reply to author
Forward
0 new messages