summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authormats@romeo.(none) <>2007-01-26 19:29:57 +0100
committermats@romeo.(none) <>2007-01-26 19:29:57 +0100
commit59ada157182b89818a9ce80f81ef833e0f1fdbfe (patch)
tree13076e7da5c507c12489d16a6fa162059cffa979 /sql/slave.h
parent6712c0963dd2e7355908ad40c7e0328ac7987812 (diff)
downloadmariadb-git-59ada157182b89818a9ce80f81ef833e0f1fdbfe.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.
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