diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 44d6f88e06..0e257f685c 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -1129,4 +1129,14 @@ static const int errmsg_section_size[] = { 889, 234 }; #define ER_WRITE_SET_EXCEEDS_LIMIT 3231 #define ER_DEPRECATED_TLS_VERSION_SESSION 3232 #define ER_WARN_DEPRECATED_TLS_VERSION 3233 +#define ER_TIANMU_NOT_SUPPORTED_SECONDARY_INDEX 3234 +#define ER_TIANMU_NOT_SUPPORTED_UNIQUE_INDEX 3235 +#define ER_TIANMU_NOT_SUPPORTED_FULLTEXT_INDEX 3236 +#define ER_TIANMU_NOT_SUPPORTED_GEOMETRY 3237 +#define ER_TIANMU_NOT_SUPPORTED_ENUM 3238 +#define ER_TIANMU_NOT_SUPPORTED_SET 3239 +#define ER_TIANMU_NOT_SUPPORTED_TRIGGER 3240 +#define ER_TIANMU_NOT_SUPPORTED_FOREIGN_KEY 3241 +#define ER_TIANMU_NOT_SUPPORTED_PARTITION 3242 +#define ER_TIANMU_NOT_FOUND_INDEX 3243 #endif diff --git a/sql/log_event.cc b/sql/log_event.cc index 0a3c1361b7..83c18e50cc 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4972,6 +4972,21 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli, clear_all_errors(thd, const_cast(rli)); thd->killed= THD::NOT_KILLED; } + /* + Tianmu engine as slave: ingnor some errors + */ + else if(ER_TIANMU_NOT_SUPPORTED_SECONDARY_INDEX == actual_error + || ER_TIANMU_NOT_SUPPORTED_UNIQUE_INDEX == actual_error + || ER_TIANMU_NOT_SUPPORTED_FULLTEXT_INDEX == actual_error + || ER_TIANMU_NOT_SUPPORTED_TRIGGER == actual_error + || ER_TIANMU_NOT_SUPPORTED_FOREIGN_KEY == actual_error + || ER_TIANMU_NOT_FOUND_INDEX == actual_error) + + { + DBUG_PRINT("info",("error ignored")); + clear_all_errors(thd, const_cast(rli)); + thd->killed= THD::NOT_KILLED; + } /* Other cases: mostly we expected no error and get one. */