~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-10-13 02:49:48 UTC
  • mto: This revision was merged to the branch mainline in revision 1853.
  • Revision ID: brian@tangent.org-20101013024948-xwel5qe6z7j21w73
Cleans up namespace for locks (now per user).

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
47
47
#include <drizzled/data_home.h>
48
48
#include <drizzled/error.h>
49
49
#include <drizzled/table.h>
 
50
#include <drizzled/field/timestamp.h>
50
51
#include <drizzled/session.h>
51
52
 
52
53
#include <string>
197
198
static char                             *pbxt_data_file_grow_size;
198
199
static char                             *pbxt_row_file_grow_size;
199
200
static char                             *pbxt_record_write_threshold;
 
201
static my_bool                  pbxt_support_xa;
200
202
 
201
203
#ifndef DRIZZLED
202
204
// drizzle complains it's not used
203
 
static my_bool                  pbxt_support_xa;
204
205
static XTXactEnumXARec  pbxt_xa_enum;
205
206
#endif
206
207
 
1481
1482
        return 0;
1482
1483
}
1483
1484
 
1484
 
Cursor *PBXTStorageEngine::create(Table& table)
 
1485
Cursor *PBXTStorageEngine::create(TableShare& table)
1485
1486
{
1486
1487
        return new ha_pbxt(*this, table);
1487
1488
}
2019
2020
 *
2020
2021
 */
2021
2022
 
2022
 
ha_pbxt::ha_pbxt(plugin::StorageEngine &engine_arg, Table &table_arg) : Cursor(engine_arg, table_arg)
 
