Classes |
struct | File_name_record |
Detailed Description
Definition at line 216 of file mysqlbinlog.cc.
Member Function Documentation
Obtain Create_file event for LOAD DATA statement by its file_id and remove it from this Load_log_processor's list of events.
Checks whether we have already seen a Create_file_log_event with the given file_id. If yes, returns a pointer to the event and removes the event from array describing active temporary files. From this moment, the caller is responsible for freeing the memory occupied by the event.
- Parameters
-
[in] | file_id | File id identifying LOAD DATA statement. |
- Returns
- Pointer to Create_file_log_event, or NULL if we have not seen any Create_file_log_event with this file_id.
Definition at line 327 of file mysqlbinlog.cc.
char* Load_log_processor::grab_fname |
( |
uint |
file_id | ) |
|
|
inline |
Obtain file name of temporary file for LOAD DATA statement by its file_id and remove it from this Load_log_processor's list of events.
- Parameters
-
[in] | file_id | Identifier for the LOAD DATA statement. |
Checks whether we have already seen Begin_load_query event for this file_id. If yes, returns the file name of the corresponding temporary file and removes the filename from the array of active temporary files. From this moment, the caller is responsible for freeing the memory occupied by this name.
- Returns
- String with the name of the temporary file, or NULL if we have not seen any Begin_load_query_event with this file_id.
Definition at line 355 of file mysqlbinlog.cc.
Exit_status Load_log_processor::load_old_format_file |
( |
NET * |
net, |
|
|
const char * |
server_fname, |
|
|
uint |
server_fname_len, |
|
|
File |
file |
|
) |
| |
Reads a file from a server and saves it locally.
- Parameters
-
[in,out] | net | The server to read from. |
[in] | server_fname | The name of the file that the server should read. |
[in] | server_fname_len | The length of server_fname. |
[in,out] | file | The file to write to. |
- Return values
-
ERROR_STOP | An error occurred - the program should terminate. |
OK_CONTINUE | No error, the program should continue. |
Definition at line 431 of file mysqlbinlog.cc.
File Load_log_processor::prepare_new_file_for_old_format |
( |
Load_log_event * |
le, |
|
|
char * |
filename |
|
) |
| |
Creates and opens a new temporary file in the directory specified by previous call to init_by_dir_name() or init_by_cur_dir().
- Parameters
-
[in] | le | The basename of the created file will start with the basename of the file pointed to by this Load_log_event. |
[out] | filename | Buffer to save the filename in. |
- Returns
- File handle >= 0 on success, -1 on error.
Definition at line 393 of file mysqlbinlog.cc.
Process the given Create_file_log_event.
- See Also
- Load_log_processor::process_first_event(const char*,uint,const char*,uint,uint,Create_file_log_event*)
- Parameters
-
- Return values
-
ERROR_STOP | An error occurred - the program should terminate. |
OK_CONTINUE | No error, the program should continue. |
Definition at line 580 of file mysqlbinlog.cc.
Process the given Begin_load_query_log_event.
- See Also
- Load_log_processor::process_first_event(const char*,uint,const char*,uint,uint,Create_file_log_event*)
- Parameters
-
- Return values
-
ERROR_STOP | An error occurred - the program should terminate. |
OK_CONTINUE | No error, the program should continue. |
Definition at line 600 of file mysqlbinlog.cc.
Process the given Append_block_log_event.
Appends the chunk of the file contents specified by the event to the file created by a previous Begin_load_query_log_event or Create_file_log_event.
If the file_id for the event does not correspond to any file previously registered through a Begin_load_query_log_event or Create_file_log_event, this member function will print a warning and return OK_CONTINUE. It is safe to return OK_CONTINUE, because no query will be written for this event. We should not print an error and fail, since the missing file_id could be because a (valid) –start-position has been specified after the Begin/Create event but before this Append event.
- Parameters
-
- Return values
-
ERROR_STOP | An error occurred - the program should terminate. |
OK_CONTINUE | No error, the program should continue. |
Definition at line 629 of file mysqlbinlog.cc.
Exit_status Load_log_processor::process_first_event |
( |
const char * |
bname, |
|
|
size_t |
blen, |
|
|
const uchar * |
block, |
|
|
size_t |
block_len, |
|
|
uint |
file_id, |
|
|
Create_file_log_event * |
ce |
|
) |
| |
Process the first event in the sequence of events representing a LOAD DATA statement.
Creates a temporary file to be used in LOAD DATA and writes first block of data to it. Registers its file name (and optional Create_file event) in the array of active temporary files.
- Parameters
-
bname | Base name for temporary file to be created. |
blen | Base name length. |
block | First block of data to be loaded. |
block_len | First block length. |
file_id | Identifies the LOAD DATA statement. |
ce | Pointer to Create_file event object if we are processing this type of event. |
- Return values
-
ERROR_STOP | An error occurred - the program should terminate. |
OK_CONTINUE | No error, the program should continue. |
Definition at line 501 of file mysqlbinlog.cc.
The documentation for this class was generated from the following file: