Lines Matching refs:conn

31 MYSQLND_METHOD(mysqlnd_command, set_option)(MYSQLND_CONN_DATA * const conn, const enum_mysqlnd_serv…  in MYSQLND_METHOD()
33 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
34 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
41 ret = send_command(conn->payload_decoder_factory, COM_SET_OPTION, buffer, sizeof(buffer), FALSE, in MYSQLND_METHOD()
42 &conn->state, in MYSQLND_METHOD()
43 conn->error_info, in MYSQLND_METHOD()
44 conn->upsert_status, in MYSQLND_METHOD()
45 conn->stats, in MYSQLND_METHOD()
46 conn->m->send_close, in MYSQLND_METHOD()
47 conn); in MYSQLND_METHOD()
49 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_SET_… in MYSQLND_METHOD()
50 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
59 MYSQLND_METHOD(mysqlnd_command, debug)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
61 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
62 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
67 ret = send_command(conn->payload_decoder_factory, COM_DEBUG, NULL, 0, FALSE, in MYSQLND_METHOD()
68 &conn->state, in MYSQLND_METHOD()
69 conn->error_info, in MYSQLND_METHOD()
70 conn->upsert_status, in MYSQLND_METHOD()
71 conn->stats, in MYSQLND_METHOD()
72 conn->m->send_close, in MYSQLND_METHOD()
73 conn); in MYSQLND_METHOD()
75 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_DEBU… in MYSQLND_METHOD()
76 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
86 MYSQLND_METHOD(mysqlnd_command, init_db)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING db) in MYSQLND_METHOD()
88 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
89 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
94 …ret = send_command(conn->payload_decoder_factory, COM_INIT_DB, (const zend_uchar*) db.s, db.l, FAL… in MYSQLND_METHOD()
95 &conn->state, in MYSQLND_METHOD()
96 conn->error_info, in MYSQLND_METHOD()
97 conn->upsert_status, in MYSQLND_METHOD()
98 conn->stats, in MYSQLND_METHOD()
99 conn->m->send_close, in MYSQLND_METHOD()
100 conn); in MYSQLND_METHOD()
102 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_INIT_… in MYSQLND_METHOD()
103 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
110 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
112 if (conn->connect_or_select_db.s) { in MYSQLND_METHOD()
113 mnd_pefree(conn->connect_or_select_db.s, conn->persistent); in MYSQLND_METHOD()
115 conn->connect_or_select_db.s = mnd_pestrndup(db.s, db.l, conn->persistent); in MYSQLND_METHOD()
116 conn->connect_or_select_db.l = db.l; in MYSQLND_METHOD()
117 if (!conn->connect_or_select_db.s) { in MYSQLND_METHOD()
119 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
131 MYSQLND_METHOD(mysqlnd_command, ping)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
133 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
134 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
139 ret = send_command(conn->payload_decoder_factory, COM_PING, NULL, 0, TRUE, in MYSQLND_METHOD()
140 &conn->state, in MYSQLND_METHOD()
141 conn->error_info, in MYSQLND_METHOD()
142 conn->upsert_status, in MYSQLND_METHOD()
143 conn->stats, in MYSQLND_METHOD()
144 conn->m->send_close, in MYSQLND_METHOD()
145 conn); in MYSQLND_METHOD()
147 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, TRUE, COM_PING, … in MYSQLND_METHOD()
148 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
154 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
163 MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message) in MYSQLND_METHOD()
165 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
170 ret = send_command(conn->payload_decoder_factory, COM_STATISTICS, NULL, 0, FALSE, in MYSQLND_METHOD()
171 &conn->state, in MYSQLND_METHOD()
172 conn->error_info, in MYSQLND_METHOD()
173 conn->upsert_status, in MYSQLND_METHOD()
174 conn->stats, in MYSQLND_METHOD()
175 conn->m->send_close, in MYSQLND_METHOD()
176 conn); in MYSQLND_METHOD()
181 conn->payload_decoder_factory->m.init_stats_packet(&stats_header); in MYSQLND_METHOD()
182 if (PASS == (ret = PACKET_READ(conn, &stats_header))) { in MYSQLND_METHOD()
197 MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int pr… in MYSQLND_METHOD()
199 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
200 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
207 ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE, in MYSQLND_METHOD()
208 &conn->state, in MYSQLND_METHOD()
209 conn->error_info, in MYSQLND_METHOD()
210 conn->upsert_status, in MYSQLND_METHOD()
211 conn->stats, in MYSQLND_METHOD()
212 conn->m->send_close, in MYSQLND_METHOD()
213 conn); in MYSQLND_METHOD()
215 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCE… in MYSQLND_METHOD()
216 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
224 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
226 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
227 conn->m->send_close(conn); in MYSQLND_METHOD()
237 MYSQLND_METHOD(mysqlnd_command, refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options) in MYSQLND_METHOD()
239 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
240 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
247 ret = send_command(conn->payload_decoder_factory, COM_REFRESH, bits, 1, FALSE, in MYSQLND_METHOD()
248 &conn->state, in MYSQLND_METHOD()
249 conn->error_info, in MYSQLND_METHOD()
250 conn->upsert_status, in MYSQLND_METHOD()
251 conn->stats, in MYSQLND_METHOD()
252 conn->m->send_close, in MYSQLND_METHOD()
253 conn); in MYSQLND_METHOD()
255 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_REFRE… in MYSQLND_METHOD()
256 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
266 MYSQLND_METHOD(mysqlnd_command, shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level) in MYSQLND_METHOD()
268 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
269 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
276 ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE, in MYSQLND_METHOD()
277 &conn->state, in MYSQLND_METHOD()
278 conn->error_info, in MYSQLND_METHOD()
279 conn->upsert_status, in MYSQLND_METHOD()
280 conn->stats, in MYSQLND_METHOD()
281 conn->m->send_close, in MYSQLND_METHOD()
282 conn); in MYSQLND_METHOD()
284 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTD… in MYSQLND_METHOD()
285 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
295 MYSQLND_METHOD(mysqlnd_command, quit)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
297 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
302 ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE, in MYSQLND_METHOD()
303 &conn->state, in MYSQLND_METHOD()
304 conn->error_info, in MYSQLND_METHOD()
305 conn->upsert_status, in MYSQLND_METHOD()
306 conn->stats, in MYSQLND_METHOD()
307 conn->m->send_close, in MYSQLND_METHOD()
308 conn); in MYSQLND_METHOD()
317 MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query) in MYSQLND_METHOD()
319 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
324 …ret = send_command(conn->payload_decoder_factory, COM_QUERY, (const zend_uchar*) query.s, query.l,… in MYSQLND_METHOD()
325 &conn->state, in MYSQLND_METHOD()
326 conn->error_info, in MYSQLND_METHOD()
327 conn->upsert_status, in MYSQLND_METHOD()
328 conn->stats, in MYSQLND_METHOD()
329 conn->m->send_close, in MYSQLND_METHOD()
330 conn); in MYSQLND_METHOD()
333 SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT); in MYSQLND_METHOD()
343 MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING … in MYSQLND_METHOD()
345 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
350 …ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (const zend_uchar*) payload.s, … in MYSQLND_METHOD()
351 &conn->state, in MYSQLND_METHOD()
352 conn->error_info, in MYSQLND_METHOD()
353 conn->upsert_status, in MYSQLND_METHOD()
354 conn->stats, in MYSQLND_METHOD()
355 conn->m->send_close, in MYSQLND_METHOD()
356 conn); in MYSQLND_METHOD()
365 MYSQLND_METHOD(mysqlnd_command, reap_result)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
367 const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state); in MYSQLND_METHOD()
376 ret = conn->m->query_read_result_set_header(conn, NULL); in MYSQLND_METHOD()
385 MYSQLND_METHOD(mysqlnd_command, stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING… in MYSQLND_METHOD()
387 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
392 …ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (const zend_uchar*) query.s, q… in MYSQLND_METHOD()
393 &conn->state, in MYSQLND_METHOD()
394 conn->error_info, in MYSQLND_METHOD()
395 conn->upsert_status, in MYSQLND_METHOD()
396 conn->stats, in MYSQLND_METHOD()
397 conn->m->send_close, in MYSQLND_METHOD()
398 conn); in MYSQLND_METHOD()
407 MYSQLND_METHOD(mysqlnd_command, stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING paylo… in MYSQLND_METHOD()
409 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
414 ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, in MYSQLND_METHOD()
416 &conn->state, in MYSQLND_METHOD()
417 conn->error_info, in MYSQLND_METHOD()
418 conn->upsert_status, in MYSQLND_METHOD()
419 conn->stats, in MYSQLND_METHOD()
420 conn->m->send_close, in MYSQLND_METHOD()
421 conn); in MYSQLND_METHOD()
430 MYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING p… in MYSQLND_METHOD()
432 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
437 …ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, p… in MYSQLND_METHOD()
438 &conn->state, in MYSQLND_METHOD()
439 conn->error_info, in MYSQLND_METHOD()
440 conn->upsert_status, in MYSQLND_METHOD()
441 conn->stats, in MYSQLND_METHOD()
442 conn->m->send_close, in MYSQLND_METHOD()
443 conn); in MYSQLND_METHOD()
452 MYSQLND_METHOD(mysqlnd_command, stmt_reset)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
454 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
455 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
462 ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
463 &conn->state, in MYSQLND_METHOD()
464 conn->error_info, in MYSQLND_METHOD()
465 conn->upsert_status, in MYSQLND_METHOD()
466 conn->stats, in MYSQLND_METHOD()
467 conn->m->send_close, in MYSQLND_METHOD()
468 conn); in MYSQLND_METHOD()
470 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_… in MYSQLND_METHOD()
471 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
481 MYSQLND_METHOD(mysqlnd_command, stmt_send_long_data)(MYSQLND_CONN_DATA * const conn, const MYSQLND_… in MYSQLND_METHOD()
483 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
488 …ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (const zend_uchar*) pay… in MYSQLND_METHOD()
489 &conn->state, in MYSQLND_METHOD()
490 conn->error_info, in MYSQLND_METHOD()
491 conn->upsert_status, in MYSQLND_METHOD()
492 conn->stats, in MYSQLND_METHOD()
493 conn->m->send_close, in MYSQLND_METHOD()
494 conn); in MYSQLND_METHOD()
503 MYSQLND_METHOD(mysqlnd_command, stmt_close)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
505 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
512 ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
513 &conn->state, in MYSQLND_METHOD()
514 conn->error_info, in MYSQLND_METHOD()
515 conn->upsert_status, in MYSQLND_METHOD()
516 conn->stats, in MYSQLND_METHOD()
517 conn->m->send_close, in MYSQLND_METHOD()
518 conn); in MYSQLND_METHOD()
527 MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, const size_t client_cap… in MYSQLND_METHOD()
560 conn->payload_decoder_factory->m.init_auth_packet(&auth_packet); in MYSQLND_METHOD()
578 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
582conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &… in MYSQLND_METHOD()
584 if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) { in MYSQLND_METHOD()
591 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
601 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
602 conn->m->send_close(conn); in MYSQLND_METHOD()
603 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); in MYSQLND_METHOD()
612 MYSQLND_METHOD(mysqlnd_command, handshake)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING us… in MYSQLND_METHOD()
628 DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio)); in MYSQLND_METHOD()
631 conn->payload_decoder_factory->m.init_greet_packet(&greet_packet); in MYSQLND_METHOD()
633 if (FAIL == PACKET_READ(conn, &greet_packet)) { in MYSQLND_METHOD()
639 …SET_CLIENT_ERROR(conn->error_info, greet_packet.error_no, greet_packet.sqlstate, greet_packet.erro… in MYSQLND_METHOD()
645 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, in MYSQLND_METHOD()
650 conn->thread_id = greet_packet.thread_id; in MYSQLND_METHOD()
651 conn->protocol_version = greet_packet.protocol_version; in MYSQLND_METHOD()
652 conn->server_version = mnd_pestrdup(greet_packet.server_version, conn->persistent); in MYSQLND_METHOD()
654 conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no); in MYSQLND_METHOD()
655 if (!conn->greet_charset) { in MYSQLND_METHOD()
658 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, in MYSQLND_METHOD()
663 conn->server_capabilities = greet_packet.server_capabilities; in MYSQLND_METHOD()
665 if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len, in MYSQLND_METHOD()
668 conn->options, mysql_flags)) in MYSQLND_METHOD()
673 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
674 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, greet_packet.server_status); in MYSQLND_METHOD()
679 conn->server_capabilities = 0; in MYSQLND_METHOD()