Lines Matching refs:conn

29 MYSQLND_METHOD(mysqlnd_command, set_option)(MYSQLND_CONN_DATA * const conn, const enum_mysqlnd_serv…  in MYSQLND_METHOD()
31 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
32 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
39 ret = send_command(conn->payload_decoder_factory, COM_SET_OPTION, buffer, sizeof(buffer), FALSE, in MYSQLND_METHOD()
40 &conn->state, in MYSQLND_METHOD()
41 conn->error_info, in MYSQLND_METHOD()
42 conn->upsert_status, in MYSQLND_METHOD()
43 conn->stats, in MYSQLND_METHOD()
44 conn->m->send_close, in MYSQLND_METHOD()
45 conn); in MYSQLND_METHOD()
47 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_SET_… in MYSQLND_METHOD()
48 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
57 MYSQLND_METHOD(mysqlnd_command, debug)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
59 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
60 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
65 ret = send_command(conn->payload_decoder_factory, COM_DEBUG, NULL, 0, FALSE, in MYSQLND_METHOD()
66 &conn->state, in MYSQLND_METHOD()
67 conn->error_info, in MYSQLND_METHOD()
68 conn->upsert_status, in MYSQLND_METHOD()
69 conn->stats, in MYSQLND_METHOD()
70 conn->m->send_close, in MYSQLND_METHOD()
71 conn); in MYSQLND_METHOD()
73 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_DEBU… in MYSQLND_METHOD()
74 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
84 MYSQLND_METHOD(mysqlnd_command, init_db)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING db) in MYSQLND_METHOD()
86 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
87 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
92 …ret = send_command(conn->payload_decoder_factory, COM_INIT_DB, (const zend_uchar*) db.s, db.l, FAL… in MYSQLND_METHOD()
93 &conn->state, in MYSQLND_METHOD()
94 conn->error_info, in MYSQLND_METHOD()
95 conn->upsert_status, in MYSQLND_METHOD()
96 conn->stats, in MYSQLND_METHOD()
97 conn->m->send_close, in MYSQLND_METHOD()
98 conn); in MYSQLND_METHOD()
100 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_INIT_… in MYSQLND_METHOD()
101 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
108 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
110 if (conn->connect_or_select_db.s) { in MYSQLND_METHOD()
111 mnd_pefree(conn->connect_or_select_db.s, conn->persistent); in MYSQLND_METHOD()
113 conn->connect_or_select_db.s = mnd_pestrndup(db.s, db.l, conn->persistent); in MYSQLND_METHOD()
114 conn->connect_or_select_db.l = db.l; in MYSQLND_METHOD()
115 if (!conn->connect_or_select_db.s) { in MYSQLND_METHOD()
117 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
129 MYSQLND_METHOD(mysqlnd_command, ping)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
131 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
132 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
137 ret = send_command(conn->payload_decoder_factory, COM_PING, NULL, 0, TRUE, in MYSQLND_METHOD()
138 &conn->state, in MYSQLND_METHOD()
139 conn->error_info, in MYSQLND_METHOD()
140 conn->upsert_status, in MYSQLND_METHOD()
141 conn->stats, in MYSQLND_METHOD()
142 conn->m->send_close, in MYSQLND_METHOD()
143 conn); in MYSQLND_METHOD()
145 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, TRUE, COM_PING, … in MYSQLND_METHOD()
146 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
152 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
161 MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message) in MYSQLND_METHOD()
163 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
168 ret = send_command(conn->payload_decoder_factory, COM_STATISTICS, NULL, 0, FALSE, in MYSQLND_METHOD()
169 &conn->state, in MYSQLND_METHOD()
170 conn->error_info, in MYSQLND_METHOD()
171 conn->upsert_status, in MYSQLND_METHOD()
172 conn->stats, in MYSQLND_METHOD()
173 conn->m->send_close, in MYSQLND_METHOD()
174 conn); in MYSQLND_METHOD()
179 conn->payload_decoder_factory->m.init_stats_packet(&stats_header); in MYSQLND_METHOD()
180 if (PASS == (ret = PACKET_READ(conn, &stats_header))) { in MYSQLND_METHOD()
195 MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int pr… in MYSQLND_METHOD()
197 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
198 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
205 ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE, in MYSQLND_METHOD()
206 &conn->state, in MYSQLND_METHOD()
207 conn->error_info, in MYSQLND_METHOD()
208 conn->upsert_status, in MYSQLND_METHOD()
209 conn->stats, in MYSQLND_METHOD()
210 conn->m->send_close, in MYSQLND_METHOD()
211 conn); in MYSQLND_METHOD()
213 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCE… in MYSQLND_METHOD()
214 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
222 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
224 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
225 conn->m->send_close(conn); in MYSQLND_METHOD()
235 MYSQLND_METHOD(mysqlnd_command, refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options) in MYSQLND_METHOD()
237 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
238 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
245 ret = send_command(conn->payload_decoder_factory, COM_REFRESH, bits, 1, FALSE, in MYSQLND_METHOD()
246 &conn->state, in MYSQLND_METHOD()
247 conn->error_info, in MYSQLND_METHOD()
248 conn->upsert_status, in MYSQLND_METHOD()
249 conn->stats, in MYSQLND_METHOD()
250 conn->m->send_close, in MYSQLND_METHOD()
251 conn); in MYSQLND_METHOD()
253 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_REFRE… in MYSQLND_METHOD()
254 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
264 MYSQLND_METHOD(mysqlnd_command, shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level) in MYSQLND_METHOD()
266 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
267 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
274 ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE, in MYSQLND_METHOD()
275 &conn->state, in MYSQLND_METHOD()
276 conn->error_info, in MYSQLND_METHOD()
277 conn->upsert_status, in MYSQLND_METHOD()
278 conn->stats, in MYSQLND_METHOD()
279 conn->m->send_close, in MYSQLND_METHOD()
280 conn); in MYSQLND_METHOD()
282 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTD… in MYSQLND_METHOD()
283 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
293 MYSQLND_METHOD(mysqlnd_command, quit)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
295 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
300 ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE, in MYSQLND_METHOD()
301 &conn->state, in MYSQLND_METHOD()
302 conn->error_info, in MYSQLND_METHOD()
303 conn->upsert_status, in MYSQLND_METHOD()
304 conn->stats, in MYSQLND_METHOD()
305 conn->m->send_close, in MYSQLND_METHOD()
306 conn); in MYSQLND_METHOD()
315 MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query) in MYSQLND_METHOD()
317 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
322 …ret = send_command(conn->payload_decoder_factory, COM_QUERY, (const zend_uchar*) query.s, query.l,… in MYSQLND_METHOD()
323 &conn->state, in MYSQLND_METHOD()
324 conn->error_info, in MYSQLND_METHOD()
325 conn->upsert_status, in MYSQLND_METHOD()
326 conn->stats, in MYSQLND_METHOD()
327 conn->m->send_close, in MYSQLND_METHOD()
328 conn); in MYSQLND_METHOD()
331 SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT); in MYSQLND_METHOD()
341 MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING … in MYSQLND_METHOD()
343 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
348 …ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (const zend_uchar*) payload.s, … in MYSQLND_METHOD()
349 &conn->state, in MYSQLND_METHOD()
350 conn->error_info, in MYSQLND_METHOD()
351 conn->upsert_status, in MYSQLND_METHOD()
352 conn->stats, in MYSQLND_METHOD()
353 conn->m->send_close, in MYSQLND_METHOD()
354 conn); in MYSQLND_METHOD()
363 MYSQLND_METHOD(mysqlnd_command, reap_result)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
365 const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state); in MYSQLND_METHOD()
374 ret = conn->m->query_read_result_set_header(conn, NULL); in MYSQLND_METHOD()
383 MYSQLND_METHOD(mysqlnd_command, stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING… in MYSQLND_METHOD()
385 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
390 …ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (const zend_uchar*) query.s, q… in MYSQLND_METHOD()
391 &conn->state, in MYSQLND_METHOD()
392 conn->error_info, in MYSQLND_METHOD()
393 conn->upsert_status, in MYSQLND_METHOD()
394 conn->stats, in MYSQLND_METHOD()
395 conn->m->send_close, in MYSQLND_METHOD()
396 conn); in MYSQLND_METHOD()
405 MYSQLND_METHOD(mysqlnd_command, stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING paylo… in MYSQLND_METHOD()
407 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
412 ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, in MYSQLND_METHOD()
414 &conn->state, in MYSQLND_METHOD()
415 conn->error_info, in MYSQLND_METHOD()
416 conn->upsert_status, in MYSQLND_METHOD()
417 conn->stats, in MYSQLND_METHOD()
418 conn->m->send_close, in MYSQLND_METHOD()
419 conn); in MYSQLND_METHOD()
428 MYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING p… in MYSQLND_METHOD()
430 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
435 …ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, p… in MYSQLND_METHOD()
436 &conn->state, in MYSQLND_METHOD()
437 conn->error_info, in MYSQLND_METHOD()
438 conn->upsert_status, in MYSQLND_METHOD()
439 conn->stats, in MYSQLND_METHOD()
440 conn->m->send_close, in MYSQLND_METHOD()
441 conn); in MYSQLND_METHOD()
450 MYSQLND_METHOD(mysqlnd_command, stmt_reset)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
452 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
453 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
460 ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
461 &conn->state, in MYSQLND_METHOD()
462 conn->error_info, in MYSQLND_METHOD()
463 conn->upsert_status, in MYSQLND_METHOD()
464 conn->stats, in MYSQLND_METHOD()
465 conn->m->send_close, in MYSQLND_METHOD()
466 conn); in MYSQLND_METHOD()
468 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_… in MYSQLND_METHOD()
469 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
479 MYSQLND_METHOD(mysqlnd_command, stmt_send_long_data)(MYSQLND_CONN_DATA * const conn, const MYSQLND_… in MYSQLND_METHOD()
481 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
486 …ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (const zend_uchar*) pay… in MYSQLND_METHOD()
487 &conn->state, in MYSQLND_METHOD()
488 conn->error_info, in MYSQLND_METHOD()
489 conn->upsert_status, in MYSQLND_METHOD()
490 conn->stats, in MYSQLND_METHOD()
491 conn->m->send_close, in MYSQLND_METHOD()
492 conn); in MYSQLND_METHOD()
501 MYSQLND_METHOD(mysqlnd_command, stmt_close)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
503 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
510 ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
511 &conn->state, in MYSQLND_METHOD()
512 conn->error_info, in MYSQLND_METHOD()
513 conn->upsert_status, in MYSQLND_METHOD()
514 conn->stats, in MYSQLND_METHOD()
515 conn->m->send_close, in MYSQLND_METHOD()
516 conn); in MYSQLND_METHOD()
525 MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, const size_t client_cap… in MYSQLND_METHOD()
558 conn->payload_decoder_factory->m.init_auth_packet(&auth_packet); in MYSQLND_METHOD()
576 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
580conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &… in MYSQLND_METHOD()
582 if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) { in MYSQLND_METHOD()
589 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
599 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
600 conn->m->send_close(conn); in MYSQLND_METHOD()
601 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); in MYSQLND_METHOD()
610 MYSQLND_METHOD(mysqlnd_command, handshake)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING us… in MYSQLND_METHOD()
626 DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio)); in MYSQLND_METHOD()
629 conn->payload_decoder_factory->m.init_greet_packet(&greet_packet); in MYSQLND_METHOD()
631 if (FAIL == PACKET_READ(conn, &greet_packet)) { in MYSQLND_METHOD()
637 …SET_CLIENT_ERROR(conn->error_info, greet_packet.error_no, greet_packet.sqlstate, greet_packet.erro… in MYSQLND_METHOD()
643 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, in MYSQLND_METHOD()
648 conn->thread_id = greet_packet.thread_id; in MYSQLND_METHOD()
649 conn->protocol_version = greet_packet.protocol_version; in MYSQLND_METHOD()
650 conn->server_version = mnd_pestrdup(greet_packet.server_version, conn->persistent); in MYSQLND_METHOD()
652 conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no); in MYSQLND_METHOD()
653 if (!conn->greet_charset) { in MYSQLND_METHOD()
656 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, in MYSQLND_METHOD()
661 conn->server_capabilities = greet_packet.server_capabilities; in MYSQLND_METHOD()
663 if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len, in MYSQLND_METHOD()
666 conn->options, mysql_flags)) in MYSQLND_METHOD()
671 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
672 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, greet_packet.server_status); in MYSQLND_METHOD()
677 conn->server_capabilities = 0; in MYSQLND_METHOD()