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 mysqlnd_set_persistent_string(&conn->connect_or_select_db, db.s, db.l, conn->persistent); in MYSQLND_METHOD()
120 MYSQLND_METHOD(mysqlnd_command, ping)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
122 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
123 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
128 ret = send_command(conn->payload_decoder_factory, COM_PING, NULL, 0, TRUE, in MYSQLND_METHOD()
129 &conn->state, in MYSQLND_METHOD()
130 conn->error_info, in MYSQLND_METHOD()
131 conn->upsert_status, in MYSQLND_METHOD()
132 conn->stats, in MYSQLND_METHOD()
133 conn->m->send_close, in MYSQLND_METHOD()
134 conn); in MYSQLND_METHOD()
136 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, TRUE, COM_PING, … in MYSQLND_METHOD()
137 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
143 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
152 MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message) in MYSQLND_METHOD()
154 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
159 ret = send_command(conn->payload_decoder_factory, COM_STATISTICS, NULL, 0, FALSE, in MYSQLND_METHOD()
160 &conn->state, in MYSQLND_METHOD()
161 conn->error_info, in MYSQLND_METHOD()
162 conn->upsert_status, in MYSQLND_METHOD()
163 conn->stats, in MYSQLND_METHOD()
164 conn->m->send_close, in MYSQLND_METHOD()
165 conn); in MYSQLND_METHOD()
170 conn->payload_decoder_factory->m.init_stats_packet(&stats_header); in MYSQLND_METHOD()
171 if (PASS == (ret = PACKET_READ(conn, &stats_header))) { in MYSQLND_METHOD()
186 MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int pr… in MYSQLND_METHOD()
188 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
189 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
196 ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE, in MYSQLND_METHOD()
197 &conn->state, in MYSQLND_METHOD()
198 conn->error_info, in MYSQLND_METHOD()
199 conn->upsert_status, in MYSQLND_METHOD()
200 conn->stats, in MYSQLND_METHOD()
201 conn->m->send_close, in MYSQLND_METHOD()
202 conn); in MYSQLND_METHOD()
204 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCE… in MYSQLND_METHOD()
205 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
213 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
215 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
216 conn->m->send_close(conn); in MYSQLND_METHOD()
226 MYSQLND_METHOD(mysqlnd_command, refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options) in MYSQLND_METHOD()
228 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
229 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
236 ret = send_command(conn->payload_decoder_factory, COM_REFRESH, bits, 1, FALSE, in MYSQLND_METHOD()
237 &conn->state, in MYSQLND_METHOD()
238 conn->error_info, in MYSQLND_METHOD()
239 conn->upsert_status, in MYSQLND_METHOD()
240 conn->stats, in MYSQLND_METHOD()
241 conn->m->send_close, in MYSQLND_METHOD()
242 conn); in MYSQLND_METHOD()
244 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_REFRE… in MYSQLND_METHOD()
245 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
255 MYSQLND_METHOD(mysqlnd_command, shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level) in MYSQLND_METHOD()
257 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
258 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
265 ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE, in MYSQLND_METHOD()
266 &conn->state, in MYSQLND_METHOD()
267 conn->error_info, in MYSQLND_METHOD()
268 conn->upsert_status, in MYSQLND_METHOD()
269 conn->stats, in MYSQLND_METHOD()
270 conn->m->send_close, in MYSQLND_METHOD()
271 conn); in MYSQLND_METHOD()
273 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTD… in MYSQLND_METHOD()
274 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
284 MYSQLND_METHOD(mysqlnd_command, quit)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
286 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
291 ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE, in MYSQLND_METHOD()
292 &conn->state, in MYSQLND_METHOD()
293 conn->error_info, in MYSQLND_METHOD()
294 conn->upsert_status, in MYSQLND_METHOD()
295 conn->stats, in MYSQLND_METHOD()
296 conn->m->send_close, in MYSQLND_METHOD()
297 conn); in MYSQLND_METHOD()
306 MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query) in MYSQLND_METHOD()
308 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
313 …ret = send_command(conn->payload_decoder_factory, COM_QUERY, (const zend_uchar*) query.s, query.l,… in MYSQLND_METHOD()
314 &conn->state, in MYSQLND_METHOD()
315 conn->error_info, in MYSQLND_METHOD()
316 conn->upsert_status, in MYSQLND_METHOD()
317 conn->stats, in MYSQLND_METHOD()
318 conn->m->send_close, in MYSQLND_METHOD()
319 conn); in MYSQLND_METHOD()
322 SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT); in MYSQLND_METHOD()
332 MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING … in MYSQLND_METHOD()
334 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
339 …ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (const zend_uchar*) payload.s, … in MYSQLND_METHOD()
340 &conn->state, in MYSQLND_METHOD()
341 conn->error_info, in MYSQLND_METHOD()
342 conn->upsert_status, in MYSQLND_METHOD()
343 conn->stats, in MYSQLND_METHOD()
344 conn->m->send_close, in MYSQLND_METHOD()
345 conn); in MYSQLND_METHOD()
354 MYSQLND_METHOD(mysqlnd_command, reap_result)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
356 const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state); in MYSQLND_METHOD()
365 ret = conn->m->query_read_result_set_header(conn, NULL); in MYSQLND_METHOD()
374 MYSQLND_METHOD(mysqlnd_command, stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING… in MYSQLND_METHOD()
376 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
381 …ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (const zend_uchar*) query.s, q… in MYSQLND_METHOD()
382 &conn->state, in MYSQLND_METHOD()
383 conn->error_info, in MYSQLND_METHOD()
384 conn->upsert_status, in MYSQLND_METHOD()
385 conn->stats, in MYSQLND_METHOD()
386 conn->m->send_close, in MYSQLND_METHOD()
387 conn); in MYSQLND_METHOD()
396 MYSQLND_METHOD(mysqlnd_command, stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING paylo… in MYSQLND_METHOD()
398 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
403 ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, in MYSQLND_METHOD()
405 &conn->state, in MYSQLND_METHOD()
406 conn->error_info, in MYSQLND_METHOD()
407 conn->upsert_status, in MYSQLND_METHOD()
408 conn->stats, in MYSQLND_METHOD()
409 conn->m->send_close, in MYSQLND_METHOD()
410 conn); in MYSQLND_METHOD()
419 MYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING p… in MYSQLND_METHOD()
421 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
426 …ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, p… in MYSQLND_METHOD()
427 &conn->state, in MYSQLND_METHOD()
428 conn->error_info, in MYSQLND_METHOD()
429 conn->upsert_status, in MYSQLND_METHOD()
430 conn->stats, in MYSQLND_METHOD()
431 conn->m->send_close, in MYSQLND_METHOD()
432 conn); in MYSQLND_METHOD()
441 MYSQLND_METHOD(mysqlnd_command, stmt_reset)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
443 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
444 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
451 ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
452 &conn->state, in MYSQLND_METHOD()
453 conn->error_info, in MYSQLND_METHOD()
454 conn->upsert_status, in MYSQLND_METHOD()
455 conn->stats, in MYSQLND_METHOD()
456 conn->m->send_close, in MYSQLND_METHOD()
457 conn); in MYSQLND_METHOD()
459 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_… in MYSQLND_METHOD()
460 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
470 MYSQLND_METHOD(mysqlnd_command, stmt_send_long_data)(MYSQLND_CONN_DATA * const conn, const MYSQLND_… in MYSQLND_METHOD()
472 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
477 …ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (const zend_uchar*) pay… in MYSQLND_METHOD()
478 &conn->state, in MYSQLND_METHOD()
479 conn->error_info, in MYSQLND_METHOD()
480 conn->upsert_status, in MYSQLND_METHOD()
481 conn->stats, in MYSQLND_METHOD()
482 conn->m->send_close, in MYSQLND_METHOD()
483 conn); in MYSQLND_METHOD()
492 MYSQLND_METHOD(mysqlnd_command, stmt_close)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
494 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
501 ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
502 &conn->state, in MYSQLND_METHOD()
503 conn->error_info, in MYSQLND_METHOD()
504 conn->upsert_status, in MYSQLND_METHOD()
505 conn->stats, in MYSQLND_METHOD()
506 conn->m->send_close, in MYSQLND_METHOD()
507 conn); in MYSQLND_METHOD()
516 MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, const size_t client_cap… in MYSQLND_METHOD()
549 conn->payload_decoder_factory->m.init_auth_packet(&auth_packet); in MYSQLND_METHOD()
567 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
571 …conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &… in MYSQLND_METHOD()
573 if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) { in MYSQLND_METHOD()
574 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
575 …SET_CLIENT_ERROR(conn->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "Cannot connect to MySQL… in MYSQLND_METHOD()
582 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
592 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
593 conn->m->send_close(conn); in MYSQLND_METHOD()
594 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); in MYSQLND_METHOD()
603 MYSQLND_METHOD(mysqlnd_command, handshake)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING us… in MYSQLND_METHOD()
619 DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio)); in MYSQLND_METHOD()
622 conn->payload_decoder_factory->m.init_greet_packet(&greet_packet); in MYSQLND_METHOD()
624 if (FAIL == PACKET_READ(conn, &greet_packet)) { in MYSQLND_METHOD()
630 …SET_CLIENT_ERROR(conn->error_info, greet_packet.error_no, greet_packet.sqlstate, greet_packet.erro… in MYSQLND_METHOD()
636 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, msg); in MYSQLND_METHOD()
641 conn->thread_id = greet_packet.thread_id; in MYSQLND_METHOD()
642 conn->protocol_version = greet_packet.protocol_version; in MYSQLND_METHOD()
643 conn->server_version = mnd_pestrdup(greet_packet.server_version, conn->persistent); in MYSQLND_METHOD()
645 conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no); in MYSQLND_METHOD()
646 if (!conn->greet_charset) { in MYSQLND_METHOD()
649 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, msg); in MYSQLND_METHOD()
654 conn->server_capabilities = greet_packet.server_capabilities; in MYSQLND_METHOD()
656 if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len, in MYSQLND_METHOD()
659 conn->options, mysql_flags)) in MYSQLND_METHOD()
664 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
665 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, greet_packet.server_status); in MYSQLND_METHOD()
670 conn->server_capabilities = 0; in MYSQLND_METHOD()