summaryrefslogtreecommitdiff
path: root/sql/rpl_tblmap.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2008-08-20 19:06:31 +0500
committerAlexander Barkov <bar@mysql.com>2008-08-20 19:06:31 +0500
commit0c5bc2eafc95cb20f332becd295c29be95149700 (patch)
tree9b01eca71e89e78891e200183ef0f206f42306ab /sql/rpl_tblmap.cc
parente4e99f1439cd46a5f96e39289e6bc4f74c86ce88 (diff)
downloadmariadb-git-0c5bc2eafc95cb20f332becd295c29be95149700.tar.gz
Bug#31455 mysqlbinlog don't print user readable info about RBR events
Implementing -v command line parameter to mysqlbinlog to decode and print row events. mysql-test/include/mysqlbinlog_row_engine.inc mysql-test/r/mysqlbinlog_row.result mysql-test/r/mysqlbinlog_row_big.result mysql-test/r/mysqlbinlog_row_innodb.result mysql-test/r/mysqlbinlog_row_myisam.result mysql-test/r/mysqlbinlog_row_trans.result mysql-test/t/mysqlbinlog_row.test mysql-test/t/mysqlbinlog_row_big.test mysql-test/t/mysqlbinlog_row_innodb.test mysql-test/t/mysqlbinlog_row_myisam.test mysql-test/t/mysqlbinlog_row_trans.test Adding tests client/Makefile.am Adding new files to symlink client/mysqlbinlog.cc Adding -v option sql/log_event.cc Impelentations of the new methods sql/log_event.h Declaration of the new methods and member sql/mysql_priv.h Adding new function prototype sql/rpl_tblmap.cc Adding pre-processor conditions sql/rpl_tblmap.h Adding pre-processor conditions sql/rpl_utility.h Adding pre-processor conditions sql/sql_base.cc Adding reset_table_id_sequence() function. sql/sql_repl.cc Resetting table_id on "RESET MASTER" .bzrignore Ignoring new symlinked files
Diffstat (limited to 'sql/rpl_tblmap.cc')
-rw-r--r--sql/rpl_tblmap.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/sql/rpl_tblmap.cc b/sql/rpl_tblmap.cc
index 6c8b494dfa9..a004c354263 100644
--- a/sql/rpl_tblmap.cc
+++ b/sql/rpl_tblmap.cc
@@ -19,7 +19,11 @@
#include "rpl_tblmap.h"
+#ifdef MYSQL_CLIENT
+#define MAYBE_TABLE_NAME(T) ("")
+#else
#define MAYBE_TABLE_NAME(T) ((T) ? (T)->s->table_name.str : "<>")
+#endif
#define TABLE_ID_HASH_SIZE 32
#define TABLE_ID_CHUNK 256
@@ -42,11 +46,14 @@ table_mapping::table_mapping()
table_mapping::~table_mapping()
{
+#ifdef MYSQL_CLIENT
+ clear_tables();
+#endif
hash_free(&m_table_ids);
free_root(&m_mem_root, MYF(0));
}
-st_table* table_mapping::get_table(ulong table_id)
+TABLE* table_mapping::get_table(ulong table_id)
{
DBUG_ENTER("table_mapping::get_table(ulong)");
DBUG_PRINT("enter", ("table_id: %lu", table_id));
@@ -104,8 +111,12 @@ int table_mapping::set_table(ulong table_id, TABLE* table)
m_free= m_free->next;
}
else
+ {
+#ifdef MYSQL_CLIENT
+ free_table_map_log_event(e->table);
+#endif
hash_delete(&m_table_ids,(uchar *)e);
-
+ }
e->table_id= table_id;
e->table= table;
my_hash_insert(&m_table_ids,(uchar *)e);
@@ -140,6 +151,9 @@ void table_mapping::clear_tables()
for (uint i= 0; i < m_table_ids.records; i++)
{
entry *e= (entry *)hash_element(&m_table_ids, i);
+#ifdef MYSQL_CLIENT
+ free_table_map_log_event(e->table);
+#endif
e->next= m_free;
m_free= e;
}