Lines Matching refs:header

28 	if (UNEXPECTED((size_t)(p - begin) > packet->header.size)) { \
242 mysqlnd_read_header(MYSQLND_PFC * pfc, MYSQLND_VIO * vio, MYSQLND_PACKET_HEADER * header, in mysqlnd_read_header() argument
253 header->size = uint3korr(buffer); in mysqlnd_read_header()
254 header->packet_no = uint1korr(buffer + 3); in mysqlnd_read_header()
256 DBG_INF_FMT("HEADER: prot_packet_no=%u size=%3zu", header->packet_no, header->size); in mysqlnd_read_header()
261 if (pfc->data->compressed || pfc->data->packet_no == header->packet_no) { in mysqlnd_read_header()
271 if (header->size > 0) { in mysqlnd_read_header()
272 zend_uchar *buf = mnd_emalloc(header->size); in mysqlnd_read_header()
273 …if ((PASS == pfc->data->m.receive(pfc, vio, buf, header->size, conn_stats, error_info)) && buf[0] … in mysqlnd_read_header()
274 php_mysqlnd_read_error_from_line(buf + 1, header->size - 1, in mysqlnd_read_header()
285 pfc->data->packet_no, header->packet_no, header->size); in mysqlnd_read_header()
288 pfc->data->packet_no, header->packet_no, header->size); in mysqlnd_read_header()
355 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_greet_read()
368 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_greet_read()
423 if ((size_t) (p - buf) < packet->header.size) { in php_mysqlnd_greet_read()
433 if ((size_t) (p - buf) < packet->header.size) { in php_mysqlnd_greet_read()
458 size_t remaining_size = packet->header.size - (size_t)(p - buf); in php_mysqlnd_greet_read()
494 DBG_ERR_FMT("GREET packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_greet_read()
496 p - begin - packet->header.size); in php_mysqlnd_greet_read()
687 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_auth_response_read()
698 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_auth_response_read()
706 if (packet->header.size > (size_t) (p - buf)) { in php_mysqlnd_auth_response_read()
711 packet->new_auth_protocol_data_len = packet->header.size - (size_t) (p - buf); in php_mysqlnd_auth_response_read()
737 if (packet->header.size > (size_t) (p - buf) && (net_len = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_auth_response_read()
740 if ((p - buf) > packet->header.size || packet->header.size - (p - buf) < net_len) { in php_mysqlnd_auth_response_read()
759 DBG_ERR_FMT("OK packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_auth_response_read()
761 p - begin - packet->header.size); in php_mysqlnd_auth_response_read()
847 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_ok_read()
858 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_ok_read()
880 if (packet->header.size > (size_t) (p - buf) && (net_len = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_ok_read()
896 DBG_ERR_FMT("OK packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_ok_read()
898 p - begin - packet->header.size); in php_mysqlnd_ok_read()
940 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_eof_read()
951 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_eof_read()
963 if (packet->header.size > 1) { in php_mysqlnd_eof_read()
983 DBG_ERR_FMT("EOF packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_eof_read()
985 p - begin - packet->header.size); in php_mysqlnd_eof_read()
1069 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_rset_header_read()
1082 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_rset_header_read()
1102 len = packet->header.size - 1; in php_mysqlnd_rset_header_read()
1124 if (packet->header.size > (size_t) (p - buf) && (len = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_rset_header_read()
1127 if ((p - buf) > packet->header.size || packet->header.size - (p - buf) < len) { in php_mysqlnd_rset_header_read()
1128 size_t local_file_name_over_read = ((p - buf) - packet->header.size) + len; in php_mysqlnd_rset_header_read()
1154 DBG_ERR_FMT("RSET_HEADER packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_header_read()
1156 p - begin - packet->header.size); in php_mysqlnd_rset_header_read()
1211 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_rset_field_read()
1224 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_rset_field_read()
1230 } else if (EODATA_MARKER == *p && packet->header.size < 8) { in php_mysqlnd_rset_field_read()
1252 if ((size_t)((p - begin) + 12) > packet->header.size) { in php_mysqlnd_rset_field_read()
1287 if (packet->header.size > (size_t) (p - buf) && in php_mysqlnd_rset_field_read()
1357 DBG_ERR_FMT("RSET field packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_field_read()
1359 "shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_field_read()
1386 MYSQLND_PACKET_HEADER header; in php_mysqlnd_read_row_ex() local
1407 if (UNEXPECTED(FAIL == mysqlnd_read_header(pfc, vio, &header, stats, error_info))) { in php_mysqlnd_read_row_ex()
1415 while (header.size >= MYSQLND_MAX_PACKET_SIZE) { in php_mysqlnd_read_row_ex()
1416 buf = erealloc(buf, *data_size + header.size); in php_mysqlnd_read_row_ex()
1418 *data_size += header.size; in php_mysqlnd_read_row_ex()
1420 …if (UNEXPECTED(PASS != (ret = pfc->data->m.receive(pfc, vio, p, header.size, stats, error_info))))… in php_mysqlnd_read_row_ex()
1427 if (FAIL == mysqlnd_read_header(pfc, vio, &header, stats, error_info)) { in php_mysqlnd_read_row_ex()
1433 buffer->ptr = pool->get_chunk(pool, *data_size + header.size + prealloc_more_bytes); in php_mysqlnd_read_row_ex()
1439 *data_size += header.size; in php_mysqlnd_read_row_ex()
1441 …if (UNEXPECTED(PASS != (ret = pfc->data->m.receive(pfc, vio, p, header.size, stats, error_info))))… in php_mysqlnd_read_row_ex()
1729 MYSQLND_HEADER_SIZE + packet->header.size, in php_mysqlnd_rowp_read()
1742 packet->header.size = data_size; in php_mysqlnd_rowp_read()
1796 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_stats_read()
1800 packet->message.s = mnd_emalloc(packet->header.size + 1); in php_mysqlnd_stats_read()
1801 memcpy(packet->message.s, buf, packet->header.size); in php_mysqlnd_stats_read()
1802 packet->message.s[packet->header.size] = '\0'; in php_mysqlnd_stats_read()
1803 packet->message.l = packet->header.size; in php_mysqlnd_stats_read()
1843 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_prepare_read()
1848 data_size = packet->header.size; in php_mysqlnd_prepare_read()
1899 DBG_ERR_FMT("PREPARE packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_prepare_read()
1901 p - begin - packet->header.size); in php_mysqlnd_prepare_read()
1925 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_chg_user_read()
1939 …if (packet->header.size == 1 && buf[0] == EODATA_MARKER && (packet->server_capabilities & CLIENT_S… in php_mysqlnd_chg_user_read()
1946 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_chg_user_read()
1954 if (packet->response_code == 0xFE && packet->header.size > (size_t) (p - buf)) { in php_mysqlnd_chg_user_read()
1958 packet->new_auth_protocol_data_len = packet->header.size - (size_t) (p - buf); in php_mysqlnd_chg_user_read()
1969 DBG_ERR_FMT("CHANGE_USER packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_chg_user_read()
1971 p - begin - packet->header.size); in php_mysqlnd_chg_user_read()
2037 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_sha256_pk_request_response_read()
2045 packet->public_key_len = packet->header.size - (p - buf); in php_mysqlnd_sha256_pk_request_response_read()
2053 DBG_ERR_FMT("OK packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_sha256_pk_request_response_read()
2055 p - begin - packet->header.size); in php_mysqlnd_sha256_pk_request_response_read()
2117 …if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, co… in php_mysqlnd_cached_sha2_result_read()
2127 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_cached_sha2_result_read()
2135 if (packet->header.size > (size_t) (p - buf)) { in php_mysqlnd_cached_sha2_result_read()
2140 packet->new_auth_protocol_data_len = packet->header.size - (size_t) (p - buf); in php_mysqlnd_cached_sha2_result_read()
2166 DBG_ERR_FMT("OK packet %zu bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_cached_sha2_result_read()
2168 p - begin - packet->header.size); in php_mysqlnd_cached_sha2_result_read()
2266 packet->header.m = &packet_methods[PROT_GREET_PACKET]; in MYSQLND_METHOD()
2278 packet->header.m = &packet_methods[PROT_AUTH_PACKET]; in MYSQLND_METHOD()
2290 packet->header.m = &packet_methods[PROT_AUTH_RESP_PACKET]; in MYSQLND_METHOD()
2302 packet->header.m = &packet_methods[PROT_CHANGE_AUTH_RESP_PACKET]; in MYSQLND_METHOD()
2314 packet->header.m = &packet_methods[PROT_OK_PACKET]; in MYSQLND_METHOD()
2326 packet->header.m = &packet_methods[PROT_EOF_PACKET]; in MYSQLND_METHOD()
2338 packet->header.m = &packet_methods[PROT_CMD_PACKET]; in MYSQLND_METHOD()
2350 packet->header.m = &packet_methods[PROT_RSET_HEADER_PACKET]; in MYSQLND_METHOD()
2362 packet->header.m = &packet_methods[PROT_RSET_FLD_PACKET]; in MYSQLND_METHOD()
2374 packet->header.m = &packet_methods[PROT_ROW_PACKET]; in MYSQLND_METHOD()
2386 packet->header.m = &packet_methods[PROT_STATS_PACKET]; in MYSQLND_METHOD()
2398 packet->header.m = &packet_methods[PROT_PREPARE_RESP_PACKET]; in MYSQLND_METHOD()
2410 packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET]; in MYSQLND_METHOD()
2422 packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_PACKET]; in MYSQLND_METHOD()
2434 packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET]; in MYSQLND_METHOD()
2445 packet->header.m = &packet_methods[PROT_CACHED_SHA2_RESULT_PACKET]; in MYSQLND_METHOD()