mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Change Item_arena::state to enum
This commit is contained in:
@ -427,13 +427,13 @@ public:
|
||||
*/
|
||||
Item *free_list;
|
||||
MEM_ROOT mem_root;
|
||||
enum
|
||||
enum enum_state
|
||||
{
|
||||
INITIALIZED= 0, PREPARED= 1, EXECUTED= 3, CONVENTIONAL_EXECUTION= 2,
|
||||
ERROR= -1
|
||||
};
|
||||
|
||||
int state;
|
||||
enum_state state;
|
||||
|
||||
/* We build without RTTI, so dynamic_cast can't be used. */
|
||||
enum Type
|
||||
@ -447,8 +447,8 @@ public:
|
||||
virtual Type type() const;
|
||||
virtual ~Item_arena();
|
||||
|
||||
inline bool is_stmt_prepare() const { return state < (int)PREPARED; }
|
||||
inline bool is_first_stmt_execute() const { return state == (int)PREPARED; }
|
||||
inline bool is_stmt_prepare() const { return (int)state < (int)PREPARED; }
|
||||
inline bool is_first_stmt_execute() const { return state == PREPARED; }
|
||||
inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); }
|
||||
inline gptr calloc(unsigned int size)
|
||||
{
|
||||
|
Reference in New Issue
Block a user