MXS-1881: Add table creation method to RowEventHandler

The new method is called for each new CREATE TABLE statement that is
processed as well as all ALTER TABLE statemets that modify the table
structure.

Right now the entry point not in use but it opens up the possibility of
persisting the CREATE TABLE statements at creation time. Currently the
tables are only persisted when the first actual event for the table is
received.
This commit is contained in:
Markus Mäkelä
2018-06-11 20:03:14 +03:00
parent c27529c9a4
commit 3417842e75
3 changed files with 20 additions and 4 deletions

View File

@ -140,6 +140,12 @@ public:
{
}
// A table was created
virtual bool create_table(const STableCreateEvent& create)
{
return true;
}
// A table was opened
virtual bool open_table(const STableMapEvent& map, const STableCreateEvent& create)
{
@ -241,4 +247,5 @@ private:
bool handle_row_event(REP_HEADER *hdr, uint8_t *ptr);
STableCreateEvent table_create_copy(const char* sql, size_t len, const char* db);
bool save_and_replace_table_create(STableCreateEvent created);
bool table_create_alter(STableCreateEvent create, const char *sql, const char *end);
};