~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/ha_pbxt.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-12-21 16:39:40 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20101221163940-c1pfo1jjvx7909xq
Tags: 2010.12.06-0ubuntu1
* New upstream release.
* Added libaio-dev build depend for InnoDB.
* Removed libpcre patch - applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2005 PrimeBase Technologies GmbH
 
1
/* Copyright (C) 2005 PrimeBase Technologies GmbH
2
2
 *
3
3
 * Derived from ha_example.h
4
4
 * Copyright (C) 2003 MySQL AB
198
198
static char                             *pbxt_data_file_grow_size;
199
199
static char                             *pbxt_row_file_grow_size;
200
200
static char                             *pbxt_record_write_threshold;
 
201
 
 
202
#ifndef DRIZZLED
 
203
// drizzle complains it's not used
201
204
static my_bool                  pbxt_support_xa;
202
 
 
203
 
#ifndef DRIZZLED
204
 
// drizzle complains it's not used
205
205
static XTXactEnumXARec  pbxt_xa_enum;
206
206
#endif
207
207
 
2505
2505
        nr_int_val = nr->val_int();
2506
2506
        tab = ot->ot_table;
2507
2507
 
2508
 
        if (nr->cmp((const unsigned char *)&tab->tab_auto_inc) > 0) {
 
2508
        if (nr->cmp_internal((const unsigned char *)&tab->tab_auto_inc) > 0) {
2509
2509
                xt_spinlock_lock(&tab->tab_ainc_lock);
2510
2510
 
2511
 
                if (nr->cmp((const unsigned char *)&tab->tab_auto_inc) > 0) {
2512
 
                        /* {PRE-INC}
2513
 
                         * We increment later, so just set the value!
2514
 
                        MX_ULONGLONG_T nr_int_val_plus_one = nr_int_val + 1;
2515
 
                        if (nr->cmp((const unsigned char *)&nr_int_val_plus_one) < 0)
2516
 
                                tab->tab_auto_inc = nr_int_val_plus_one;
2517
 
                        else
2518
 
                         */
2519
 
                        tab->tab_auto_inc = nr_int_val;
2520
 
                }
 
2511
                if (nr->cmp_internal((const unsigned char *)&tab->tab_auto_inc) > 0) {
 
2512
                  /* {PRE-INC}
 
2513
                   * We increment later, so just set the value!
 
2514
                   MX_ULONGLONG_T nr_int_val_plus_one = nr_int_val + 1;
 
2515
                   if (nr->cmp((const unsigned char *)&nr_int_val_plus_one) < 0)
 
2516
                   tab->tab_auto_inc = nr_int_val_plus_one;
 
2517
                   else
 
2518
                 */
 
2519
                  tab->tab_auto_inc = nr_int_val;
 
2520
                }
2521
2521
                xt_spinlock_unlock(&tab->tab_ainc_lock);
2522
2522
        }
2523
2523
 
6021
6021
}
6022
6022
#endif // DRI_IS
6023
6023
 
 
6024
#ifndef DRIZZLED
6024
6025
struct st_mysql_sys_var
6025
6026
{
6026
6027
        MYSQL_PLUGIN_VAR_HEADER;
6035
6036
#define USE_CONST_SAVE
6036
6037
#endif
6037
6038
#endif
 
6039
#endif
6038
6040
 
6039
6041
#ifdef DRIZZLED
6040
6042
#define st_mysql_sys_var drizzled::drizzle_sys_var
6041
6043
#endif
6042
6044
 
 
6045
#ifndef DRIZZLED
6043
6046
#ifdef USE_CONST_SAVE
6044
6047
static void pbxt_record_cache_size_func(THD *XT_UNUSED(thd), struct st_mysql_sys_var *var, void *tgt, const void *save)
6045
6048
#else
6065
6068
#endif
6066
6069
}
6067
6070
 
6068
 
#ifndef DRIZZLED
6069
6071
struct st_mysql_storage_engine pbxt_storage_engine = {
6070
6072
        MYSQL_HANDLERTON_INTERFACE_VERSION
6071
6073
};
6072
6074
static st_mysql_information_schema pbxt_statitics = {
6073
6075
        MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
6074
6076
};
6075
 
#endif
6076
6077
 
6077
6078
#if MYSQL_VERSION_ID >= 50118
6078
6079
static MYSQL_SYSVAR_STR(index_cache_size, pbxt_index_cache_size,
6205
6206
  NULL
6206
6207
};
6207
6208
#endif
 
6209
#endif
6208
6210
 
6209
6211
#ifdef DRIZZLED
6210
6212
DRIZZLE_DECLARE_PLUGIN
6216
6218
        "High performance, multi-versioning transactional engine",
6217
6219
        PLUGIN_LICENSE_GPL,
6218
6220
        pbxt_init, /* Plugin Init */
6219
 
        pbxt_system_variables,          /* system variables                */
 
6221
        NULL,          /* system variables                */
6220
6222
        NULL                                            /* config options                  */
6221
6223
}
6222
6224
DRIZZLE_DECLARE_PLUGIN_END;