The world's most popular open source database
#include "mysql_priv.h"#include "slave.h"#include "rpl_filter.h"#include <my_dir.h>#include <base64.h>#include <my_bitmap.h>Include dependency graph for log_event.cc:

Go to the source code of this file.
Defines | |
| #define | log_cs &my_charset_latin1 |
| #define | UNLOCK_MUTEX if (log_lock) pthread_mutex_unlock(log_lock); |
| #define | LOCK_MUTEX if (log_lock) pthread_mutex_lock(log_lock); |
Functions | |
| static bool | write_str (IO_CACHE *file, char *str, uint length) |
| static int | read_str (char **buf, char *buf_end, char **str, uint8 *len) |
| char * | str_to_hex (char *to, const char *from, uint len) |
| int | append_query_string (CHARSET_INFO *csinfo, String const *from, String *to) |
| static void | write_str_with_code_and_len (char **dst, const char *src, int len, uint code) |
| static void | get_str_len_and_pointer (const char **dst, const char **src, uint *len) |
| static void | copy_str_and_move (char **dst, const char **src, uint len) |
| #define LOCK_MUTEX if (log_lock) pthread_mutex_lock(log_lock); |
Definition at line 717 of file log_event.cc.
| #define log_cs &my_charset_latin1 |
Definition at line 32 of file log_event.cc.
| #define UNLOCK_MUTEX if (log_lock) pthread_mutex_unlock(log_lock); |
Definition at line 716 of file log_event.cc.
| int append_query_string | ( | CHARSET_INFO * | csinfo, | |
| String const * | from, | |||
| String * | to | |||
| ) |
Definition at line 266 of file log_event.cc.
References escape_string_for_mysql(), charset_info_st::escape_with_backslash_is_dangerous, from, str_to_hex(), and to.
00268 { 00269 char *beg, *ptr; 00270 uint32 const orig_len= to->length(); 00271 if (to->reserve(orig_len + from->length()*2+3)) 00272 return 1; 00273 00274 beg= to->c_ptr_quick() + to->length(); 00275 ptr= beg; 00276 if (csinfo->escape_with_backslash_is_dangerous) 00277 ptr= str_to_hex(ptr, from->ptr(), from->length()); 00278 else 00279 { 00280 *ptr++= '\''; 00281 ptr+= escape_string_for_mysql(from->charset(), ptr, 0, 00282 from->ptr(), from->length()); 00283 *ptr++='\''; 00284 } 00285 to->length(orig_len + ptr - beg); 00286 return 0; 00287 }
Here is the call graph for this function:

| static void copy_str_and_move | ( | char ** | dst, | |
| const char ** | src, | |||
| uint | len | |||
| ) | [static] |
Definition at line 1373 of file log_event.cc.
References memcpy.
01374 { 01375 memcpy(*dst, *src, len); 01376 *src= *dst; 01377 (*dst)+= len; 01378 *(*dst)++= 0; 01379 }
| static void get_str_len_and_pointer | ( | const char ** | dst, | |
| const char ** | src, | |||
| uint * | len | |||
| ) | [static] |
Definition at line 1365 of file log_event.cc.
01366 { 01367 if ((*len= **src)) 01368 *dst= *src + 1; // Will be copied later 01369 (*src)+= *len+1; 01370 }
| static int read_str | ( | char ** | buf, | |
| char * | buf_end, | |||
| char ** | str, | |||
| uint8 * | len | |||
| ) | [inline, static] |
| char* str_to_hex | ( | char * | to, | |
| const char * | from, | |||
| uint | len | |||
| ) |
Definition at line 246 of file log_event.cc.
References octet2hex(), and strmov().
00247 { 00248 if (len) 00249 { 00250 *to++= '0'; 00251 *to++= 'x'; 00252 to= octet2hex(to, from, len); 00253 } 00254 else 00255 to= strmov(to, "\"\""); 00256 return to; // pointer to end 0 of 'to' 00257 }
Here is the call graph for this function:

Definition at line 217 of file log_event.cc.
References my_b_safe_write().
00218 { 00219 byte tmp[1]; 00220 tmp[0]= (byte) length; 00221 return (my_b_safe_write(file, tmp, sizeof(tmp)) || 00222 my_b_safe_write(file, (byte*) str, length)); 00223 }
Here is the call graph for this function:

| static void write_str_with_code_and_len | ( | char ** | dst, | |
| const char * | src, | |||
| int | len, | |||
| uint | code | |||
| ) | [static] |
Definition at line 1121 of file log_event.cc.
References bmove(), and DBUG_ASSERT.
01123 { 01124 DBUG_ASSERT(src); 01125 *((*dst)++)= code; 01126 *((*dst)++)= (uchar) len; 01127 bmove(*dst, src, len); 01128 (*dst)+= len; 01129 }
Here is the call graph for this function:

1.4.7

