Lines Matching refs:pfc

33 MYSQLND_METHOD(mysqlnd_pfc, reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const conn_stats, MYSQL…  in MYSQLND_METHOD()
36 pfc->data->packet_no = pfc->data->compressed_envelope_packet_no = 0; in MYSQLND_METHOD()
53 const MYSQLND_PFC *pfc, MYSQLND_VIO *vio, in write_compressed_packet() argument
60 …if (PASS == pfc->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tm… in write_compressed_packet()
72 int1store(compress_buf + 3, pfc->data->compressed_envelope_packet_no); in write_compressed_packet()
76 pfc->data->compressed_envelope_packet_no++; in write_compressed_packet()
81 int error = pfc->data->m.decode(decompressed_data, decompressed_size, in write_compressed_packet()
115 MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * co… in MYSQLND_METHOD()
128 DBG_INF_FMT("count=%zu compression=%u", count, pfc->data->compressed); in MYSQLND_METHOD()
130 if (pfc->data->compressed == TRUE) { in MYSQLND_METHOD()
140 DBG_INF_FMT("compressed_envelope_packet_no=%u", pfc->data->compressed_envelope_packet_no); in MYSQLND_METHOD()
141 DBG_INF_FMT("packet_no=%u", pfc->data->packet_no); in MYSQLND_METHOD()
143 if (pfc->data->compressed == TRUE) { in MYSQLND_METHOD()
147 int1store(uncompressed_payload + 3, pfc->data->packet_no); in MYSQLND_METHOD()
150 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
157 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
160 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
171 int1store(p + 3, pfc->data->packet_no); in MYSQLND_METHOD()
174 pfc->data->compressed_envelope_packet_no++; in MYSQLND_METHOD()
176 pfc->data->packet_no++; in MYSQLND_METHOD()
190 DBG_INF_FMT("packet_size=%zu packet_no=%u", left, pfc->data->packet_no); in MYSQLND_METHOD()
217 …(MYSQLND_PFC * pfc, MYSQLND_VIO * vio, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLN… in MYSQLND_METHOD()
240 pfc->data->uncompressed_data = mysqlnd_create_read_buffer(decompressed_size); in MYSQLND_METHOD()
241 …retval = pfc->data->m.decode(pfc->data->uncompressed_data->data, decompressed_size, compressed_dat… in MYSQLND_METHOD()
247 pfc->data->uncompressed_data = mysqlnd_create_read_buffer(net_payload_size); in MYSQLND_METHOD()
248 …if (FAIL == vio->data->m.network_read(vio, pfc->data->uncompressed_data->data, net_payload_size, c… in MYSQLND_METHOD()
316 MYSQLND_METHOD(mysqlnd_pfc, receive)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar *… in MYSQLND_METHOD()
324 if (pfc->data->compressed) { in MYSQLND_METHOD()
325 if (pfc->data->uncompressed_data) { in MYSQLND_METHOD()
326 …size_t to_read_from_buffer = MIN(pfc->data->uncompressed_data->bytes_left(pfc->data->uncompressed_… in MYSQLND_METHOD()
329pfc->data->uncompressed_data->read(pfc->data->uncompressed_data, to_read_from_buffer, (zend_uchar … in MYSQLND_METHOD()
334 if (TRUE == pfc->data->uncompressed_data->is_empty(pfc->data->uncompressed_data)) { in MYSQLND_METHOD()
336 pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data); in MYSQLND_METHOD()
349 if (pfc->data->compressed_envelope_packet_no != packet_no) { in MYSQLND_METHOD()
351 pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size); in MYSQLND_METHOD()
354 pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size); in MYSQLND_METHOD()
357 pfc->data->compressed_envelope_packet_no++; in MYSQLND_METHOD()
362pfc->data->m.read_compressed_packet_from_stream_and_fill_read_buffer(pfc, vio, net_payload_size, c… in MYSQLND_METHOD()
370 DBG_RETURN(pfc->data->m.receive(pfc, vio, p, to_read, conn_stats, error_info)); in MYSQLND_METHOD()
382 MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mysqlnd_client_option … in MYSQLND_METHOD()
388 pfc->data->flags |= MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION; in MYSQLND_METHOD()
391 const bool pers = pfc->persistent; in MYSQLND_METHOD()
392 if (pfc->data->sha256_server_public_key) { in MYSQLND_METHOD()
393 mnd_pefree(pfc->data->sha256_server_public_key, pers); in MYSQLND_METHOD()
395 pfc->data->sha256_server_public_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
403 pfc->cmd_buffer.length = *(unsigned int*) value; in MYSQLND_METHOD()
404 DBG_INF_FMT("new_length=%zu", pfc->cmd_buffer.length); in MYSQLND_METHOD()
405 if (!pfc->cmd_buffer.buffer) { in MYSQLND_METHOD()
406 pfc->cmd_buffer.buffer = mnd_pemalloc(pfc->cmd_buffer.length, pfc->persistent); in MYSQLND_METHOD()
408pfc->cmd_buffer.buffer = mnd_perealloc(pfc->cmd_buffer.buffer, pfc->cmd_buffer.length, pfc->persis… in MYSQLND_METHOD()
422 MYSQLND_METHOD(mysqlnd_pfc, free_contents)(MYSQLND_PFC * pfc) in MYSQLND_METHOD()
427 if (pfc->data->uncompressed_data) { in MYSQLND_METHOD()
428 pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data); in MYSQLND_METHOD()
431 if (pfc->data->sha256_server_public_key) { in MYSQLND_METHOD()
432 mnd_pefree(pfc->data->sha256_server_public_key, pfc->persistent); in MYSQLND_METHOD()
433 pfc->data->sha256_server_public_key = NULL; in MYSQLND_METHOD()
443 MYSQLND_METHOD(mysqlnd_pfc, init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
449 pfc->data->m.set_client_option(pfc, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size); in MYSQLND_METHOD()
458 MYSQLND_METHOD(mysqlnd_pfc, dtor)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
461 if (pfc) { in MYSQLND_METHOD()
462 pfc->data->m.free_contents(pfc); in MYSQLND_METHOD()
464 if (pfc->cmd_buffer.buffer) { in MYSQLND_METHOD()
466 mnd_pefree(pfc->cmd_buffer.buffer, pfc->persistent); in MYSQLND_METHOD()
467 pfc->cmd_buffer.buffer = NULL; in MYSQLND_METHOD()
470 mnd_pefree(pfc, pfc->persistent); in MYSQLND_METHOD()
505 MYSQLND_PFC * pfc; in mysqlnd_pfc_init() local
507 pfc = factory->get_protocol_frame_codec(persistent, stats, error_info); in mysqlnd_pfc_init()
508 DBG_RETURN(pfc); in mysqlnd_pfc_init()
515 mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) in mysqlnd_pfc_free() argument
518 if (pfc) { in mysqlnd_pfc_free()
519 pfc->data->m.dtor(pfc, stats, error_info); in mysqlnd_pfc_free()