Fix PDO MySQL bug in getColumnMeta()

In trying to get the CakePHP Blog Tutorial to run on HHVM, a subtle bug was found where the table name was not being returned, and, instead, an numeric index was being used. The bug was in PDOMySqlStatement::getColumnMeta (pdo_mysql.cpp). Applying this fix, the flock/fwrite fix (D855470) and the Reflection::SetAccessible (D851647) fix makes the CakePHP tutorial run like a champ.
Esse commit está contido em:
Joel Marcey
2013-06-26 11:47:42 -07:00
commit de Sara Golemon
commit fc4ed71839
+1 -2
Ver Arquivo
@@ -1157,7 +1157,7 @@ static const StaticString s_native_type("native_type");
static const StaticString s_flags("flags");
static const StaticString s_table("table");
bool PDOMySqlStatement::getColumnMeta(int64_t colno, Array &return_value) {
bool PDOMySqlStatement::getColumnMeta(int64_t colno, Array &ret) {
if (!m_result) {
return false;
}
@@ -1166,7 +1166,6 @@ bool PDOMySqlStatement::getColumnMeta(int64_t colno, Array &return_value) {
return false;
}
Array ret = Array::Create();
Array flags = Array::Create();
const MYSQL_FIELD *F = m_fields + colno;