From 5d3dc82daa88dea5472530e387f533a3450b25c0 Mon Sep 17 00:00:00 2001 From: "sergefp@mysql.com" <> Date: Tue, 31 Aug 2004 14:07:02 +0400 Subject: Change Item_arena::state to enum --- sql/sql_class.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index 198e06bb3bd..a8035cffd96 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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) { -- cgit v1.2.1