{
auth_packet->charset_no = charset->nr;
} else {
-#if PHP_MAJOR_VERSION >= 6
+#if PHP_MAJOR_VERSION >= 6
auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */
#else
auth_packet->charset_no = greet_packet.charset_no;
#endif
/* {{{ _mysqlnd_poll */
-enum_func_status
+PHPAPI enum_func_status
_mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long sec, long usec, uint * desc_num TSRMLS_DC)
{
bit = 4; /* first 2 bits are reserved */
for (i = 0; current_field < end_field; current_field++, i++) {
-#if 1
+#ifdef USE_ZVAL_CACHE
DBG_INF("Trying to use the zval cache");
obj = mysqlnd_palloc_get_zval(conn->zval_cache, &allocated TSRMLS_CC);
if (allocated) {
for (i = 0; current_field < end_field; current_field++, i++) {
/* Don't reverse the order. It is significant!*/
void *obj;
- zend_bool allocated;
+ zend_bool allocated = TRUE;
zend_uchar *this_field_len_pos = p;
/* php_mysqlnd_net_field_length() call should be after *this_field_len_pos = p; */
unsigned long len = php_mysqlnd_net_field_length(&p);
+#ifdef USE_ZVAL_CACHE
obj = mysqlnd_palloc_get_zval(conn->zval_cache, &allocated TSRMLS_CC);
if (allocated) {
*current_field = (zval *) obj;
*current_field = &((mysqlnd_zval *) obj)->zv;
((mysqlnd_zval *) obj)->point_type = MYSQLND_POINTS_FREE;
}
+#else
+ DBG_INF("Directly creating zval");
+ MAKE_STD_ZVAL(*current_field);
+#endif
if (current_field > start_field && last_field_was_string) {
/*
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values),
(void **)&values_entry, &pos_values) == SUCCESS) {
+ TSRMLS_FETCH();
zstr string_key;
uint string_key_len;
ulong num_key;
int s_len;
char *s = NULL;
- TSRMLS_FETCH();
zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values);