1
0
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:
unknown
2004-08-31 14:07:02 +04:00
parent e2f697bec0
commit c62dd0d409
3 changed files with 16 additions and 16 deletions

View File

@ -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)
{