diff options
author | Mikael Ronstrom <mikael@dator8> | 2011-01-17 13:25:31 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@dator8> | 2011-01-17 13:25:31 +0100 |
commit | 14a46479b64e1c0ee0ced10905c65e8c7e276d8b (patch) | |
tree | 2d741fe2d988e58b6542526642c5acab8e47c987 | |
parent | 1ce30b7356086349b59d4a301888d1769567bf82 (diff) | |
download | mariadb-git-14a46479b64e1c0ee0ced10905c65e8c7e276d8b.tar.gz |
BUG#59549, fix compiler error on Windows
-rw-r--r-- | sql/log.cc | 14 | ||||
-rw-r--r-- | sql/log.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sql/log.cc b/sql/log.cc index 7ab4b6b4a61..17efbca8bb2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -5995,7 +5995,7 @@ int TC_LOG_MMAP::open(const char *opt_name) { pg->next=pg+1; pg->waiters=0; - pg->state=POOL; + pg->state=PS_POOL; mysql_mutex_init(key_PAGE_lock, &pg->lock, MY_MUTEX_INIT_FAST); mysql_cond_init(key_PAGE_cond, &pg->cond, 0); pg->start=(my_xid *)(data + i*tc_log_page_size); @@ -6169,7 +6169,7 @@ int TC_LOG_MMAP::log_xid(THD *thd, my_xid xid) cookie= (ulong)((uchar *)p->ptr - data); // can never be zero *p->ptr++= xid; p->free--; - p->state= DIRTY; + p->state= PS_DIRTY; /* to sync or not to sync - this is the question */ mysql_mutex_unlock(&LOCK_active); @@ -6181,13 +6181,13 @@ int TC_LOG_MMAP::log_xid(THD *thd, my_xid xid) p->waiters++; /* note - it must be while (), not do ... while () here - as p->state may be not DIRTY when we come here + as p->state may be not PS_DIRTY when we come here */ - while (p->state == DIRTY && syncing) + while (p->state == PS_DIRTY && syncing) mysql_cond_wait(&p->cond, &LOCK_sync); p->waiters--; - err= p->state == ERROR; - if (p->state != DIRTY) // page was synced + err= p->state == PS_ERROR; + if (p->state != PS_DIRTY) // page was synced { if (p->waiters == 0) mysql_cond_signal(&COND_pool); // in case somebody's waiting @@ -6225,7 +6225,7 @@ int TC_LOG_MMAP::sync() pool_last->next=syncing; pool_last=syncing; syncing->next=0; - syncing->state= err ? ERROR : POOL; + syncing->state= err ? PS_ERROR : PS_POOL; mysql_cond_broadcast(&syncing->cond); // signal "sync done" mysql_cond_signal(&COND_pool); // in case somebody's waiting mysql_mutex_unlock(&LOCK_pool); diff --git a/sql/log.h b/sql/log.h index 05f8a4ce286..d287da0dcd1 100644 --- a/sql/log.h +++ b/sql/log.h @@ -63,9 +63,9 @@ class TC_LOG_MMAP: public TC_LOG { public: // only to keep Sun Forte on sol9x86 happy typedef enum { - POOL, // page is in pool - ERROR, // last sync failed - DIRTY // new xids added since last sync + PS_POOL, // page is in pool + PS_ERROR, // last sync failed + PS_DIRTY // new xids added since last sync } PAGE_STATE; private: |