mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 18:35:42 +00:00
fix mysqlnd for bigint
This commit is contained in:
1 parent
f3703d86f7
commit
d76d415f55
2 files changed
+5
-5
No files matched your search
@@ -84,7 +84,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne
|
||||
#endif /* #if SIZEOF_LONG==4 */
|
||||
{
|
||||
if (byte_count < 8 || uval <= L64(9223372036854775807)) {
|
||||
ZVAL_LONG(zv, (long) uval); /* the cast is safe, we are in the range */
|
||||
ZVAL_LONG(zv, (php_int_t) uval); /* the cast is safe, we are in the range */
|
||||
} else {
|
||||
DBG_INF("stringify");
|
||||
tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval);
|
||||
@@ -112,7 +112,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne
|
||||
} else
|
||||
#endif /* SIZEOF */
|
||||
{
|
||||
ZVAL_LONG(zv, (long) lval); /* the cast is safe, we are in the range */
|
||||
ZVAL_LONG(zv, (php_int_t) lval); /* the cast is safe, we are in the range */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1679,7 +1679,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
|
||||
#else
|
||||
_atoi64((char *) p);
|
||||
#endif
|
||||
ZVAL_LONG(*current_field, (long) v); /* the cast is safe */
|
||||
ZVAL_LONG(*current_field, (php_int_t) v); /* the cast is safe */
|
||||
} else {
|
||||
uint64_t v =
|
||||
#ifndef PHP_WIN32
|
||||
@@ -1701,7 +1701,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
|
||||
{
|
||||
ZVAL_STRINGL(*current_field, (char *)p, len, 0);
|
||||
} else {
|
||||
ZVAL_LONG(*current_field, (long) v); /* the cast is safe */
|
||||
ZVAL_LONG(*current_field, (php_int_t) v); /* the cast is safe */
|
||||
}
|
||||
}
|
||||
*(p + len) = save;
|
||||
@@ -1731,7 +1731,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
|
||||
*/
|
||||
p -= len;
|
||||
if (Z_TYPE_PP(current_field) == IS_LONG) {
|
||||
bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_PP(current_field));
|
||||
bit_area += 1 + sprintf((char *)start, ZEND_INT_FMT, Z_LVAL_PP(current_field));
|
||||
ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
|
||||
} else if (Z_TYPE_PP(current_field) == IS_STRING){
|
||||
memcpy(bit_area, Z_STRVAL_PP(current_field), Z_STRSIZE_PP(current_field));
|
||||
|
||||
Reference in new issue
Block a user