summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2004-08-31 14:07:02 +0400
committersergefp@mysql.com <>2004-08-31 14:07:02 +0400
commit5d3dc82daa88dea5472530e387f533a3450b25c0 (patch)
tree1da40122b504785b1ecbb55b4498789614f192d2 /sql/sql_class.h
parent30e7217d52cff520633aae4c77f5d6e10367bfec (diff)
downloadmariadb-git-5d3dc82daa88dea5472530e387f533a3450b25c0.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)
{