Database::makeList() : Handle NULL when building 'IN' clause
authorSumit Asthana <asthana.sumit23@gmail.com>
Tue, 23 Dec 2014 21:34:36 +0000 (03:04 +0530)
committerSumit Asthana <asthana.sumit23@gmail.com>
Sat, 3 Jan 2015 16:50:35 +0000 (22:20 +0530)
commit26235c73376b87fe1fc3e6151e86cf071b705bba
tree03abf47699a8f691e5b819183b8dcee8537b7a13
parent910dcbc317721792216c9a26a31b0a9e5cecfc6b
Database::makeList() : Handle NULL when building 'IN' clause

Amends to Database::makeList() to check if 'NULL' is present in array while
building IN clause. Presently a NULL in array intended to build IN clause, is
treated as a usual value. This creates
problem:https://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_in
Therefore null is appended at the end of the IN clause as " $field IS NULL"
rather than within the IN clause.
DatabaseSQLTest.php: Some test cases added for the modified behaviour.

Bug: T50853
Change-Id: Ic255c37e9702fd44d8173027ab8036ddc48f9d2e
RELEASE-NOTES-1.25
includes/db/Database.php
tests/phpunit/includes/db/DatabaseSQLTest.php