~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:30:27 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103033027-lskb6gxwwforfz71
fix docs warning: underline/overline too short for replace.rst

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
static my_bool                  pbxt_support_xa;
201
202
 
202
203
#ifndef DRIZZLED
203
204
// drizzle complains it's not used
204
 
static my_bool                  pbxt_support_xa;
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_internal((const unsigned char *)&tab->tab_auto_inc) > 0) {
 
2508
        if (nr->cmp((const unsigned char *)&tab->tab_auto_inc) > 0) {
2509
2509
                xt_spinlock_lock(&tab->tab_ainc_lock);
2510
2510
 
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
 
                }
 
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
                }
2521
2521
                xt_spinlock_unlock(&tab->tab_ainc_lock);
2522
2522
        }
2523
2523
 
4348
4348
        else
4349
4349
                my_xn_id = db->db_xn_to_clean_id;
4350
4350
 
4351
 
        while ((!db->db_sw_idle || xt_xn_is_before(db->db_xn_to_clean_id, my_xn_id)) && not (thd->getKilled())) {
 
4351
        while ((!db->db_sw_idle || xt_xn_is_before(db->db_xn_to_clean_id, my_xn_id)) && !thd_killed(thd)) {
4352
4352
                xt_busy_wait();
4353
4353
 
4354
4354
                /*
5629
5629
 
5630
5630
                StorageEngine::writeDefinitionFromPath(ident, proto);
5631
5631
 
5632
 
                Session::QueryString query_string(thd->getQueryString());
5633
 
                tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, const_cast<char *>(query_string->c_str()), myxt_create_table_from_table(self, table_arg.getMutableShare()), &source_dic);
 
5632
                tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, const_cast<char *>(thd->getQueryString().c_str()), myxt_create_table_from_table(self, table_arg.getMutableShare()), &source_dic);
5634
5633
                tab_def->checkForeignKeys(self, proto.type() == message::Table::TEMPORARY);
5635
5634
 
5636
5635
                dic.dic_table = tab_def;
6021
6020
}
6022
6021
#endif // DRI_IS
6023
6022
 
6024
 
#ifndef DRIZZLED
6025
6023
struct st_mysql_sys_var
6026
6024
{
6027
6025
        MYSQL_PLUGIN_VAR_HEADER;
6036
6034
#define USE_CONST_SAVE
6037
6035
#endif
6038
6036
#endif
6039
 
#endif
6040
6037
 
6041
6038
#ifdef DRIZZLED
6042
6039
#define st_mysql_sys_var drizzled::drizzle_sys_var
6043
6040
#endif
6044
6041
 
6045
 
#ifndef DRIZZLED
6046
6042
#ifdef USE_CONST_SAVE
6047
6043
static void pbxt_record_cache_size_func(THD *XT_UNUSED(thd), struct st_mysql_sys_var *var, void *tgt, const void *save)
6048
6044
#else
6068
6064
#endif
6069
6065
}
6070
6066
 
 
6067
#ifndef DRIZZLED
6071
6068
struct st_mysql_storage_engine pbxt_storage_engine = {
6072
6069
        MYSQL_HANDLERTON_INTERFACE_VERSION
6073
6070
};
6074
6071
static st_mysql_information_schema pbxt_statitics = {
6075
6072
        MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
6076
6073
};
 
6074
#endif
6077
6075
 
6078
6076
#if MYSQL_VERSION_ID >= 50118
6079
6077
static MYSQL_SYSVAR_STR(index_cache_size, pbxt_index_cache_size,
6206
6204
  NULL
6207
6205
};
6208
6206
#endif
6209
 
#endif
6210
6207
 
6211
6208
#ifdef DRIZZLED
6212
6209
DRIZZLE_DECLARE_PLUGIN
6218
6215
        "High performance, multi-versioning transactional engine",
6219
6216
        PLUGIN_LICENSE_GPL,
6220
6217
        pbxt_init, /* Plugin Init */
6221
 
        NULL,          /* system variables                */
 
6218
        pbxt_system_variables,          /* system variables                */
6222
6219
        NULL                                            /* config options                  */
6223
6220
}
6224
6221
DRIZZLE_DECLARE_PLUGIN_END;