Escape backticks when quoting MySQL identifiers
authorBryan Davis <bd808@wikimedia.org>
Tue, 8 Oct 2013 18:14:52 +0000 (12:14 -0600)
committerBryan Davis <bd808@wikimedia.org>
Wed, 9 Oct 2013 21:43:45 +0000 (15:43 -0600)
commitcfde3c1958d72a57a72617c5fed4462161c550f7
tree7e493b57639b6c1b57c2530ff987424b10fc2c28
parentbf4c2b6aff5ef893f16c242580df5188dba86476
Escape backticks when quoting MySQL identifiers

Previously mysql_real_escape_string() was improperly used which escapes
for inclusion in a plain string rather than an identifier.

Also adds basic test support for the DatabaseMysqlBase class.

Co-Authored by: Antoine Musso <hashar@free.fr>
Bug: 55427
Change-Id: Ic045e195c89d8d5d0f0edbda0cd1df781de7025c
includes/db/DatabaseMysqlBase.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php [new file with mode: 0644]