2023
ha_pbxt::ha_pbxt(plugin::StorageEngine &engine_arg, TableShare &table_arg) : Cursor(engine_arg, table_arg)
2023
2024
{
2024
2025
        pb_share = NULL;
2025
2026
        pb_open_tab = NULL;
2350
2351
                return;
2351
2352
 
2352
2353
        xt_spinlock_lock(&tab->tab_ainc_lock);
2353
 
        if (getTable()->found_next_number_field && !tab->tab_auto_inc) {
2354
 
                Field           *tmp_fie = getTable()->next_number_field;
2355
 
                THD                     *tmp_thd = getTable()->in_use;
 
2354
        if (table->found_next_number_field && !tab->tab_auto_inc) {
 
2355
                Field           *tmp_fie = table->next_number_field;
 
2356
                THD                     *tmp_thd = table->in_use;
2356
2357
                xtBool          xn_started = FALSE;
2357
2358
                XTThreadPtr     self = pb_open_tab->ot_thread;
2358
2359
 
2380
2381
                }
2381
2382
 
2382
2383
                /* Setup the conditions for the next call! */
2383
 
                getTable()->in_use = current_thd;
2384
 
                getTable()->next_number_field = getTable()->found_next_number_field;
 
2384
                table->in_use = current_thd;
 
2385
                table->next_number_field = table->found_next_number_field;
2385
2386
 
2386
2387
                extra(HA_EXTRA_KEYREAD);
2387
 
                getTable()->mark_columns_used_by_index_no_reset(getTable()->getShare()->next_number_index, *getTable()->read_set);
 
2388
                table->mark_columns_used_by_index_no_reset(TS(table)->next_number_index, *table->read_set);
2388
2389
                column_bitmaps_signal();
2389
 
                doStartIndexScan(getTable()->getShare()->next_number_index, 0);
2390
 
                if (!getTable()->getShare()->next_number_key_offset) {
 
2390
                doStartIndexScan(TS(table)->next_number_index, 0);
 
2391
                if (!TS(table)->next_number_key_offset) {
2391
2392
                        // Autoincrement at key-start
2392
 
                        err = index_last(getTable()->getUpdateRecord());
2393
 
                        if (!err && !getTable()->next_number_field->is_null(getTable()->getShare()->rec_buff_length)) {
 
2393
                        err = index_last(table->getUpdateRecord());
 
2394
                        if (!err && !table->next_number_field->is_null(TS(table)->rec_buff_length)) {
2394
2395
                                /* {PRE-INC} */
2395
 
                                nr = (xtWord8) getTable()->next_number_field->val_int_offset(getTable()->getShare()->rec_buff_length);
 
2396
                                nr = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
2396
2397
                        }
2397
2398
                }
2398
2399
                else {
2402
2403
                         */
2403
2404
                        xtWord8 val;
2404
2405
 
2405
 
                        err = index_first(getTable()->getUpdateRecord());
 
2406
                        err = index_first(table->getUpdateRecord());
2406
2407
                        while (!err) {
2407
2408
                                /* {PRE-INC} */
2408
 
                                val = (xtWord8) getTable()->next_number_field->val_int_offset(getTable()->getShare()->rec_buff_length);
 
2409
                                val = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
2409
2410
                                if (val > nr)
2410
2411
                                        nr = val;
2411
 
                                err = index_next(getTable()->getUpdateRecord());
 
2412
                                err = index_next(table->getUpdateRecord());
2412
2413
                        }
2413
2414
                }
2414
2415
 
2443
2444
                        tab->tab_auto_inc = min_auto_inc-1;
2444
2445
 
2445
2446
                /* Restore the changed values: */
2446
 
                getTable()->next_number_field = tmp_fie;
2447
 
                getTable()->in_use = tmp_thd;
 
2447
                table->next_number_field = tmp_fie;
 
2448
                table->in_use = tmp_thd;
2448
2449
 
2449
2450
                if (xn_started) {
2450
2451
                        XT_PRINT0(self, "xt_xn_commit in init_auto_increment\n");
2479
2480
                nr += increment - ((nr - offset) % increment);
2480
2481
        else
2481
2482
                nr += increment;
2482
 
        if (getTable()->next_number_field->cmp((const unsigned char *)&nr_less_inc, (const unsigned char *)&nr) < 0)
 
2483
        if (table->next_number_field->cmp((const unsigned char *)&nr_less_inc, (const unsigned char *)&nr) < 0)
2483
2484
                tab->tab_auto_inc = (xtWord8) (nr);
2484
2485
        else
2485
2486
                nr = ~0;        /* indicate error to the caller */
2504
2505
        nr_int_val = nr->val_int();
2505
2506
        tab = ot->ot_table;
2506
2507
 
2507
 
        if (nr->cmp_internal((const unsigned char *)&tab->tab_auto_inc) > 0) {
 
2508
        if (nr->cmp((const unsigned char *)&tab->tab_auto_inc) > 0) {
2508
2509
                xt_spinlock_lock(&tab->tab_ainc_lock);
2509
2510
 
2510
 
                if (nr->cmp_internal((const unsigned char *)&tab->tab_auto_inc) > 0) {
2511
 
                  /* {PRE-INC}
2512
 
                   * We increment later, so just set the value!
2513
 
                   MX_ULONGLONG_T nr_int_val_plus_one = nr_int_val + 1;
2514
 
                   if (nr->cmp((const unsigned char *)&nr_int_val_plus_one) < 0)
2515
 
                   tab->tab_auto_inc = nr_int_val_plus_one;
2516
 
                   else
2517
 
                 */
2518
 
                  tab->tab_auto_inc = nr_int_val;
2519
 
                }
 
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
                }
2520
2521
                xt_spinlock_unlock(&tab->tab_ainc_lock);
2521
2522
        }
2522
2523
 
2609
2610
                        pb_import_row_count++;
2610
2611
        }
2611
2612
 
2612
 
        if (getTable()->next_number_field && buf == getTable()->getInsertRecord()) {
 
2613
        if (table->next_number_field && buf == table->getInsertRecord()) {
2613
2614
                int update_err = update_auto_increment();
2614
2615
                if (update_err) {
2615
2616
                        ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);
2616
2617
                        err = update_err;
2617
2618
                        goto done;
2618
2619
                }
2619
 
                ha_set_auto_increment(pb_open_tab, getTable()->next_number_field);
 
2620
                ha_set_auto_increment(pb_open_tab, table->next_number_field);
2620
2621
        }
2621
2622
 
2622
2623
        if (!xt_tab_new_record(pb_open_tab, (xtWord1 *) buf)) {
2734
2735
         * update t1 set a=2 where a=1;
2735
2736
         * insert into t1 (val) values (1);
2736
2737
         */
2737
 
        if (getTable()->found_next_number_field && new_data == getTable()->getInsertRecord()) {
 
2738
        if (table->found_next_number_field && new_data == table->getInsertRecord()) {
2738
2739
                MX_LONGLONG_T   nr;
2739
 
        const boost::dynamic_bitset<>& old_bitmap= getTable()->use_all_columns(*getTable()->read_set);
2740
 
                nr = getTable()->found_next_number_field->val_int();
2741
 
                ha_set_auto_increment(pb_open_tab, getTable()->found_next_number_field);
2742
 
        getTable()->restore_column_map(old_bitmap);
 
2740
        const boost::dynamic_bitset<>& old_bitmap= table->use_all_columns(*table->read_set);
 
2741
                nr = table->found_next_number_field->val_int();
 
2742
                ha_set_auto_increment(pb_open_tab, table->found_next_number_field);
 
2743
        table->restore_column_map(old_bitmap);
2743
2744
        }
2744
2745
 
2745
2746
        if (!xt_tab_update_record(pb_open_tab, (xtWord1 *) old_data, (xtWord1 *) new_data))
3133
3134
        /* The number of columns required: */
3134
3135
        if (pb_open_tab->ot_is_modify) {
3135
3136
 
3136
 
                pb_open_tab->ot_cols_req = getTable()->read_set->MX_BIT_SIZE();
 
3137
                pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
3137
3138
#ifdef XT_PRINT_INDEX_OPT
3138
3139
                ind = (XTIndexPtr) pb_share->sh_dic_keys[idx];
3139
3140
 
3148
3149
        }
3149
3150
        else {
3150
3151
                //pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
3151
 
                pb_open_tab->ot_cols_req = getTable()->read_set->MX_BIT_SIZE();
 
3152
                pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
3152
3153
 
3153
3154
                /* Check for index coverage!
3154
3155
                 *
3199
3200
         */
3200
3201
        std::string bitmap_str= convert_long_to_bit_string(ind->mi_col_map, ind->mi_col_map_size);
3201
3202
        MX_BITMAP tmp(bitmap_str);
3202
 
                if (MX_BIT_IS_SUBSET(getTable()->read_set, tmp))
 
3203
                if (MX_BIT_IS_SUBSET(table->read_set, tmp))
3203
3204
#else
3204
 
                if (MX_BIT_IS_SUBSET(getTable()->read_set, ind->mi_col_map))
 
3205
                if (MX_BIT_IS_SUBSET(table->read_set, ind->mi_col_map))
3205
3206
#endif
3206
3207
                        pb_key_read = TRUE;
3207
3208
#ifdef XT_PRINT_INDEX_OPT
3346
3347
        XT_DISABLED_TRACE(("search tx=%d val=%d err=%d\n", (int) pb_open_tab->ot_thread->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(key), err));
3347
3348
        done:
3348
3349
        if (err)
3349
 
                getTable()->status = STATUS_NOT_FOUND;
 
3350
                table->status = STATUS_NOT_FOUND;
3350
3351
        else {
3351
3352
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3352
 
                getTable()->status = 0;
 
3353
                table->status = 0;
3353
3354
        }
3354
3355
        return err;
3355
3356
}
3407
3408
#endif
3408
3409
        done:
3409
3410
        if (err)
3410
 
                getTable()->status = STATUS_NOT_FOUND;
 
3411
                table->status = STATUS_NOT_FOUND;
3411
3412
        else {
3412
3413
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3413
 
                getTable()->status = 0;
 
3414
                table->status = 0;
3414
3415
        }
3415
3416
        XT_RETURN(err);
3416
3417
}
3461
3462
#endif
3462
3463
        done:
3463
3464
        if (err)
3464
 
                getTable()->status = STATUS_NOT_FOUND;
 
3465
                table->status = STATUS_NOT_FOUND;
3465
3466
        else {
3466
3467
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3467
 
                getTable()->status = 0;
 
3468
                table->status = 0;
3468
3469
        }
3469
3470
        XT_RETURN(err);
3470
3471
}
3499
3500
#endif
3500
3501
        done:
3501
3502
        if (err)
3502
 
                getTable()->status = STATUS_NOT_FOUND;
 
3503
                table->status = STATUS_NOT_FOUND;
3503
3504
        else {
3504
3505
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3505
 
                getTable()->status = 0;
 
3506
                table->status = 0;
3506
3507
        }
3507
3508
        XT_RETURN(err);
3508
3509
}
3552
3553
#endif
3553
3554
        done:
3554
3555
        if (err)
3555
 
                getTable()->status = STATUS_NOT_FOUND;
 
3556
                table->status = STATUS_NOT_FOUND;
3556
3557
        else {
3557
3558
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3558
 
                getTable()->status = 0;
 
3559
                table->status = 0;
3559
3560
        }
3560
3561
        XT_RETURN(err);
3561
3562
}
3598
3599
#endif
3599
3600
        done:
3600
3601
        if (err)
3601
 
                getTable()->status = STATUS_NOT_FOUND;
 
3602
                table->status = STATUS_NOT_FOUND;
3602
3603
        else {
3603
3604
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3604
 
                getTable()->status = 0;
 
3605
                table->status = 0;
3605
3606
        }
3606
3607
        XT_RETURN(err);
3607
3608
}
3645
3646
 
3646
3647
        /* The number of columns required: */
3647
3648
        if (pb_open_tab->ot_is_modify) {
3648
 
                pb_open_tab->ot_cols_req = getTable()->read_set->MX_BIT_SIZE();
 
3649
                pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
3649
3650
                /* {START-STAT-HACK} previously position of start statement hack,
3650
3651
                 * previous comment to code below: */
3651
3652
                /* Start a statement based transaction as soon
3655
3656
        }
3656
3657
        else {
3657
3658
                //pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
3658
 
                pb_open_tab->ot_cols_req = getTable()->read_set->MX_BIT_SIZE();
 
3659
                pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
3659
3660
 
3660
3661
                /*
3661
3662
                 * in case of queries like SELECT COUNT(*) FROM t
3725
3726
                err = HA_ERR_END_OF_FILE;
3726
3727
 
3727
3728
        if (err)
3728
 
                getTable()->status = STATUS_NOT_FOUND;
 
3729
                table->status = STATUS_NOT_FOUND;
3729
3730
        else {
3730
3731
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3731
 
                getTable()->status = 0;
 
3732
                table->status = 0;
3732
3733
        }
3733
3734
        XT_RETURN(err);
3734
3735
}
3800
3801
        }               
3801
3802
 
3802
3803
        if (err)
3803
 
                getTable()->status = STATUS_NOT_FOUND;
 
3804
                table->status = STATUS_NOT_FOUND;
3804
3805
        else {
3805
3806
                pb_open_tab->ot_thread->st_statistics.st_row_select++;
3806
 
                getTable()->status = 0;
 
3807
                table->status = 0;
3807
3808
        }
3808
3809
        XT_RETURN(err);
3809
3810
}
3901
3902
                         * #1   0x0022e1f1 in make_sortkey at filesort.cc:769
3902
3903
                         * #2   0x0022f1cf in find_all_keys at filesort.cc:619
3903
3904
                         * #3   0x00230eec in filesort at filesort.cc:243
3904
 
                         * #4   0x001b9d89 in update_query at sql_update.cc:415
 
3905
                         * #4   0x001b9d89 in mysql_update at sql_update.cc:415
3905
3906
                         * #5   0x0010db12 in mysql_execute_command at sql_parse.cc:2959
3906
3907
                         * #6   0x0011480d in mysql_parse at sql_parse.cc:5787
3907
3908
                         * #7   0x00115afb in dispatch_command at sql_parse.cc:1200
4194
4195
 *
4195
4196
 * Called from item_sum.cc by Item_func_group_concat::clear(),
4196
4197
 * Item_sum_count_distinct::clear(), and Item_func_group_concat::clear().
4197
 
 * Called from sql_delete.cc by delete_query().
 
4198
 * Called from sql_delete.cc by mysql_delete().
4198
4199
 * Called from sql_select.cc by JOIN::reinit().
4199
4200
 * Called from sql_union.cc by st_select_lex_unit::exec().
4200
4201
 */
4347
4348
        else
4348
4349
                my_xn_id = db->db_xn_to_clean_id;
4349
4350
 
4350
 
        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)) {
4351
4352
                xt_busy_wait();
4352
4353
 
4353
4354
                /*
5611
5612
        try_(a) {
5612
5613
                xt_ha_open_database_of_table(self, (XTPathStrPtr) table_path);
5613
5614
 
5614
 
                for (uint i=0; i<table_arg.getShare()->keys; i++) {
 
5615
                for (uint i=0; i<table_arg.s->keys; i++) {
5615
5616
                        if (table_arg.key_info[i].key_length > XT_INDEX_MAX_KEY_SIZE)
5616
5617
                                xt_throw_sulxterr(XT_CONTEXT, XT_ERR_KEY_TOO_LARGE, table_arg.key_info[i].name, (u_long) XT_INDEX_MAX_KEY_SIZE);
5617
5618
                }
5628
5629
 
5629
5630
                StorageEngine::writeDefinitionFromPath(ident, proto);
5630
5631
 
5631
 
                Session::QueryString query_string(thd->getQueryString());
5632
 
                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.s), &source_dic);
5633
5633
                tab_def->checkForeignKeys(self, proto.type() == message::Table::TEMPORARY);
5634
5634
 
5635
5635
                dic.dic_table = tab_def;
5636
 
                dic.dic_my_table = table_arg.getMutableShare();
 
5636
                dic.dic_my_table = table_arg.s;
5637
5637
                dic.dic_tab_flags = source_dic.dic_tab_flags;
5638
5638
                //if (create_info.storage_media == HA_SM_MEMORY)
5639
5639
                //      dic.dic_tab_flags |= XT_TF_MEMORY_TABLE;
5700
5700
        if (!self->st_database)
5701
5701
                xt_ha_open_database_of_table(self, NULL);
5702
5702
 
5703
 
        assert(!self->st_xact_data); // Check we're not called twice
5704
 
        if (!xt_xn_begin(self)) {
5705
 
          err = xt_ha_pbxt_thread_error_for_mysql(thd, self, /*pb_ignore_dup_key*/false);
 
