mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
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.
This commit is contained in:
parent
e1b0f07c74
commit
8a8bb772d4
6 changed files with 155 additions and 87 deletions
|
|
@ -1721,14 +1721,17 @@ public:
|
|||
TYPE_CODE = TABLE_MAP_EVENT
|
||||
};
|
||||
|
||||
/**
|
||||
Enumeration of the errors that can be returned.
|
||||
*/
|
||||
enum enum_error
|
||||
{
|
||||
ERR_OPEN_FAILURE = -1, /* Failure to open table */
|
||||
ERR_OK = 0, /* No error */
|
||||
ERR_TABLE_LIMIT_EXCEEDED = 1, /* No more room for tables */
|
||||
ERR_OUT_OF_MEM = 2, /* Out of memory */
|
||||
ERR_BAD_TABLE_DEF = 3, /* Table definition does not match */
|
||||
ERR_RBR_TO_SBR = 4 /* daisy-chanining RBR to SBR not allowed */
|
||||
ERR_OPEN_FAILURE = -1, /**< Failure to open table */
|
||||
ERR_OK = 0, /**< No error */
|
||||
ERR_TABLE_LIMIT_EXCEEDED = 1, /**< No more room for tables */
|
||||
ERR_OUT_OF_MEM = 2, /**< Out of memory */
|
||||
ERR_BAD_TABLE_DEF = 3, /**< Table definition does not match */
|
||||
ERR_RBR_TO_SBR = 4 /**< daisy-chanining RBR to SBR not allowed */
|
||||
};
|
||||
|
||||
enum enum_flag
|
||||
|
|
@ -1808,7 +1811,7 @@ private:
|
|||
|
||||
Row level log event class.
|
||||
|
||||
Common base class for all row-level log events.
|
||||
Common base class for all row-containing log events.
|
||||
|
||||
RESPONSIBILITIES
|
||||
|
||||
|
|
@ -1822,6 +1825,19 @@ private:
|
|||
class Rows_log_event : public Log_event
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Enumeration of the errors that can be returned.
|
||||
*/
|
||||
enum enum_error
|
||||
{
|
||||
ERR_OPEN_FAILURE = -1, /**< Failure to open table */
|
||||
ERR_OK = 0, /**< No error */
|
||||
ERR_TABLE_LIMIT_EXCEEDED = 1, /**< No more room for tables */
|
||||
ERR_OUT_OF_MEM = 2, /**< Out of memory */
|
||||
ERR_BAD_TABLE_DEF = 3, /**< Table definition does not match */
|
||||
ERR_RBR_TO_SBR = 4 /**< daisy-chanining RBR to SBR not allowed */
|
||||
};
|
||||
|
||||
/*
|
||||
These definitions allow you to combine the flags into an
|
||||
appropriate flag set using the normal bitwise operators. The
|
||||
|
|
@ -1829,7 +1845,6 @@ public:
|
|||
accepted by the compiler, which is then used to set the real set
|
||||
of flags.
|
||||
*/
|
||||
|
||||
enum enum_flag
|
||||
{
|
||||
/* Last event of a statement */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue