From: Georg Richter Date: Mon, 26 Jul 2004 05:45:41 +0000 (+0000) Subject: MFH: fixed bug in mysqli->client_version X-Git-Tag: php-5.0.1RC1~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e65f6bf57619859a0bb5c53e22819e9e60baefa;p=php MFH: fixed bug in mysqli->client_version --- diff --git a/NEWS b/NEWS index bc0361d75f..29a8105df7 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS raise an ReflectionException instead of returning NULL on failure. (Sebastian) - Fixed convert.* filters to consume remaining buckets_in on flush. (Sara) +- Fixed bug in mysqli->client_version (Georg) 13 Jul 2004, PHP 5.0.0 - Updated PCRE to provide better error handling in certain cases. (Andrei) diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index c9d3f8d8ec..6ad8875680 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -80,6 +80,15 @@ int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\ /* {{{ property link_client_version_read */ int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC) +{ + ALLOC_ZVAL(*retval); + ZVAL_LONG(*retval, MYSQL_VERSION_ID); + return SUCCESS; +} +/* }}} */ + +/* {{{ property link_client_info_read */ +int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC) { ALLOC_ZVAL(*retval); ZVAL_STRING(*retval, MYSQL_SERVER_VERSION, 1); @@ -191,6 +200,7 @@ MYSQLI_MAP_PROPERTY_FUNC_STRING(stmt_sqlstate_read, mysql_stmt_sqlstate, MYSQLI_ mysqli_property_entry mysqli_link_property_entries[] = { {"affected_rows", link_affected_rows_read, NULL}, + {"client_info", link_client_info_read, NULL}, {"client_version", link_client_version_read, NULL}, {"test", link_test_read, NULL}, {"connect_errno", link_connect_errno_read, NULL},