summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-08-31 14:07:02 +0400
committerunknown <sergefp@mysql.com>2004-08-31 14:07:02 +0400
commitc62dd0d409c76fe676e76467675512c275e8da09 (patch)
tree1da40122b504785b1ecbb55b4498789614f192d2 /sql/sql_class.h
parente2f697bec0407ac56dd719ae19c2a74d659e14cf (diff)
downloadmariadb-git-c62dd0d409c76fe676e76467675512c275e8da09.tar.gz
Change Item_arena::state to enum
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h8
1 files changed, 4 insertions, 4 deletions
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)
{