~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-12-10 03:50:07 UTC
  • mto: (1992.4.2 system-tables)
  • mto: This revision was merged to the branch mainline in revision 2001.
  • Revision ID: brian@tangent.org-20101210035007-w8ld6aze3ub0cu2s
Additional cerr output bits for a few classes (Item, Field,...)

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>
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
 
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
 */
4665
4666
                                                 * when a record is deleted we add an xlog record which we cannot "rollback" later
4666
4667
                                                 * when we find that an FK-constraint has failed. 
4667
4668
                                                 */
4668
 
                                                thd->getLex()->ignore = false;
 
4669
                                                thd->lex->ignore = false;
4669
4670
                                        case SQLCOM_UPDATE:
4670
4671
#ifndef DRIZZLED
4671
4672
                                        case SQLCOM_UPDATE_MULTI:
5723
5724
        return xt_ha_pbxt_thread_error_for_mysql(thd, xt_ha_thd_to_self(thd), false);
5724
5725
}
5725
5726
 
5726
 
int PBXTStorageEngine::doCommit(drizzled::Session* thd, bool real_commit)
 
5727
int PBXTStorageEngine::doCommit(drizzled::Session* thd, bool)
5727
5728
{
5728
5729
        int err = 0;
5729
5730
        XTThreadPtr self = (XTThreadPtr) *thd->getEngineData(pbxt_hton);
5730
5731
 
 
5732
        bool real_commit = !session_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
 
5733
        
5731
5734
        XT_PRINT1(self, "PBXTStorageEngine::doCommit(real_commit = %s)\n", real_commit ? "true" : "false");
5732
5735
 
5733
5736
        if (real_commit && self) {
5738
5741
        return err;
5739
5742
}
5740
5743
 
5741
 
int PBXTStorageEngine::doRollback(drizzled::Session* thd, bool real_commit)
 
5744
int PBXTStorageEngine::doRollback(drizzled::Session* thd, bool)
5742
5745
{
5743
5746
        int err = 0;
5744
5747
        XTThreadPtr self = (XTThreadPtr) *thd->getEngineData(pbxt_hton);
5745
5748
 
 
5749
        bool real_commit = !session_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN);
 
5750
 
5746
5751
        XT_PRINT1(self, "PBXTStorageEngine::doRollback(real_commit = %s)\n", real_commit ? "true" : "false");
5747
5752
 
5748
5753
        if (real_commit && self) {
6213
6218
        "High performance, multi-versioning transactional engine",
6214
6219
        PLUGIN_LICENSE_GPL,
6215
6220
        pbxt_init, /* Plugin Init */
6216
 
        NULL,          /* depends */
 
6221
        NULL,          /* system variables                */
6217
6222
        NULL                                            /* config options                  */
6218
6223
}
6219
6224
DRIZZLE_DECLARE_PLUGIN_END;
6231
6236
        0x0001 /* 0.1 */,
6232
6237
        NULL,                       /* status variables                */
6233
6238
#if MYSQL_VERSION_ID >= 50118
6234
 
        pbxt_system_variables,          /* depends */
 
6239
        pbxt_system_variables,          /* system variables                */
6235
6240
#else
6236
6241
        NULL,
6237
6242
#endif
6247
6252
        pbxt_exit_statistics,                                           /* plugin deinit */
6248
6253
        0x0005,
6249
6254
        NULL,                                                                           /* status variables */
6250
 
        NULL,                                                                           /* depends */
 
6255
        NULL,                                                                           /* system variables */
6251
6256
        NULL                                                                            /* config options */
6252
6257
}
6253
6258
mysql_declare_plugin_end;