Lines Matching refs:info
28 MYSQLND_INFILE_INFO *info; in mysqlnd_local_infile_init() local
33 info = ((MYSQLND_INFILE_INFO *)mnd_ecalloc(1, sizeof(MYSQLND_INFILE_INFO))); in mysqlnd_local_infile_init()
34 if (!info) { in mysqlnd_local_infile_init()
38 *ptr = info; in mysqlnd_local_infile_init()
43 strcpy(info->error_msg, "open_basedir restriction in effect. Unable to open file"); in mysqlnd_local_infile_init()
44 info->error_no = CR_UNKNOWN_ERROR; in mysqlnd_local_infile_init()
49 info->filename = filename; in mysqlnd_local_infile_init()
50 info->fd = php_stream_open_wrapper_ex((char *)filename, "r", 0, NULL, context); in mysqlnd_local_infile_init()
52 if (info->fd == NULL) { in mysqlnd_local_infile_init()
53 snprintf((char *)info->error_msg, sizeof(info->error_msg), "Can't find file '%-.64s'.", filename); in mysqlnd_local_infile_init()
54 info->error_no = MYSQLND_EE_FILENOTFOUND; in mysqlnd_local_infile_init()
67 MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; in mysqlnd_local_infile_read() local
72 count = (int) php_stream_read(info->fd, (char *) buf, buf_len); in mysqlnd_local_infile_read()
75 strcpy(info->error_msg, "Error reading file"); in mysqlnd_local_infile_read()
76 info->error_no = CR_UNKNOWN_ERROR; in mysqlnd_local_infile_read()
88 MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; in mysqlnd_local_infile_error() local
92 if (info) { in mysqlnd_local_infile_error()
93 strlcpy(error_buf, info->error_msg, error_buf_len); in mysqlnd_local_infile_error()
94 DBG_INF_FMT("have info, %d", info->error_no); in mysqlnd_local_infile_error()
95 DBG_RETURN(info->error_no); in mysqlnd_local_infile_error()
109 MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; in mysqlnd_local_infile_end() local
111 if (info) { in mysqlnd_local_infile_end()
113 if (info->fd) { in mysqlnd_local_infile_end()
114 php_stream_close(info->fd); in mysqlnd_local_infile_end()
115 info->fd = NULL; in mysqlnd_local_infile_end()
117 mnd_efree(info); in mysqlnd_local_infile_end()
146 void *info = NULL; in mysqlnd_handle_local_infile() local
210 if (infile.local_infile_init(&info, (char *)filename)) { in mysqlnd_handle_local_infile()
215 tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf)); in mysqlnd_handle_local_infile()
223 …while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEAD… in mysqlnd_handle_local_infile()
243 tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf)); in mysqlnd_handle_local_infile()
261 (*conn->infile.local_infile_end)(info); in mysqlnd_handle_local_infile()