xp-framework/xp-framework — Issue #80: Wrong conversion of NULL values in MySqlx
Author: treuter
Created: 2011-11-10 09:09:09+00:00
State: open

When selecting NULL values from an integer column with MySqlx, the values get converted to float(0) instead of NULL in the result set.

Example:
$db= ConnectionManager::getInstance()->getByHost('mydatabase', 0);
$q= $db->query('select CONVERT(null, SIGNED)');
var_dump($q->next());

Result with MySQL driver:
-> array(1) { ["CONVERT(null, SIGNED)"]=> NULL }

Result with MySqlx driver:
-> array(1) { ["CONVERT(null, SIGNED)"]=> float(0) }