From b027072e01ec9d485a8826eacc615f40eb77cbb6 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sat, 24 Oct 2009 23:43:39 +0400 Subject: MWL#36: Add a mysqlbinlog option to change the used database - Review fixes client/Makefile.am: - Make it build on Linux client/mysqlbinlog.cc: - Coding style fixes - Better/more comments - Use client/sql_string.*, not server's sql/sql_string.*. - Don't declare a dummy TABLE_LIST structure in the client. client/sql_string.h: - Use client/sql_string.*, not server's sql/sql_string.*. sql/log_event.cc: = Fix coding style = Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. This is needed because rewrite_db() needs to dispose of the buffer, and - when mysqlbinlog is reading directly from binlog file, the buffer should be freed - when mysqlbinlog is reading from a server, the buffer is a part of network buffer and shouldn't be freed. sql/log_event.h: Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. This is needed because rewrite_db() needs to dispose of the buffer, and - when mysqlbinlog is reading directly from binlog file, the buffer should be freed - when mysqlbinlog is reading from a server, the buffer is a part of network buffer and shouldn't be freed. sql/mysqld.cc: - Better/more comments sql/rpl_filter.cc: - #ifdef-out Rpl_filter::tables_ok from the client. This allows not to define dummy TABLE_LIST on the client sql/rpl_filter.h: - #ifdef-out Rpl_filter::tables_ok from the client. This allows not to define dummy TABLE_LIST on the client sql/sql_string.cc: - Use client/sql_string.*, not server's sql/sql_string.*. sql/sql_string.h: - Use client/sql_string.*, not server's sql/sql_string.*. --- client/sql_string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/sql_string.h') diff --git a/client/sql_string.h b/client/sql_string.h index da19c1ccfe5..0a23f9ee92f 100644 --- a/client/sql_string.h +++ b/client/sql_string.h @@ -15,6 +15,9 @@ /* This file is originally from the mysql distribution. Coded by monty */ +#ifndef CLIENT_SQL_STRING_H +#define CLIENT_SQL_STRING_H + #ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif @@ -353,3 +356,5 @@ public: return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length); } }; + +#endif -- cgit v1.2.1