diff options
author | sergefp@mysql.com <> | 2004-08-24 14:44:15 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2004-08-24 14:44:15 +0400 |
commit | d970586fefc1a5fc122a8e8bcee6f85a1aa2b284 (patch) | |
tree | 4fbc65a8bb604088b93c4781dc15692185dad66a /sql/sql_class.h | |
parent | a309f76128201fd8cce537048f2a0e2e6036fd7e (diff) | |
download | mariadb-git-d970586fefc1a5fc122a8e8bcee6f85a1aa2b284.tar.gz |
Fix to compile with msvc: converted static const int Item_arena::* to enum members, undefine ERROR
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 83fdb4c7d76..713609b3d32 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -427,8 +427,12 @@ public: */ Item *free_list; MEM_ROOT mem_root; - static const int INITIALIZED= 0, PREPARED= 1, EXECUTED= 3, - CONVENTIONAL_EXECUTION= 2, ERROR= -1; + enum + { + INITIALIZED= 0, PREPARED= 1, EXECUTED= 3, CONVENTIONAL_EXECUTION= 2, + ERROR= -1 + }; + int state; /* We build without RTTI, so dynamic_cast can't be used. */ @@ -443,8 +447,8 @@ public: virtual Type type() const; virtual ~Item_arena(); - inline bool is_stmt_prepare() const { return state < PREPARED; } - inline bool is_first_stmt_execute() const { return state == PREPARED; } + inline bool is_stmt_prepare() const { return state < (int)PREPARED; } + inline bool is_first_stmt_execute() const { return state == (int)PREPARED; } inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); } inline gptr calloc(unsigned int size) { |