diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 69bfbac6920..655824d93fe 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3482,7 +3482,7 @@ void select_dumpvar::cleanup() Query_arena::Type Query_arena::type() const { DBUG_ASSERT(0); /* Should never be called */ - return Type::STATEMENT; + return STATEMENT; } @@ -3535,7 +3535,7 @@ Statement::Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg, Query_arena::Type Statement::type() const { - return Type::STATEMENT; + return STATEMENT; } diff --git a/sql/sql_class.h b/sql/sql_class.h index c606e3ddca0..8d8ab779d56 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -951,9 +951,9 @@ public: enum_state state; /* We build without RTTI, so dynamic_cast can't be used. */ - enum class Type + enum Type { - STATEMENT, PREPARED_STATEMENT, STORED_PROCEDURE, TABLE + STATEMENT, PREPARED_STATEMENT, STORED_PROCEDURE, TABLE_ARENA }; Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg) : @@ -3658,7 +3658,7 @@ public: bool is_item_tree_change_register_required() { return !stmt_arena->is_conventional() - || stmt_arena->type() == Query_arena::Type::TABLE; + || stmt_arena->type() == Query_arena::TABLE_ARENA; } void change_item_tree(Item **place, Item *new_value) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index b2ee5abd8b6..f0c9f818f87 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -338,7 +338,7 @@ find_prepared_statement(THD *thd, ulong id) thd->last_stmt : thd->stmt_map.find(id)); - if (stmt == 0 || stmt->type() != Query_arena::Type::PREPARED_STATEMENT) + if (stmt == 0 || stmt->type() != Query_arena::PREPARED_STATEMENT) return NULL; return (Prepared_statement *) stmt; @@ -3893,7 +3893,7 @@ Prepared_statement::~Prepared_statement() Query_arena::Type Prepared_statement::type() const { - return Type::PREPARED_STATEMENT; + return PREPARED_STATEMENT; } diff --git a/sql/table.cc b/sql/table.cc index 6e8c9aab12e..e4492f21a30 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -54,7 +54,7 @@ public: Query_arena(mem_root, state_arg){} virtual Type type() const { - return Type::TABLE; + return TABLE_ARENA; } };