5703
        /* startTransaction() calls registerResourceForTransaction() calls engine->startTransaction(), and then
 
5704
         * startTransaction() calls doStartTransaction()
 
5705
         * Which leads to this function being called twice!?
 
5706
         * So added the self->st_xact_data test below.
 
5707
         */
 
5708
        if (!self->st_xact_data) {
 
5709
                if (!xt_xn_begin(self)) {
 
5710
                        err = xt_ha_pbxt_thread_error_for_mysql(thd, self, /*pb_ignore_dup_key*/false);
 
5711
                        //pb_ex_in_use = 0;
 
5712
                }
5706
5713
        }
5707
5714
 
5708
5715
        return err;
5723
5730
        return xt_ha_pbxt_thread_error_for_mysql(thd, xt_ha_thd_to_self(thd), false);
5724
5731
}
5725
5732
 
5726
 
int PBXTStorageEngine::doCommit(drizzled::Session* thd, bool real_commit)
 
5733
int PBXTStorageEngine::doCommit(drizzled::Session* thd, bool)
5727
5734
{
5728
5735
        int err = 0;
5729
5736
        XTThreadPtr self = (XTThreadPtr) *thd->getEngineData(pbxt_hton);
5730
5737
 
 
5738
        bool real_commit = !session_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
 
5739
        
5731
5740
        XT_PRINT1(self, "PBXTStorageEngine::doCommit(real_commit = %s)\n", real_commit ? "true" : "false");
5732
5741
 
5733
5742
        if (real_commit && self) {
5738
5747
        return err;
5739
5748
}
5740
5749
 
5741
 
int PBXTStorageEngine::doRollback(drizzled::Session* thd, bool real_commit)
 
5750
int PBXTStorageEngine::doRollback(drizzled::Session* thd, bool)
5742
5751
{
5743
5752
        int err = 0;
5744
5753
        XTThreadPtr self = (XTThreadPtr) *thd->getEngineData(pbxt_hton);
5745
5754
 
 
5755
        bool real_commit = !session_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
 
5756
 
5746
5757
        XT_PRINT1(self, "PBXTStorageEngine::doRollback(real_commit = %s)\n", real_commit ? "true" : "false");
5747
5758
 
5748
5759
        if (real_commit && self) {
6016
6027
}
6017
6028
#endif // DRI_IS
6018
6029
 
6019
 
#ifndef DRIZZLED
6020
6030
struct st_mysql_sys_var
6021
6031
{
6022
6032
        MYSQL_PLUGIN_VAR_HEADER;
6031
6041
#define USE_CONST_SAVE
6032
6042
#endif
6033
6043
#endif
6034
 
#endif
6035
6044
 
6036
6045
#ifdef DRIZZLED
6037
6046
#define st_mysql_sys_var drizzled::drizzle_sys_var
6038
6047
#endif
6039
6048
 
6040
 
#ifndef DRIZZLED
6041
6049
#ifdef USE_CONST_SAVE
6042
6050
static void pbxt_record_cache_size_func(THD *XT_UNUSED(thd), struct st_mysql_sys_var *var, void *tgt, const void *save)
6043
6051
#else
6063
6071
#endif
6064
6072
}
6065
6073
 
 
6074
#ifndef DRIZZLED
6066
6075
struct st_mysql_storage_engine pbxt_storage_engine = {
6067
6076
        MYSQL_HANDLERTON_INTERFACE_VERSION
6068
6077
};
6069
6078
static st_mysql_information_schema pbxt_statitics = {
6070
6079
        MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
6071
6080
};
 
6081
#endif
6072
6082
 
6073
6083
#if MYSQL_VERSION_ID >= 50118
6074
6084
static MYSQL_SYSVAR_STR(index_cache_size, pbxt_index_cache_size,
6201
6211
  NULL
6202
6212
};
6203
6213
#endif
6204
 
#endif
6205
6214
 
6206
6215
#ifdef DRIZZLED
6207
6216
DRIZZLE_DECLARE_PLUGIN
6213
6222
        "High performance, multi-versioning transactional engine",
6214
6223
        PLUGIN_LICENSE_GPL,
6215
6224
        pbxt_init, /* Plugin Init */
6216
 
        NULL,          /* depends */
 
6225
        pbxt_system_variables,          /* system variables                */
6217
6226
        NULL                                            /* config options                  */
6218
6227
}
6219
6228
DRIZZLE_DECLARE_PLUGIN_END;
6231
6240
        0x0001 /* 0.1 */,
6232
6241
        NULL,                       /* status variables                */
6233
6242
#if MYSQL_VERSION_ID >= 50118
6234
 
        pbxt_system_variables,          /* depends */
 
6243
        pbxt_system_variables,          /* system variables                */
6235
6244
#else
6236
6245
        NULL,
6237
6246
#endif
6247
6256
        pbxt_exit_statistics,                                           /* plugin deinit */
6248
6257
        0x0005,
6249
6258
        NULL,                                                                           /* status variables */
6250
 
        NULL,                                                                           /* depends */
 
6259
        NULL,                                                                           /* system variables */
6251
6260
        NULL                                                                            /* config options */
6252
6261
}
6253
6262
mysql_declare_plugin_end;