Lines Matching refs:conn
147 PHPAPI void mysqlnd_local_infile_default(MYSQLND *conn) in mysqlnd_local_infile_default() argument
149 conn->infile.local_infile_init = mysqlnd_local_infile_init; in mysqlnd_local_infile_default()
150 conn->infile.local_infile_read = mysqlnd_local_infile_read; in mysqlnd_local_infile_default()
151 conn->infile.local_infile_error = mysqlnd_local_infile_error; in mysqlnd_local_infile_default()
152 conn->infile.local_infile_end = mysqlnd_local_infile_end; in mysqlnd_local_infile_default()
157 PHPAPI void mysqlnd_set_local_infile_handler(MYSQLND * const conn, const char * const funcname) in mysqlnd_set_local_infile_handler() argument
159 if (!conn->infile.callback) { in mysqlnd_set_local_infile_handler()
160 MAKE_STD_ZVAL(conn->infile.callback); in mysqlnd_set_local_infile_handler()
162 zval_dtor(conn->infile.callback); in mysqlnd_set_local_infile_handler()
164 ZVAL_STRING(conn->infile.callback, (char*) funcname, 1); in mysqlnd_set_local_infile_handler()
174 mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC) in mysqlnd_handle_local_infile() argument
187 if (!(conn->options.flags & CLIENT_LOCAL_FILES)) { in mysqlnd_handle_local_infile()
190 ret = conn->net->m.send(conn, empty_packet, 0 TSRMLS_CC); in mysqlnd_handle_local_infile()
195 infile = conn->infile; in mysqlnd_handle_local_infile()
202 if (infile.local_infile_init(&info, (char *)filename, conn->infile.userdata TSRMLS_CC)) { in mysqlnd_handle_local_infile()
205 strcpy(conn->error_info.sqlstate, UNKNOWN_SQLSTATE); in mysqlnd_handle_local_infile()
206 conn->error_info.error_no = in mysqlnd_handle_local_infile()
207 … infile.local_infile_error(info, conn->error_info.error, sizeof(conn->error_info.error) TSRMLS_CC); in mysqlnd_handle_local_infile()
209 ret = conn->net->m.send(conn, empty_packet, 0 TSRMLS_CC); in mysqlnd_handle_local_infile()
215 if ((ret = conn->net->m.send(conn, buf, bufsize TSRMLS_CC)) == 0) { in mysqlnd_handle_local_infile()
217 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); in mysqlnd_handle_local_infile()
223 if ((ret = conn->net->m.send(conn, empty_packet, 0 TSRMLS_CC)) == 0) { in mysqlnd_handle_local_infile()
224 SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); in mysqlnd_handle_local_infile()
232 strcpy(conn->error_info.sqlstate, UNKNOWN_SQLSTATE); in mysqlnd_handle_local_infile()
233 conn->error_info.error_no = in mysqlnd_handle_local_infile()
234 … infile.local_infile_error(info, conn->error_info.error, sizeof(conn->error_info.error) TSRMLS_CC); in mysqlnd_handle_local_infile()
242 …if (FAIL == conn->m->simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE … in mysqlnd_handle_local_infile()
246 (*conn->infile.local_infile_end)(info TSRMLS_CC); in mysqlnd_handle_local_infile()