1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix to compile with msvc: converted static const int Item_arena::* to enum members, undefine ERROR

This commit is contained in:
sergefp@mysql.com
2004-08-24 14:44:15 +04:00
parent a309f76128
commit d970586fef
4 changed files with 25 additions and 16 deletions

View File

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