1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00

Compile-in a string-to-int conversion for INT columns by default,

controlled by a ini setting.
This commit is contained in:
Andrey Hristov
2008-09-15 14:02:55 +00:00
parent f9f69a5373
commit 02ae7e8737
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -27,10 +27,10 @@
#define MYSQLND_VERSION_ID 50004
/* This forces inlining of some accessor functions */
#define MYSQLND_USE_OPTIMISATIONS 0
#define MYSQLND_USE_OPTIMISATIONS 1
/* #define MYSQLND_STRING_TO_INT_CONVERSION */
#define MYSQLND_STRING_TO_INT_CONVERSION
/*
This force mysqlnd to do a single (or more depending on ammount of data)
non-blocking read() calls before sending a command to the server. Useful
+2 -2
View File
@@ -1564,7 +1564,7 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
ZVAL_LONG(*current_field, v);
} else {
uint64 v = (uint64) atoll((char *) p);
zend_bool uns = packet->fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE;
zend_bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE;
/* We have to make it ASCIIZ temporarily */
#if SIZEOF_LONG==8
if (uns == TRUE && v > 9223372036854775807L)
@@ -1581,7 +1581,7 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
}
*(p + len) = save;
} else
#endif
#endif /* MYSQLND_STRING_TO_INT_CONVERSION */
if (fields_metadata[i].type == MYSQL_TYPE_BIT) {
/*
BIT fields are specially handled. As they come as bit mask, we have