Oracle 5.0 Reference Manual page 2205

Table of Contents

Advertisement

The data-reading function. This is called repeatedly to read the data file.
the read data is stored, and
store in the buffer. (It can read fewer bytes, but should not read more.)
The return value is the number of bytes read, or zero when no more data could be read (this indicates
EOF). Return a value less than zero if an error occurs.
void
local_infile_end(void *ptr)
The termination function. This is called once after
or an error. Within this function, deallocate any memory allocated by
perform any other cleanup necessary. It is invoked even if the initialization function returns an error.
int
local_infile_error(void *ptr,
The error-handling function. This is called to get a textual error message to return to the user in case
any of your other functions returns an error.
written, and
at most error_msg_len–1 bytes long.
The return value is the error number.
Typically, the other callbacks store the error message in the data structure pointed to by ptr, so that
local_infile_error()
After calling
to your callback functions, you can then issue a
example, by using mysql_query()). The client library automatically invokes your callbacks. The
file name specified in
local_infile_init()
Return Values
None.
Errors
None.
20.6.6.64.
mysql_set_server_option()
int mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option)
Description
Enables or disables an option for the connection.
Option
MYSQL_OPTION_MULTI_STATEMENTS_ON
MYSQL_OPTION_MULTI_STATEMENTS_OFF
If you enable multiple-statement support, you should retrieve results from calls to
or
mysql_real_query()
there are more results. For an example, see
Execution".
Enabling multiple-statement support with
have quite the same effect as enabling it by passing the
C API Function Descriptions
buf_len
char *error_msg,
unsigned int error_msg_len);
is the length of the buffer. Write the message as a null-terminated string,
error_msg_len
can copy the message from there into error_msg.
mysql_set_local_infile_handler()
LOAD DATA LOCAL INFILE
callback.
by using a loop that calls
is the maximum number of bytes that the callback can read and
local_infile_read()
points to the buffer into which the message is
error_msg
in your C code and passing pointers
LOAD DATA LOCAL INFILE
will be passed as the second parameter to the
can have one of the following values.
option
Description
Enable multiple-statement support
Disable multiple-statement support
mysql_next_result()
Section 20.6.15, "C API Support for Multiple Statement
MYSQL_OPTION_MULTI_STATEMENTS_ON
CLIENT_MULTI_STATEMENTS
2185
points to the buffer where
buf
has returned zero (EOF)
local_infile_init()
statement (for
mysql_query()
to determine whether
does not
flag to
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents