~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/xt_defs.h

  • Committer: lbieber
  • Date: 2010-09-22 13:48:54 UTC
  • mfrom: (1784.1.3 build)
  • Revision ID: lbieber@orisndriz08-20100922134854-y7mae2taqhn73vsx
Merge Paul M. - latest changes from PBXT 1.0.11-7
Merge Paul M. - fix bug 641038 - pbxt rollback not working (tables reported as non-transactional)
Merge Andrew - fix show stoppers for new drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
 */
479
479
#define XT_XLOG_FLUSH_FREQ                              1000
480
480
 
 
481
/*
 
482
 * Define here if you want to check (and correct) the table free list
 
483
 * counts. The free list counts are not durable, because they are not
 
484
 * written to the log.
 
485
 *
 
486
 * The row free count is most critical because it can be used to
 
487
 * estimate the the of rows in the record.
 
488
 */
 
489
#define XT_CHECK_ROW_FREE_COUNT
 
490
#ifdef DEBUG
 
491
#define XT_CHECK_RECORD_FREE_COUNT
 
492
#endif
 
493
#define XT_CORRECT_TABLE_FREE_COUNT 
 
494
 
 
495
#if defined(XT_CHECK_ROW_FREE_COUNT) && defined(XT_CORRECT_TABLE_FREE_COUNT)
 
496
#define XT_ROW_COUNT_CORRECTED
 
497
#endif
 
498
 
481
499
/* ----------------------------------------------------------------------
482
500
 * GLOBAL CONSTANTS
483
501
 */
556
574
 */
557
575
 
558
576
/* Missing on some Solaris machines: */
 
577
/* Drizzle compiles with this stuff defined here.
 
578
 * Is there a reason why they should not go here?
 
579
 * In general, this should come after the system
 
580
 * headers, just in case they are defined in the 
 
581
 * system headers. xt_defs.h should be included
 
582
 * after the system headers. xt_config.h should be
 
583
 * included before the system headers.
 
584
 */
559
585
#ifndef BIG_ENDIAN
560
586
#define BIG_ENDIAN 4321
561
587
#endif
934
960
class Session;
935
961
}
936
962
 
 
963
#define RECORD_0                                                        getInsertRecord()
 
964
#define TABLE_RECORD_0                                          getTable()->getInsertRecord()
 
965
#define TABLE_FIELDS                                            table->getFields()
 
966
#define MYSQL_LOCK(x)                                           x.lock
 
967
#define MYSQL_UNLOCK(x)                                         x.unlock
 
968
#define MYSQL_INIT_LOCK(x, y)                           x.init(y)
 
969
#define MYSQL_FREE_LOCK(x)                                      x.deinit()
937
970
 
938
971
#else // DRIZZLED
 
972
 
939
973
/* The MySQL case: */
940
974
#if MYSQL_VERSION_ID >= 50404
941
975
#define STRUCT_TABLE                                            struct TABLE
958
992
#define MX_ULONGLONG_T                                          ulonglong
959
993
#define MX_LONGLONG_T                                           longlong
960
994
#define MX_CHARSET_INFO                                         struct charset_info_st
961
 
#define MX_CONST_CHARSET_INFO                           struct charset_info_st                  
 
995
#ifdef MARIADB_BASE_VERSION
 
996
#define MX_CONST_CHARSET_INFO                           const struct charset_info_st
 
997
#else
 
998
#define MX_CONST_CHARSET_INFO                           struct charset_info_st
 
999
#endif                  
962
1000
#define MX_CONST                                                        
963
1001
#define MX_BITMAP                                                       MY_BITMAP
964
1002
#define MX_BIT_SIZE()                                           n_bits
965
1003
#define MX_BIT_SET(x, y)                                        bitmap_set_bit(x, y)
966
1004
 
 
1005
#define RECORD_0                                                        record[0]
 
1006
#define TABLE_RECORD_0                                          table->record[0]
 
1007
#define TABLE_FIELDS                                            table->field
 
1008
#define MYSQL_LOCK(x)                                           pthread_mutex_lock(&x)
 
1009
#define MYSQL_UNLOCK(x)                                         pthread_mutex_unlock(&x)
 
1010
#define MYSQL_INIT_LOCK(x, y)                           thr_lock_data_init(y, &x, NULL);
 
1011
#define MYSQL_FREE_LOCK(x)                                      thr_lock_delete(&x)
 
1012
 
967
1013
#endif // DRIZZLED
968
1014
 
969
1015
#define MX_BIT_IS_SUBSET(x, y)                          bitmap_is_subset(x, y)