~pbxt-core/pbxt/2.0

« back to all changes in this revision

Viewing changes to src/index_xt.h

  • Committer: Paul McCullagh
  • Date: 2010-05-03 12:43:05 UTC
  • mfrom: (831.2.21 1.5-trunk)
  • Revision ID: paul.mccullagh@primebase.org-20100503124305-ifpcfm7234cx4371
Merged with 1.5 trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#ifdef DRIZZLED
27
27
#include <drizzled/definitions.h>
28
 
#include <mysys/my_bitmap.h>
 
28
#include <drizzled/sql_bitmap.h>
 
29
#include <drizzled/field.h>
 
30
using drizzled::Field;
29
31
#else
30
32
#include <mysql_version.h>
31
33
#include <my_bitmap.h>
99
101
#define IND_FLUSH_THRESHOLD                                     (512 * 1024 * 1024)
100
102
 
101
103
struct XTDictionary;
102
 
STRUCT_TABLE;
103
104
struct XTTable;
104
105
struct XTOpenTable;
105
106
struct XTIndex;
249
250
 
250
251
typedef int (*XTSimpleCompFunc)(struct XTIndex *ind, u_int key_length, xtWord1 *key_value, xtWord1 *b_value);
251
252
 
 
253
#ifdef DRIZZLED
 
254
namespace drizzled
 
255
{
 
256
  struct charset_info_st;
 
257
}
 
258
using drizzled::charset_info_st;
 
259
#else
252
260
struct charset_info_st;
 
261
#endif
253
262
 
254
263
typedef struct XTIndexSeg               /* Key-portion */
255
264
{
365
374
#define XT_INDEX_LOCK_TYPE                              xt_rwlock_type
366
375
#define XT_INDEX_INIT_LOCK(s, i)                xt_init_rwlock_with_autoname(s, &(i)->mi_rwlock)
367
376
#define XT_INDEX_FREE_LOCK(s, i)                xt_free_rwlock(&(i)->mi_rwlock) 
368
 
#define XT_INDEX_READ_LOCK(i, o)                xt_slock_rwlock_ns(&(i)->mi_rwlock)
369
 
#define XT_INDEX_WRITE_LOCK(i, o)               xt_xlock_rwlock_ns(&(i)->mi_rwlock)
370
 
#define XT_INDEX_UNLOCK(i, o)                   xt_unlock_rwlock_ns(&(i)->mi_rwlock)
 
377
#define XT_INDEX_READ_LOCK(i, o)                do { xt_slock_rwlock_ns(&(i)->mi_rwlock); (void) (o); } while(0)
 
378
#define XT_INDEX_WRITE_LOCK(i, o)               do { xt_xlock_rwlock_ns(&(i)->mi_rwlock); (void) (o); } while(0)
 
379
#define XT_INDEX_UNLOCK(i, o)                   do { xt_unlock_rwlock_ns(&(i)->mi_rwlock); (void) (o); } while(0)
371
380
#define XT_INDEX_HAVE_XLOCK(i, o)               TRUE
372
381
#elif defined(XT_TAB_ROW_USE_XSMUTEX)
373
382
#define XT_INDEX_LOCK_TYPE                              XTMutexXSLockRec
471
480
        u_int                           dic_index_ver;                          /* The version of the index. */
472
481
        u_int                           dic_key_count;
473
482
        XTIndexPtr                      *dic_keys;                                      /* MySQL/PBXT key description */
 
483
        xtWord1                         dic_table_type;                 /* XT_TABLE_TYPE_VALUE, so far used only in Drizzled */
474
484
        STRUCT_TABLE            *dic_my_table;                          /* MySQL table */
475
485
} XTDictionaryRec, *XTDictionaryPtr;
476
486