Use the native set_charset() method if available instead of SET NAMES
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 15 Nov 2013 22:21:40 +0000 (23:21 +0100)
committerNikerabbit <niklas.laxstrom@gmail.com>
Sat, 16 Nov 2013 07:57:52 +0000 (07:57 +0000)
commita22290509881705a1ab54599a07a1c14077c2bde
treeedbee7e9b6485e19d4f5360a5e6925c2374f131d
parentd6698354fe824116ad23384f23fb065d3d343c04
Use the native set_charset() method if available instead of SET NAMES

According to the PHP manual, it is the recommended way to set the charset.

- mysql extension has it for MySQL >= 5.0.7
- mysqli extension has it for MySQL >= 5.0.6
or if using mysqlnd.

Change-Id: I8cd2f97fcad4b045c6f99ff894254847b13c6878
includes/db/DatabaseMysql.php
includes/db/DatabaseMysqlBase.php
includes/db/DatabaseMysqli.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php