fix c++98 build

This commit is contained in:
Nikita Malyavin 2020-07-21 23:12:32 +10:00
parent 5acd391e8b
commit ebca70ead3
4 changed files with 8 additions and 8 deletions

View File

@ -3482,7 +3482,7 @@ void select_dumpvar::cleanup()
Query_arena::Type Query_arena::type() const Query_arena::Type Query_arena::type() const
{ {
DBUG_ASSERT(0); /* Should never be called */ 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 Query_arena::Type Statement::type() const
{ {
return Type::STATEMENT; return STATEMENT;
} }

View File

@ -951,9 +951,9 @@ public:
enum_state state; enum_state state;
/* We build without RTTI, so dynamic_cast can't be used. */ /* 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) : Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg) :
@ -3658,7 +3658,7 @@ public:
bool is_item_tree_change_register_required() bool is_item_tree_change_register_required()
{ {
return !stmt_arena->is_conventional() 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) void change_item_tree(Item **place, Item *new_value)

View File

@ -338,7 +338,7 @@ find_prepared_statement(THD *thd, ulong id)
thd->last_stmt : thd->last_stmt :
thd->stmt_map.find(id)); 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 NULL;
return (Prepared_statement *) stmt; return (Prepared_statement *) stmt;
@ -3893,7 +3893,7 @@ Prepared_statement::~Prepared_statement()
Query_arena::Type Prepared_statement::type() const Query_arena::Type Prepared_statement::type() const
{ {
return Type::PREPARED_STATEMENT; return PREPARED_STATEMENT;
} }

View File

@ -54,7 +54,7 @@ public:
Query_arena(mem_root, state_arg){} Query_arena(mem_root, state_arg){}
virtual Type type() const virtual Type type() const
{ {
return Type::TABLE; return TABLE_ARENA;
} }
}; };