Merge pull request #992 from narfbg/develop-db-mysqli

Improve the MySQLi database driver