summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2007-01-26 19:29:57 +0100
committerunknown <mats@romeo.(none)>2007-01-26 19:29:57 +0100
commit2195fead1c004b4b0424c3f087341f685e016a74 (patch)
tree13076e7da5c507c12489d16a6fa162059cffa979 /sql/slave.h
parentdb4f76d859c97b68829ad3ac8ce3b7486a1cffeb (diff)
downloadmariadb-git-2195fead1c004b4b0424c3f087341f685e016a74.tar.gz
BUG#19033 (RBR: slave does not handle schema changes correctly):
Since checking table compatibility before locking the table, there were potential that a table could be locked that did not have a definition that was compatible with the table on the slave. This patch adds a check just after the table was locked to ensure that the table is (still) compatible with the table on the slave. sql/log.cc: Moving placement new operators to slave.h since they are used in several places in the replication code. Removing some compile warnings. sql/log_event.cc: Moving code to check table compatibility to after tables are locked for writing. sql/log_event.h: Doxygenifying comments. Copying error codes to Rows_log_event hierarchy since they are now used there as well. sql/rpl_utility.h: Doxygenifying some comments. Changing class table_def to copy the column types given to it. Adding structure RPL_TABLE_LIST as a subclass of TABLE_LIST to represent lists of tables for the slave. sql/slave.h: Adding placement new and delete operators since the slave uses them in several places. sql/sql_insert.cc: Removing a compiler warning.
Diffstat (limited to 'sql/slave.h')
-rw-r--r--sql/slave.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/slave.h b/sql/slave.h
index 24ba09d78d3..0fa67578202 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -214,6 +214,15 @@ extern I_List<THD> threads;
#define SLAVE_IO 1
#define SLAVE_SQL 2
+/*
+ Define placement versions of operator new and operator delete since
+ we cannot be sure that the <new> include exists.
+ */
+inline void *operator new(size_t, void *ptr) { return ptr; }
+inline void *operator new[](size_t, void *ptr) { return ptr; }
+inline void operator delete(void*, void*) { /* Do nothing */ }
+inline void operator delete[](void*, void*) { /* Do nothing */ }
+
#endif