MXS-2264: Add support for ALTER TABLE RENAME

This adds preliminary support for renaming tables. There is still a
problem where the table version will always be set to 1 on a rename. This
should not be done and the version should be set to the largest value that
ever was for that table.
This commit is contained in:
Markus Mäkelä
2019-09-30 08:03:52 +03:00
parent a444484310
commit 2eb6a25534
3 changed files with 54 additions and 0 deletions

View File

@ -290,6 +290,7 @@ 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 rename_table_create(STableCreateEvent created, const std::string& old_id);
bool table_create_alter(STableCreateEvent create, const char* sql, const char* end);
bool table_matches(const std::string& ident);
};