mysql_set_local_infile_handler()
void mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, unsigned int), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char*, unsigned int), void *userdata)
Use this function to enable callbacks that you will use with the LOAD DATA
LOCAL INFILE statement. The callback functions must be
created first:
... int local_infile_init(void **ptr, const char *file_name, void *user_info); int local_infile_read(void *ptr, char *buffer, unsigned int buffer_len); void local_infile_end(void *ptr); int local_infile_error(void *ptr, char *error_msg, unsigned int error_msg_len); ...