diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2017-03-24 12:06:29 +0100 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2017-04-21 10:30:16 +0200 |
commit | 3cc89b3e85605ecb09b4b2222c8b0b8222a29fde (patch) | |
tree | 8f47b17503e935e0c38be9cd95c48976a6ffd37d /sql/set_var.cc | |
parent | 4eebf431b07b93cc05e1b15f1e77b6cfcdcf737f (diff) | |
download | mariadb-git-3cc89b3e85605ecb09b4b2222c8b0b8222a29fde.tar.gz |
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Intermediate commit.
Ignore unknown engines in --gtid-pos-auto-engines command-line options (but
not SET GLOBAL). This seems useful, to allow a default that auto-creates the
gtid pos table for engines like TokuDB and MyRocks (which greatly benefit
from such), but does not prevent server startup when those engines are not
available.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 7b190f6244e..78904f75661 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1302,7 +1302,8 @@ engine_list_next_item(const char **pos, const char *end_pos, static bool resolve_engine_list_item(plugin_ref *list, uint32 *idx, - const char *pos, const char *pos_end) + const char *pos, const char *pos_end, + bool error_on_unknown_engine) { LEX_STRING item_str; plugin_ref ref; @@ -1313,9 +1314,13 @@ resolve_engine_list_item(plugin_ref *list, uint32 *idx, ref= ha_resolve_by_name(NULL, &item_str, false); if (!ref) { - ErrConvString err(pos, pos_end-pos, system_charset_info); - my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), err.ptr()); - return true; + if (error_on_unknown_engine) + { + ErrConvString err(pos, pos_end-pos, system_charset_info); + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), err.ptr()); + return true; + } + return false; } /* Ignore duplicates, like --plugin-load does. */ for (i= 0; i < *idx; ++i) @@ -1338,7 +1343,8 @@ resolve_engine_list_item(plugin_ref *list, uint32 *idx, array of plugin_ref. */ plugin_ref * -resolve_engine_list(const char *str_arg, size_t str_arg_len) +resolve_engine_list(const char *str_arg, size_t str_arg_len, + bool error_on_unknown_engine) { uint32 count, idx; const char *pos, *item_start, *item_end; @@ -1370,7 +1376,8 @@ resolve_engine_list(const char *str_arg, size_t str_arg_len) DBUG_ASSERT(idx < count); if (idx >= count) break; - if (resolve_engine_list_item(res, &idx, item_start, item_end)) + if (resolve_engine_list_item(res, &idx, item_start, item_end, + error_on_unknown_engine)) goto err; } |