]> granicus.if.org Git - php/commitdiff
Fix stupid error, which happens only on Windows. And we thought this has
authorAndrey Hristov <andrey@php.net>
Wed, 12 Sep 2007 09:12:56 +0000 (09:12 +0000)
committerAndrey Hristov <andrey@php.net>
Wed, 12 Sep 2007 09:12:56 +0000 (09:12 +0000)
been fixed. Now my_thread_end() should be called and there should be no
warnings in the error logs of exiting thread, which hasn't deinited, and
leaks.

NEWS
ext/mysqli/mysqli.c
ext/mysqli/php_mysqli.h

diff --git a/NEWS b/NEWS
index d11eba6032ca315175d62450cc2f9278ea114489..c41cc854080872e339929b1f5afaa0a91e117231 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 20??, PHP 5.2.5
+- Fixed missing brackets leading to build warning and error in the log.
+  Win32 code). (Andrey)
 - Fixed leaks with mulitple connects on one mysqli object. (Andrey)
 - Fixed endianness detection on MacOS when building universal binary. 
   (Uwe Schindler, Christian Speich, Tony)
index 4f1d81307e764732a09d7f4354d63a95ee6fe858..5c97009d527d1ce80f75f418a74e58d188a7fe59 100644 (file)
@@ -665,7 +665,7 @@ PHP_MINIT_FUNCTION(mysqli)
 PHP_MSHUTDOWN_FUNCTION(mysqli)
 {
 #ifdef PHP_WIN32
-       unsigned long client_ver = mysql_get_client_version;
+       unsigned long client_ver = mysql_get_client_version();
        /* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */
        if ((client_ver > 50042 && client_ver < 50100) || client_ver > 50122) {
                mysql_server_end();
index 812d6b89d2d4bc81a1593760758ac24fb49ea348..bc4ce56bee4e6cc40e9052ed5ea9824cf22b47a1 100644 (file)
@@ -241,9 +241,10 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry * TSRML
 #define MYSQLI_RETURN_LONG_LONG(__val) \
 { \
        if ((__val) < LONG_MAX) {               \
-               RETURN_LONG((__val));           \
+               RETURN_LONG((long) (__val));            \
        } else {                                \
                char *ret;                      \
+               /* always used with my_ulonglong -> %llu */ \
                int l = spprintf(&ret, 0, "%llu", (__val));     \
                RETURN_STRINGL(ret, l, 0);              \
        }                                       \