~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/handler/ha_innodb.cc

  • Committer: Monty Taylor
  • Date: 2009-03-26 09:26:02 UTC
  • mto: (968.2.25 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: mordred@inaugust.com-20090326092602-ddb059yxpxt5dgmc
Moved savepoint stuff to protected virtual methods, moved the offset to private, and moved the logic about adding the offset to the passed-in pointer and adding the offset to the global offset inside of the class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
class InnobaseEngine : public StorageEngine
220
220
{
221
221
public:
222
 
  InnobaseEngine(string name_arg) : StorageEngine(name_arg) {}
 
222
  InnobaseEngine(string name_arg)
 
223
   : StorageEngine(name_arg, HTON_NO_FLAGS, sizeof(trx_named_savept_t)) {}
223
224
 
224
225
  virtual
225
226
  int
229
230
        Session*        session);       /* in: handle to the MySQL thread of the user
230
231
                        whose resources should be free'd */
231
232
 
232
 
  virtual int savepoint_set(Session* session,
233
 
                        void *savepoint);
234
 
  virtual int savepoint_rollback(Session* session, 
235
 
                                    void *savepoint);
236
 
  virtual int savepoint_release(Session* session, 
237
 
                                void *savepoint);
 
233
  virtual int savepoint_set_hook(Session* session,
 
234
                                 void *savepoint);
 
235
  virtual int savepoint_rollback_hook(Session* session, 
 
236
                                      void *savepoint);
 
237
  virtual int savepoint_release_hook(Session* session, 
 
238
                                     void *savepoint);
238
239
  virtual int commit(Session* session, bool all);
239
240
  virtual int rollback(Session* session, bool all);
240
241
 
1851
1852
 
1852
1853
        innodb_engine_ptr = innobase_engine;
1853
1854
 
1854
 
        innobase_engine->savepoint_offset=sizeof(trx_named_savept_t);
1855
 
 
1856
1855
        ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)DRIZZLE_TYPE_VARCHAR);
1857
1856
 
1858
1857
#ifdef UNIV_DEBUG
2411
2410
/*********************************************************************
2412
2411
Rolls back a transaction to a savepoint. */
2413
2412
int
2414
 
InnobaseEngine::savepoint_rollback(
 
2413
InnobaseEngine::savepoint_rollback_hook(
2415
2414
/*===========================*/
2416
2415
                                /* out: 0 if success, HA_ERR_NO_SAVEPOINT if
2417
2416
                                no savepoint with the given name */
2446
2445
/*********************************************************************
2447
2446
Release transaction savepoint name. */
2448
2447
int
2449
 
InnobaseEngine::savepoint_release(
 
2448
InnobaseEngine::savepoint_release_hook(
2450
2449
/*=======================*/
2451
2450
                                /* out: 0 if success, HA_ERR_NO_SAVEPOINT if
2452
2451
                                no savepoint with the given name */
2474
2473
/*********************************************************************
2475
2474
Sets a transaction savepoint. */
2476
2475
int
2477
 
InnobaseEngine::savepoint_set(
 
2476
InnobaseEngine::savepoint_set_hook(
2478
2477
/*===============*/
2479
2478
                                /* out: always 0, that is, always succeeds */
2480
2479
        Session*        session,                /* in: handle to the MySQL thread */