summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/mysqli/mysqli.c2
-rw-r--r--ext/mysqli/php_mysqli.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index d11eba6032..c41cc85408 100644
--- 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)
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 4f1d81307e..5c97009d52 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -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();
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h
index 812d6b89d2..bc4ce56bee 100644
--- a/ext/mysqli/php_mysqli.h
+++ b/ext/mysqli/php_mysqli.h
@@ -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); \
} \