Author: ahristov
Date: 2007-09-04 17:18:06 +0200 (Tue, 04 Sep 2007)
New Revision: 982
Modified:
trunk/mysqlnd/mysqlnd_wireprotocol.c
Log:
Fix bug with BIT and old-API
Modified: trunk/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-09-04 14:50:02 UTC (rev 981)
+++ trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-09-04 15:18:06 UTC (rev 982)
@@ -1499,6 +1499,9 @@
{
ZVAL_STRINGL(*current_field, start, bit_area - start - 1, 0);
}
+ if (allocated == FALSE) {
+ ((mysqlnd_zval *) obj)->point_type = MYSQLND_POINTS_INT_BUFFER;
+ }
} else if (Z_TYPE_PP(current_field) == IS_STRING){
memcpy(bit_area, Z_STRVAL_PP(current_field), Z_STRLEN_PP(current_field));
bit_area += Z_STRLEN_PP(current_field);
@@ -1512,10 +1515,13 @@
{
ZVAL_STRINGL(*current_field, start, bit_area - start - 1, 0);
}
+ if (allocated == FALSE) {
+ ((mysqlnd_zval *) obj)->point_type = MYSQLND_POINTS_INT_BUFFER;
+ }
}
/*
IS_UNICODE should not be specially handled. In unicode mode
- the buffers are not pointed - everything is copied.
+ the buffers are not referenced - everything is copied.
*/
} else
#if PHP_MAJOR_VERSION < 6
| Thread |
|---|
| • PHP mysqlnd svn commit: r982 - trunk/mysqlnd | ahristov | 4 Sep |