~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lex_input_stream.h

This patch completes the first step in the splitting of
the XA resource manager API from the storage engine API,
as outlined in the specification here:

http://drizzle.org/wiki/XaStorageEngine

* Splits plugin::StorageEngine into a base StorageEngine
  class and two derived classes, TransactionalStorageEngine
  and XaStorageEngine.  XaStorageEngine derives from
  TransactionalStorageEngine and creates the XA Resource
  Manager API for storage engines.

  - The methods moved from StorageEngine to TransactionalStorageEngine
    include releaseTemporaryLatches(), startConsistentSnapshot(), 
    commit(), rollback(), setSavepoint(), releaseSavepoint(),
    rollbackToSavepoint() and hasTwoPhaseCommit()
  - The methods moved from StorageEngine to XaStorageEngine
    include recover(), commitXid(), rollbackXid(), and prepare()

* Places all static "EngineVector"s into their proper
  namespaces (typedefs belong in header files, not implementation files)
  and places all static methods corresponding
  to either only transactional engines or only XA engines
  into their respective files in /drizzled/plugin/

* Modifies the InnoDB "handler" files to extend plugin::XaStorageEngine
  and not plugin::StorageEngine

The next step, as outlined in the wiki spec page above, is to isolate
the XA Resource Manager API into its own plugin class and modify
plugin::XaStorageEngine to implement plugin::XaResourceManager via
composition.  This is necessary to enable building plugins which can
participate in an XA transaction *without having to have that plugin
implement the entire storage engine API*

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
358
358
  /** Current state of the lexical analyser. */
359
359
  enum my_lex_states next_state;
360
360
 
 
361
  /**
 
362
    Position of ';' in the stream, to delimit multiple queries.
 
363
    This delimiter is in the raw buffer.
 
364
  */
 
365
  const char *found_semicolon;
 
366
 
361
367
  /** Token character bitmaps, to detect 7bit strings. */
362
368
  unsigned char tok_bitmap;
363
369
 
371
377
    Starting position of the TEXT_STRING or IDENT in the pre-processed
372
378
    buffer.
373
379
 
374
 
    NOTE: this member must be used within base_sql_lex() function only.
 
380
    NOTE: this member must be used within DRIZZLElex() function only.
375
381
  */
376
382
  const char *m_cpp_text_start;
377
383
 
379
385
    Ending position of the TEXT_STRING or IDENT in the pre-processed
380
386
    buffer.
381
387
 
382
 
    NOTE: this member must be used within base_sql_lex() function only.
 
388
    NOTE: this member must be used within DRIZZLElex() function only.
383
389
    */
384
390
  const char *m_cpp_text_end;
385
391