Lines Matching refs:header
38 …if (FAIL == mysqlnd_read_header((conn)->net, &((packet)->header), (conn)->stats, ((conn)->error_in…
45 if ((buf_size) < (packet)->header.size) { \
47 (buf_size), (packet)->header.size, (packet)->header.size - (buf_size)); \
50 …if (FAIL == conn->net->data->m.receive_ex((conn)->net, (buf), (packet)->header.size, (conn)->stats…
58 MYSQLND_HEADER_SIZE + (packet)->header.size, \
65 if ((size_t)(p - begin) > packet->header.size) { \
280 mysqlnd_read_header(MYSQLND_NET * net, MYSQLND_PACKET_HEADER * header, in mysqlnd_read_header() argument
291 header->size = uint3korr(buffer); in mysqlnd_read_header()
292 header->packet_no = uint1korr(buffer + 3); in mysqlnd_read_header()
295 DBG_INF_FMT("HEADER: prot_packet_no=%u size=%3u", header->packet_no, header->size); in mysqlnd_read_header()
301 if (net->data->compressed || net->packet_no == header->packet_no) { in mysqlnd_read_header()
312 net->packet_no, header->packet_no, header->size); in mysqlnd_read_header()
315 net->packet_no, header->packet_no, header->size); in mysqlnd_read_header()
339 if (packet->header.size < sizeof(buf)) { in php_mysqlnd_greet_read()
344 buf[packet->header.size] = '\0'; in php_mysqlnd_greet_read()
352 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_greet_read()
400 if ((size_t) (p - buf) < packet->header.size) { in php_mysqlnd_greet_read()
410 if ((size_t) (p - buf) < packet->header.size) { in php_mysqlnd_greet_read()
449 DBG_ERR_FMT("GREET packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_greet_read()
451 p - begin - packet->header.size); in php_mysqlnd_greet_read()
475 mnd_pefree(p, p->header.persistent); in php_mysqlnd_greet_free_mem()
633 mnd_pefree(p, p->header.persistent); in php_mysqlnd_auth_free_mem()
664 buf[packet->header.size] = '\0'; in php_mysqlnd_auth_response_read()
672 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_auth_response_read()
680 if (packet->header.size > (size_t) (p - buf)) { in php_mysqlnd_auth_response_read()
685 packet->new_auth_protocol_data_len = packet->header.size - (size_t) (p - buf); in php_mysqlnd_auth_response_read()
710 if (packet->header.size > (size_t) (p - buf) && (i = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_auth_response_read()
725 DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_auth_response_read()
727 p - begin - packet->header.size); in php_mysqlnd_auth_response_read()
755 mnd_pefree(p, p->header.persistent); in php_mysqlnd_auth_response_free_mem()
796 mnd_pefree(p, p->header.persistent); in php_mysqlnd_change_auth_response_free_mem()
827 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_ok_read()
850 if (packet->header.size > (size_t) (p - buf) && (i = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_ok_read()
866 DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_ok_read()
868 p - begin - packet->header.size); in php_mysqlnd_ok_read()
884 mnd_pefree(p, p->header.persistent); in php_mysqlnd_ok_free_mem()
917 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_eof_read()
929 if (packet->header.size > 1) { in php_mysqlnd_eof_read()
949 DBG_ERR_FMT("EOF packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_eof_read()
951 p - begin - packet->header.size); in php_mysqlnd_eof_read()
962 mnd_pefree(_packet, ((MYSQLND_PACKET_EOF *)_packet)->header.persistent); in php_mysqlnd_eof_free_mem()
1039 mnd_pefree(p, p->header.persistent); in php_mysqlnd_cmd_free_mem()
1070 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_rset_header_read()
1091 len = packet->header.size - 1; in php_mysqlnd_rset_header_read()
1118 if (packet->header.size > (size_t) (p - buf) && (len = php_mysqlnd_net_field_length(&p))) { in php_mysqlnd_rset_header_read()
1142 DBG_ERR_FMT("RSET_HEADER packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_header_read()
1144 p - begin - packet->header.size); in php_mysqlnd_rset_header_read()
1161 mnd_pefree(p, p->header.persistent); in php_mysqlnd_rset_header_free_mem()
1212 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_rset_field_read()
1218 } else if (EODATA_MARKER == *p && packet->header.size < 8) { in php_mysqlnd_rset_field_read()
1294 if (packet->header.size > (size_t) (p - buf) && in php_mysqlnd_rset_field_read()
1373 DBG_ERR_FMT("RSET field packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_field_read()
1375 "shorter than expected", p - begin - packet->header.size); in php_mysqlnd_rset_field_read()
1388 mnd_pefree(p, p->header.persistent); in php_mysqlnd_rset_field_free_mem()
1402 MYSQLND_PACKET_HEADER header; in php_mysqlnd_read_row_ex() local
1418 if (FAIL == mysqlnd_read_header(conn->net, &header, conn->stats, conn->error_info TSRMLS_CC)) { in php_mysqlnd_read_row_ex()
1423 *data_size += header.size; in php_mysqlnd_read_row_ex()
1439 if (!header.size) { in php_mysqlnd_read_row_ex()
1455 p = (*buffer)->ptr + (*data_size - header.size); in php_mysqlnd_read_row_ex()
1458 …if (PASS != (ret = conn->net->data->m.receive_ex(conn->net, p, header.size, conn->stats, conn->err… in php_mysqlnd_read_row_ex()
1464 if (header.size < MYSQLND_MAX_PACKET_SIZE) { in php_mysqlnd_read_row_ex()
1789 MYSQLND_HEADER_SIZE + packet->header.size, in php_mysqlnd_rowp_read()
1794 packet->header.size = data_size; in php_mysqlnd_rowp_read()
1869 DBG_INF_FMT("stack_allocation=%u persistent=%u", (int)stack_allocation, (int)p->header.persistent); in php_mysqlnd_rowp_free_mem()
1878 mnd_pefree(p, p->header.persistent); in php_mysqlnd_rowp_free_mem()
1897 packet->message = mnd_emalloc(packet->header.size + 1); in php_mysqlnd_stats_read()
1898 memcpy(packet->message, buf, packet->header.size); in php_mysqlnd_stats_read()
1899 packet->message[packet->header.size] = '\0'; in php_mysqlnd_stats_read()
1900 packet->message_len = packet->header.size; in php_mysqlnd_stats_read()
1917 mnd_pefree(p, p->header.persistent); in php_mysqlnd_stats_free_mem()
1944 data_size = packet->header.size; in php_mysqlnd_prepare_read()
1995 DBG_ERR_FMT("PREPARE packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_prepare_read()
1997 p - begin - packet->header.size); in php_mysqlnd_prepare_read()
2009 mnd_pefree(p, p->header.persistent); in php_mysqlnd_prepare_free_mem()
2040 …if (packet->header.size == 1 && buf[0] == EODATA_MARKER && packet->server_capabilities & CLIENT_SE… in php_mysqlnd_chg_user_read()
2047 php_mysqlnd_read_error_from_line(p, packet->header.size - 1, in php_mysqlnd_chg_user_read()
2055 if (packet->response_code == 0xFE && packet->header.size > (size_t) (p - buf)) { in php_mysqlnd_chg_user_read()
2059 packet->new_auth_protocol_data_len = packet->header.size - (size_t) (p - buf); in php_mysqlnd_chg_user_read()
2070 DBG_ERR_FMT("CHANGE_USER packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_chg_user_read()
2072 p - begin - packet->header.size); in php_mysqlnd_chg_user_read()
2097 mnd_pefree(p, p->header.persistent); in php_mysqlnd_chg_user_free_mem()
2126 mnd_pefree(p, p->header.persistent); in php_mysqlnd_sha256_pk_request_free_mem()
2152 packet->public_key_len = packet->header.size - (p - buf); in php_mysqlnd_sha256_pk_request_response_read()
2160 DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size); in php_mysqlnd_sha256_pk_request_response_read()
2162 p - begin - packet->header.size); in php_mysqlnd_sha256_pk_request_response_read()
2180 mnd_pefree(p, p->header.persistent); in php_mysqlnd_sha256_pk_request_response_free_mem()
2291 packet->header.m = &packet_methods[PROT_GREET_PACKET]; in MYSQLND_METHOD()
2292 packet->header.persistent = persistent; in MYSQLND_METHOD()
2306 packet->header.m = &packet_methods[PROT_AUTH_PACKET]; in MYSQLND_METHOD()
2307 packet->header.persistent = persistent; in MYSQLND_METHOD()
2321 packet->header.m = &packet_methods[PROT_AUTH_RESP_PACKET]; in MYSQLND_METHOD()
2322 packet->header.persistent = persistent; in MYSQLND_METHOD()
2336 packet->header.m = &packet_methods[PROT_CHANGE_AUTH_RESP_PACKET]; in MYSQLND_METHOD()
2337 packet->header.persistent = persistent; in MYSQLND_METHOD()
2351 packet->header.m = &packet_methods[PROT_OK_PACKET]; in MYSQLND_METHOD()
2352 packet->header.persistent = persistent; in MYSQLND_METHOD()
2366 packet->header.m = &packet_methods[PROT_EOF_PACKET]; in MYSQLND_METHOD()
2367 packet->header.persistent = persistent; in MYSQLND_METHOD()
2381 packet->header.m = &packet_methods[PROT_CMD_PACKET]; in MYSQLND_METHOD()
2382 packet->header.persistent = persistent; in MYSQLND_METHOD()
2396 packet->header.m = &packet_methods[PROT_RSET_HEADER_PACKET]; in MYSQLND_METHOD()
2397 packet->header.persistent = persistent; in MYSQLND_METHOD()
2411 packet->header.m = &packet_methods[PROT_RSET_FLD_PACKET]; in MYSQLND_METHOD()
2412 packet->header.persistent = persistent; in MYSQLND_METHOD()
2426 packet->header.m = &packet_methods[PROT_ROW_PACKET]; in MYSQLND_METHOD()
2427 packet->header.persistent = persistent; in MYSQLND_METHOD()
2441 packet->header.m = &packet_methods[PROT_STATS_PACKET]; in MYSQLND_METHOD()
2442 packet->header.persistent = persistent; in MYSQLND_METHOD()
2456 packet->header.m = &packet_methods[PROT_PREPARE_RESP_PACKET]; in MYSQLND_METHOD()
2457 packet->header.persistent = persistent; in MYSQLND_METHOD()
2471 packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET]; in MYSQLND_METHOD()
2472 packet->header.persistent = persistent; in MYSQLND_METHOD()
2486 packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_PACKET]; in MYSQLND_METHOD()
2487 packet->header.persistent = persistent; in MYSQLND_METHOD()
2501 packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET]; in MYSQLND_METHOD()
2502 packet->header.persistent = persistent; in MYSQLND_METHOD()