Lines Matching refs:conn
30 MYSQLND_METHOD(mysqlnd_command, set_option)(MYSQLND_CONN_DATA * const conn, const enum_mysqlnd_serv… in MYSQLND_METHOD()
32 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
33 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
40 ret = send_command(conn->payload_decoder_factory, COM_SET_OPTION, buffer, sizeof(buffer), FALSE, in MYSQLND_METHOD()
41 &conn->state, in MYSQLND_METHOD()
42 conn->error_info, in MYSQLND_METHOD()
43 conn->upsert_status, in MYSQLND_METHOD()
44 conn->stats, in MYSQLND_METHOD()
45 conn->m->send_close, in MYSQLND_METHOD()
46 conn); in MYSQLND_METHOD()
48 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_SET_… in MYSQLND_METHOD()
49 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
58 MYSQLND_METHOD(mysqlnd_command, debug)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
60 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
61 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
66 ret = send_command(conn->payload_decoder_factory, COM_DEBUG, NULL, 0, FALSE, in MYSQLND_METHOD()
67 &conn->state, in MYSQLND_METHOD()
68 conn->error_info, in MYSQLND_METHOD()
69 conn->upsert_status, in MYSQLND_METHOD()
70 conn->stats, in MYSQLND_METHOD()
71 conn->m->send_close, in MYSQLND_METHOD()
72 conn); in MYSQLND_METHOD()
74 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_DEBU… in MYSQLND_METHOD()
75 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
85 MYSQLND_METHOD(mysqlnd_command, init_db)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING db) in MYSQLND_METHOD()
87 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
88 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
93 …ret = send_command(conn->payload_decoder_factory, COM_INIT_DB, (const zend_uchar*) db.s, db.l, FAL… in MYSQLND_METHOD()
94 &conn->state, in MYSQLND_METHOD()
95 conn->error_info, in MYSQLND_METHOD()
96 conn->upsert_status, in MYSQLND_METHOD()
97 conn->stats, in MYSQLND_METHOD()
98 conn->m->send_close, in MYSQLND_METHOD()
99 conn); in MYSQLND_METHOD()
101 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_INIT_… in MYSQLND_METHOD()
102 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
109 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
111 mysqlnd_set_persistent_string(&conn->connect_or_select_db, db.s, db.l, conn->persistent); in MYSQLND_METHOD()
121 MYSQLND_METHOD(mysqlnd_command, ping)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
123 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
124 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
129 ret = send_command(conn->payload_decoder_factory, COM_PING, NULL, 0, TRUE, in MYSQLND_METHOD()
130 &conn->state, in MYSQLND_METHOD()
131 conn->error_info, in MYSQLND_METHOD()
132 conn->upsert_status, in MYSQLND_METHOD()
133 conn->stats, in MYSQLND_METHOD()
134 conn->m->send_close, in MYSQLND_METHOD()
135 conn); in MYSQLND_METHOD()
137 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, TRUE, COM_PING, … in MYSQLND_METHOD()
138 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
144 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
153 MYSQLND_METHOD(mysqlnd_command, statistics)(MYSQLND_CONN_DATA * const conn, zend_string ** message) in MYSQLND_METHOD()
155 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
160 ret = send_command(conn->payload_decoder_factory, COM_STATISTICS, NULL, 0, FALSE, in MYSQLND_METHOD()
161 &conn->state, in MYSQLND_METHOD()
162 conn->error_info, in MYSQLND_METHOD()
163 conn->upsert_status, in MYSQLND_METHOD()
164 conn->stats, in MYSQLND_METHOD()
165 conn->m->send_close, in MYSQLND_METHOD()
166 conn); in MYSQLND_METHOD()
171 conn->payload_decoder_factory->m.init_stats_packet(&stats_header); in MYSQLND_METHOD()
172 if (PASS == (ret = PACKET_READ(conn, &stats_header))) { in MYSQLND_METHOD()
187 MYSQLND_METHOD(mysqlnd_command, process_kill)(MYSQLND_CONN_DATA * const conn, const unsigned int pr… in MYSQLND_METHOD()
189 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
190 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
197 ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE, in MYSQLND_METHOD()
198 &conn->state, in MYSQLND_METHOD()
199 conn->error_info, in MYSQLND_METHOD()
200 conn->upsert_status, in MYSQLND_METHOD()
201 conn->stats, in MYSQLND_METHOD()
202 conn->m->send_close, in MYSQLND_METHOD()
203 conn); in MYSQLND_METHOD()
205 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCE… in MYSQLND_METHOD()
206 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
214 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in MYSQLND_METHOD()
216 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
217 conn->m->send_close(conn); in MYSQLND_METHOD()
227 MYSQLND_METHOD(mysqlnd_command, refresh)(MYSQLND_CONN_DATA * const conn, const uint8_t options) in MYSQLND_METHOD()
229 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
230 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
237 ret = send_command(conn->payload_decoder_factory, COM_REFRESH, bits, 1, FALSE, in MYSQLND_METHOD()
238 &conn->state, in MYSQLND_METHOD()
239 conn->error_info, in MYSQLND_METHOD()
240 conn->upsert_status, in MYSQLND_METHOD()
241 conn->stats, in MYSQLND_METHOD()
242 conn->m->send_close, in MYSQLND_METHOD()
243 conn); in MYSQLND_METHOD()
245 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_REFRE… in MYSQLND_METHOD()
246 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
256 MYSQLND_METHOD(mysqlnd_command, shutdown)(MYSQLND_CONN_DATA * const conn, const uint8_t level) in MYSQLND_METHOD()
258 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
259 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
266 ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE, in MYSQLND_METHOD()
267 &conn->state, in MYSQLND_METHOD()
268 conn->error_info, in MYSQLND_METHOD()
269 conn->upsert_status, in MYSQLND_METHOD()
270 conn->stats, in MYSQLND_METHOD()
271 conn->m->send_close, in MYSQLND_METHOD()
272 conn); in MYSQLND_METHOD()
274 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTD… in MYSQLND_METHOD()
275 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
285 MYSQLND_METHOD(mysqlnd_command, quit)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
287 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
292 ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE, in MYSQLND_METHOD()
293 &conn->state, in MYSQLND_METHOD()
294 conn->error_info, in MYSQLND_METHOD()
295 conn->upsert_status, in MYSQLND_METHOD()
296 conn->stats, in MYSQLND_METHOD()
297 conn->m->send_close, in MYSQLND_METHOD()
298 conn); in MYSQLND_METHOD()
307 MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query) in MYSQLND_METHOD()
309 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
314 …ret = send_command(conn->payload_decoder_factory, COM_QUERY, (const zend_uchar*) query.s, query.l,… in MYSQLND_METHOD()
315 &conn->state, in MYSQLND_METHOD()
316 conn->error_info, in MYSQLND_METHOD()
317 conn->upsert_status, in MYSQLND_METHOD()
318 conn->stats, in MYSQLND_METHOD()
319 conn->m->send_close, in MYSQLND_METHOD()
320 conn); in MYSQLND_METHOD()
323 SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT); in MYSQLND_METHOD()
333 MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING … in MYSQLND_METHOD()
335 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
340 …ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (const zend_uchar*) payload.s, … in MYSQLND_METHOD()
341 &conn->state, in MYSQLND_METHOD()
342 conn->error_info, in MYSQLND_METHOD()
343 conn->upsert_status, in MYSQLND_METHOD()
344 conn->stats, in MYSQLND_METHOD()
345 conn->m->send_close, in MYSQLND_METHOD()
346 conn); in MYSQLND_METHOD()
355 MYSQLND_METHOD(mysqlnd_command, reap_result)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
357 const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state); in MYSQLND_METHOD()
366 ret = conn->m->query_read_result_set_header(conn, NULL); in MYSQLND_METHOD()
375 MYSQLND_METHOD(mysqlnd_command, stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING… in MYSQLND_METHOD()
377 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
382 …ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (const zend_uchar*) query.s, q… in MYSQLND_METHOD()
383 &conn->state, in MYSQLND_METHOD()
384 conn->error_info, in MYSQLND_METHOD()
385 conn->upsert_status, in MYSQLND_METHOD()
386 conn->stats, in MYSQLND_METHOD()
387 conn->m->send_close, in MYSQLND_METHOD()
388 conn); in MYSQLND_METHOD()
397 MYSQLND_METHOD(mysqlnd_command, stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING paylo… in MYSQLND_METHOD()
399 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
404 ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, in MYSQLND_METHOD()
406 &conn->state, in MYSQLND_METHOD()
407 conn->error_info, in MYSQLND_METHOD()
408 conn->upsert_status, in MYSQLND_METHOD()
409 conn->stats, in MYSQLND_METHOD()
410 conn->m->send_close, in MYSQLND_METHOD()
411 conn); in MYSQLND_METHOD()
420 MYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING p… in MYSQLND_METHOD()
422 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
427 …ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, p… in MYSQLND_METHOD()
428 &conn->state, in MYSQLND_METHOD()
429 conn->error_info, in MYSQLND_METHOD()
430 conn->upsert_status, in MYSQLND_METHOD()
431 conn->stats, in MYSQLND_METHOD()
432 conn->m->send_close, in MYSQLND_METHOD()
433 conn); in MYSQLND_METHOD()
442 MYSQLND_METHOD(mysqlnd_command, stmt_reset)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
444 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
445 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
452 ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
453 &conn->state, in MYSQLND_METHOD()
454 conn->error_info, in MYSQLND_METHOD()
455 conn->upsert_status, in MYSQLND_METHOD()
456 conn->stats, in MYSQLND_METHOD()
457 conn->m->send_close, in MYSQLND_METHOD()
458 conn); in MYSQLND_METHOD()
460 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_… in MYSQLND_METHOD()
461 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
471 MYSQLND_METHOD(mysqlnd_command, stmt_send_long_data)(MYSQLND_CONN_DATA * const conn, const MYSQLND_… in MYSQLND_METHOD()
473 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
478 …ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (const zend_uchar*) pay… in MYSQLND_METHOD()
479 &conn->state, in MYSQLND_METHOD()
480 conn->error_info, in MYSQLND_METHOD()
481 conn->upsert_status, in MYSQLND_METHOD()
482 conn->stats, in MYSQLND_METHOD()
483 conn->m->send_close, in MYSQLND_METHOD()
484 conn); in MYSQLND_METHOD()
493 MYSQLND_METHOD(mysqlnd_command, stmt_close)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
495 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
502 ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
503 &conn->state, in MYSQLND_METHOD()
504 conn->error_info, in MYSQLND_METHOD()
505 conn->upsert_status, in MYSQLND_METHOD()
506 conn->stats, in MYSQLND_METHOD()
507 conn->m->send_close, in MYSQLND_METHOD()
508 conn); in MYSQLND_METHOD()
517 MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, const size_t client_cap… in MYSQLND_METHOD()
550 conn->payload_decoder_factory->m.init_auth_packet(&auth_packet); in MYSQLND_METHOD()
568 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
572 …conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &… in MYSQLND_METHOD()
574 if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) { in MYSQLND_METHOD()
575 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
576 …SET_CLIENT_ERROR(conn->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "Cannot connect to MySQL… in MYSQLND_METHOD()
583 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
593 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
594 conn->m->send_close(conn); in MYSQLND_METHOD()
595 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); in MYSQLND_METHOD()
604 MYSQLND_METHOD(mysqlnd_command, handshake)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING us… in MYSQLND_METHOD()
620 DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio)); in MYSQLND_METHOD()
623 conn->payload_decoder_factory->m.init_greet_packet(&greet_packet); in MYSQLND_METHOD()
625 if (FAIL == PACKET_READ(conn, &greet_packet)) { in MYSQLND_METHOD()
631 …SET_CLIENT_ERROR(conn->error_info, greet_packet.error_no, greet_packet.sqlstate, greet_packet.erro… in MYSQLND_METHOD()
637 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, msg); in MYSQLND_METHOD()
642 conn->thread_id = greet_packet.thread_id; in MYSQLND_METHOD()
643 conn->protocol_version = greet_packet.protocol_version; in MYSQLND_METHOD()
644 conn->server_version = mnd_pestrdup(greet_packet.server_version, conn->persistent); in MYSQLND_METHOD()
648 …greet_packet.charset_no = conn->m->get_server_version(conn) >= 50500 ? MYSQLND_UTF8_MB4_DEFAULT_ID… in MYSQLND_METHOD()
649 conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no); in MYSQLND_METHOD()
651 conn->greet_charset = read_charset; 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()