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
include/config-win.h: Undefine ERROR #defined by WINGDI sql/sql_class.cc: Fix to compile with msvc: converted static const int Item_arena::* to enum members sql/sql_class.h: Fix to compile with msvc: converted static const int Item_arena::* to enum members sql/sql_prepare.cc: Fix to compile with msvc: converted static const int Item_arena::* to enum members
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user