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, quit)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
258 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
263 ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE, in MYSQLND_METHOD()
264 &conn->state, in MYSQLND_METHOD()
265 conn->error_info, in MYSQLND_METHOD()
266 conn->upsert_status, in MYSQLND_METHOD()
267 conn->stats, in MYSQLND_METHOD()
268 conn->m->send_close, in MYSQLND_METHOD()
269 conn); in MYSQLND_METHOD()
278 MYSQLND_METHOD(mysqlnd_command, query)(MYSQLND_CONN_DATA * const conn, MYSQLND_CSTRING query) in MYSQLND_METHOD()
280 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
285 …ret = send_command(conn->payload_decoder_factory, COM_QUERY, (const zend_uchar*) query.s, query.l,… in MYSQLND_METHOD()
286 &conn->state, in MYSQLND_METHOD()
287 conn->error_info, in MYSQLND_METHOD()
288 conn->upsert_status, in MYSQLND_METHOD()
289 conn->stats, in MYSQLND_METHOD()
290 conn->m->send_close, in MYSQLND_METHOD()
291 conn); in MYSQLND_METHOD()
294 SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT); in MYSQLND_METHOD()
304 MYSQLND_METHOD(mysqlnd_command, change_user)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING … in MYSQLND_METHOD()
306 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
311 …ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (const zend_uchar*) payload.s, … in MYSQLND_METHOD()
312 &conn->state, in MYSQLND_METHOD()
313 conn->error_info, in MYSQLND_METHOD()
314 conn->upsert_status, in MYSQLND_METHOD()
315 conn->stats, in MYSQLND_METHOD()
316 conn->m->send_close, in MYSQLND_METHOD()
317 conn); in MYSQLND_METHOD()
326 MYSQLND_METHOD(mysqlnd_command, reap_result)(MYSQLND_CONN_DATA * const conn) in MYSQLND_METHOD()
328 const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state); in MYSQLND_METHOD()
337 ret = conn->m->query_read_result_set_header(conn, NULL); in MYSQLND_METHOD()
346 MYSQLND_METHOD(mysqlnd_command, stmt_prepare)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING… in MYSQLND_METHOD()
348 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
353 …ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (const zend_uchar*) query.s, q… in MYSQLND_METHOD()
354 &conn->state, in MYSQLND_METHOD()
355 conn->error_info, in MYSQLND_METHOD()
356 conn->upsert_status, in MYSQLND_METHOD()
357 conn->stats, in MYSQLND_METHOD()
358 conn->m->send_close, in MYSQLND_METHOD()
359 conn); in MYSQLND_METHOD()
368 MYSQLND_METHOD(mysqlnd_command, stmt_execute)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING paylo… in MYSQLND_METHOD()
370 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
375 ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, in MYSQLND_METHOD()
377 &conn->state, in MYSQLND_METHOD()
378 conn->error_info, in MYSQLND_METHOD()
379 conn->upsert_status, in MYSQLND_METHOD()
380 conn->stats, in MYSQLND_METHOD()
381 conn->m->send_close, in MYSQLND_METHOD()
382 conn); in MYSQLND_METHOD()
391 MYSQLND_METHOD(mysqlnd_command, stmt_fetch)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING p… in MYSQLND_METHOD()
393 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
398 …ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (const zend_uchar*) payload.s, p… in MYSQLND_METHOD()
399 &conn->state, in MYSQLND_METHOD()
400 conn->error_info, in MYSQLND_METHOD()
401 conn->upsert_status, in MYSQLND_METHOD()
402 conn->stats, in MYSQLND_METHOD()
403 conn->m->send_close, in MYSQLND_METHOD()
404 conn); in MYSQLND_METHOD()
413 MYSQLND_METHOD(mysqlnd_command, stmt_reset)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
415 …const func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_dec… in MYSQLND_METHOD()
416 …oder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_fa… in MYSQLND_METHOD()
423 ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
424 &conn->state, in MYSQLND_METHOD()
425 conn->error_info, in MYSQLND_METHOD()
426 conn->upsert_status, in MYSQLND_METHOD()
427 conn->stats, in MYSQLND_METHOD()
428 conn->m->send_close, in MYSQLND_METHOD()
429 conn); in MYSQLND_METHOD()
431 …ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_… in MYSQLND_METHOD()
432 conn->error_info, conn->upsert_status, &conn->last_message); in MYSQLND_METHOD()
442 MYSQLND_METHOD(mysqlnd_command, stmt_send_long_data)(MYSQLND_CONN_DATA * const conn, const MYSQLND_… in MYSQLND_METHOD()
444 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
449 …ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (const zend_uchar*) pay… in MYSQLND_METHOD()
450 &conn->state, in MYSQLND_METHOD()
451 conn->error_info, in MYSQLND_METHOD()
452 conn->upsert_status, in MYSQLND_METHOD()
453 conn->stats, in MYSQLND_METHOD()
454 conn->m->send_close, in MYSQLND_METHOD()
455 conn); in MYSQLND_METHOD()
464 MYSQLND_METHOD(mysqlnd_command, stmt_close)(MYSQLND_CONN_DATA * const conn, const zend_ulong stmt_i… in MYSQLND_METHOD()
466 …func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_f… in MYSQLND_METHOD()
473 ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE, in MYSQLND_METHOD()
474 &conn->state, in MYSQLND_METHOD()
475 conn->error_info, in MYSQLND_METHOD()
476 conn->upsert_status, in MYSQLND_METHOD()
477 conn->stats, in MYSQLND_METHOD()
478 conn->m->send_close, in MYSQLND_METHOD()
479 conn); in MYSQLND_METHOD()
488 MYSQLND_METHOD(mysqlnd_command, enable_ssl)(MYSQLND_CONN_DATA * const conn, const size_t client_cap… in MYSQLND_METHOD()
521 conn->payload_decoder_factory->m.init_auth_packet(&auth_packet); in MYSQLND_METHOD()
539 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
543conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &… in MYSQLND_METHOD()
545 if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) { in MYSQLND_METHOD()
546 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
547 …SET_CLIENT_ERROR(conn->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "Cannot connect to MySQL… in MYSQLND_METHOD()
554 if (!PACKET_WRITE(conn, &auth_packet)) { in MYSQLND_METHOD()
564 SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT); in MYSQLND_METHOD()
565 conn->m->send_close(conn); in MYSQLND_METHOD()
566 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); in MYSQLND_METHOD()
575 MYSQLND_METHOD(mysqlnd_command, handshake)(MYSQLND_CONN_DATA * const conn, const MYSQLND_CSTRING us… in MYSQLND_METHOD()
591 DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio)); in MYSQLND_METHOD()
594 conn->payload_decoder_factory->m.init_greet_packet(&greet_packet); in MYSQLND_METHOD()
596 if (FAIL == PACKET_READ(conn, &greet_packet)) { in MYSQLND_METHOD()
602 …SET_CLIENT_ERROR(conn->error_info, greet_packet.error_no, greet_packet.sqlstate, greet_packet.erro… in MYSQLND_METHOD()
608 SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, msg); in MYSQLND_METHOD()
613 conn->thread_id = greet_packet.thread_id; in MYSQLND_METHOD()
614 conn->protocol_version = greet_packet.protocol_version; in MYSQLND_METHOD()
615 conn->server_version = mnd_pestrdup(greet_packet.server_version, conn->persistent); in MYSQLND_METHOD()
619 …greet_packet.charset_no = conn->m->get_server_version(conn) >= 50500 ? MYSQLND_UTF8_MB4_DEFAULT_ID… in MYSQLND_METHOD()
620 conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no); in MYSQLND_METHOD()
622 conn->greet_charset = read_charset; in MYSQLND_METHOD()
625 conn->server_capabilities = greet_packet.server_capabilities; in MYSQLND_METHOD()
627 if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len, in MYSQLND_METHOD()
630 conn->options, mysql_flags)) in MYSQLND_METHOD()
635 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
636 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, greet_packet.server_status); in MYSQLND_METHOD()
641 conn->server_capabilities = 0; in MYSQLND_METHOD()