/
Migrate to MySQLi Driver [5.3.0-B1]
Migrate to MySQLi Driver [5.3.0-B1]
Right now In-Portal uses MySQL driver to talk with MySQL database. This driver not only uses procedural-only approach (makes it impossible to test), but also isn't maintained very well.
I'm proposing to for In-Portal to use MySQLi (http://php.net/manual/en/mysqli.commit.php) instead of MySQL driver internally in kDBConnection class. We're getting at least these 2 features as a result of upgrade:
- prepared statements - PDO-way of running SQL queries, that have user input in them
- transactions - if one statement within a transaction fails, then all transaction is rolled-back
In particular we can use transactions to execute SQLs during deployment script run. This way SQL error in one SQL will also rollback others in same revision/transaction.