Author: ahristov
Date: 2007-03-12 15:30:13 +0100 (Mon, 12 Mar 2007)
New Revision: 107
Modified:
trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c
Log:
Fix failing tests. Libmysql sets internally NUM_FLAG for every
column that is numeric. The information did not come from the
server and thus was not visible through mysqlnd.
Modified: trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c 2007-03-12 13:53:35 UTC (rev 106)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd_wireprotocol.c 2007-03-12 14:30:13 UTC (rev 107)
@@ -959,6 +959,16 @@
/* 2 byte filler */
p +=2;
+ /* Should we set NUM_FLAG (libmysql does it) ? */
+ if (
+ (meta->type <= MYSQL_TYPE_INT24 &&
+ (meta->type != MYSQL_TYPE_TIMESTAMP || meta->length == 14 || meta->length ==
8)
+ ) || meta->type == MYSQL_TYPE_YEAR)
+ {
+ meta->flags |= NUM_FLAG;
+ }
+
+
/* def could be empty, thus don't allocate on the root */
if (packet->header.size > (p - buf) && (len =
php_mysqlnd_net_field_length(&p))) {
meta->def = emalloc(len + 1);
| Thread |
|---|
| • PHP mysqlnd svn commit: r107 - trunk/ext/mysqli/mysqlnd | ahristov | 12 Mar |