]> granicus.if.org Git - php/commitdiff
fixed bug in mysql->client_version
authorGeorg Richter <georg@php.net>
Mon, 26 Jul 2004 05:44:06 +0000 (05:44 +0000)
committerGeorg Richter <georg@php.net>
Mon, 26 Jul 2004 05:44:06 +0000 (05:44 +0000)
added mysql->client_info property

NEWS
ext/mysqli/mysqli_prop.c

diff --git a/NEWS b/NEWS
index 2431c1b58434015583d27c6136abefed24ebef4c..b41d72d6e7c86efa290153cb889878cc72cab24e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,12 +14,14 @@ PHP                                                                        NEWS
   . stream_context_get_default()  (Wez)
   . stream_socket_enable_crypto()  (Wez)
   . SimpleXMLElement->registerXPathNamespace() (Christian)
+  . mysqli->client_info property (Georg)
 - PHP will now respect extension dependencies when initializing.  (Wez)
 - Added Cursor support for MySQL 5.0.x in mysqli (Georg)
 - Added proxy support to ftp wrapper via http. (Sara)
 - Added MDTM support to ftp_url_stat. (Sara)
 - Added zlib stream filter suport. (Sara)
 - Added bz2 stream filter support. (Sara)
+- Fixed bug in mysql->client_version (Georg)
 - Changed the implementation of TRUE, FALSE, and NULL from constants to
   keywords. (Marcus)
 - Fixed ZTS destruction. (Marcus)
index c9d3f8d8ecbf4b2f5eb282123d62182b151549ea..f5792b77a6667b9d053a0c5a81fef3087f52067e 100644 (file)
@@ -82,11 +82,19 @@ int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
 int link_client_version_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
        ALLOC_ZVAL(*retval);
-       ZVAL_STRING(*retval, MYSQL_SERVER_VERSION, 1);
+       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);
+       return SUCCESS;
+}
+/* }}} */
 /* {{{ property link_test_read */
 int link_test_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
@@ -191,6 +199,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},