~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: lbieber
  • Date: 2010-09-23 01:31:43 UTC
  • mfrom: (1787.1.2 build)
  • Revision ID: lbieber@orisndriz08-20100923013143-z1fh9b7wdve6ha8s
Merge Paul - fix pbxt startup and shutdown
Merge Shrews - fix bug 644475 - Fix rabbitmq.variables test

Show diffs side-by-side

added added

removed removed

Lines of Context:
1249
1249
        XT_RETURN(1);
1250
1250
}
1251
1251
 
1252
 
static int pbxt_end(void *)
 
1252
void PBXTStorageEngine::shutdownPlugin()
1253
1253
{
1254
 
        XTThreadPtr             self;
1255
 
        int                             err = 0;
 
1254
        XTThreadPtr self;
1256
1255
 
1257
1256
        XT_TRACE_CALL();
1258
1257
 
1267
1266
                        ha_exit(self);
1268
1267
                }
1269
1268
        }
1270
 
 
1271
 
        XT_RETURN(err);
1272
1269
}
1273
1270
 
1274
1271
PBXTStorageEngine::~PBXTStorageEngine()
1275
1272
{
1276
 
  pbxt_end(NULL);
 
1273
        /* We do nothing here, because it is now all done in shutdownPlugin(). */
1277
1274
}
1278
1275
 
1279
1276
/*
5666
5663
        if (!self->st_database)
5667
5664
                xt_ha_open_database_of_table(self, NULL);
5668
5665
 
5669
 
        if (!xt_xn_begin(self)) {
 
5666
        /* startTransaction() calls registerResourceForTransaction() calls engine->startTransaction(), and then
 
5667
         * startTransaction() calls doStartTransaction()
 
5668
         * Which leads to this function being called twice!?
 
5669
         * So added the self->st_xact_data test below.
 
5670
         */
 
5671
        if (!self->st_xact_data) {
 
5672
                if (!xt_xn_begin(self)) {
5670
5673
                        err = xt_ha_pbxt_thread_error_for_mysql(thd, self, /*pb_ignore_dup_key*/false);
5671
5674
                        //pb_ex_in_use = 0;
 
5675
                }
5672
5676
        }
5673
5677
 
5674
5678
        return err;