mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Fix Bug #55703(PHP crash when calling mysqli_fetch_fields)
Since the catalog values always is "def" now, see http://dev.mysql.com/doc/refman/5.0/en/c-api-data-structures.html
This commit is contained in:
parent
1ec077e060
commit
08201e11fe
1 changed files with 6 additions and 1 deletions
|
@ -1053,7 +1053,12 @@ static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRML
|
||||||
add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1);
|
add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1);
|
||||||
add_property_string(value, "def", (field->def ? field->def : ""), 1);
|
add_property_string(value, "def", (field->def ? field->def : ""), 1);
|
||||||
add_property_string(value, "db", (field->db ? field->db : ""), 1);
|
add_property_string(value, "db", (field->db ? field->db : ""), 1);
|
||||||
add_property_string(value, "catalog", (field->catalog ? field->catalog : ""), 1);
|
|
||||||
|
/* FIXME: manually set the catalog to "def" due to bug in
|
||||||
|
* libmysqlclient which does not initialize field->catalog
|
||||||
|
* and in addition, the catalog is always be "def"
|
||||||
|
*/
|
||||||
|
add_property_string(value, "catalog", "def", 1);
|
||||||
|
|
||||||
add_property_long(value, "max_length", field->max_length);
|
add_property_long(value, "max_length", field->max_length);
|
||||||
add_property_long(value, "length", field->length);
|
add_property_long(value, "length", field->length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue