Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions ext/mysqlnd/mysqlnd_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,6 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c

if (ret == FAIL) {
COPY_CLIENT_ERROR(&set->error_info, row_packet.error_info);
} else {
/* libmysql's documentation says it should be so for SELECT statements */
UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh? I don't see how this is set elsewhere

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After each time this method is called, the caller sets it.

}
DBG_INF_FMT("ret=%s row_count=%u warnings=%u server_status=%u",
ret == PASS? "PASS":"FAIL",
Expand Down Expand Up @@ -1004,18 +1001,11 @@ MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int
}
}
if (flags & MYSQLND_FETCH_ASSOC) {
/* zend_hash_quick_update needs length + trailing zero */
/* QQ: Error handling ? */
/*
zend_hash_quick_update does not check, as add_assoc_zval_ex do, whether
the index is a numeric and convert it to it. This however means constant
hashing of the column name, which is not needed as it can be precomputed.
*/
Z_TRY_ADDREF_P(data);
if (meta->fields[i].is_numeric == FALSE) {
zend_hash_update(row_ht, meta->fields[i].sname, data);
if (field->is_numeric == FALSE) {
zend_hash_update(row_ht, field->sname, data);
} else {
zend_hash_index_update(row_ht, meta->fields[i].num_key, data);
zend_hash_index_update(row_ht, field->num_key, data);
}
}

Expand Down
Loading