~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/identifiers/t/schema.test

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
 
#
2
 
# We check that no one can create bad schemas
3
 
#
4
 
 
5
 
CREATE SCHEMA admin;
6
 
CREATE SCHEMA temporary;
7
 
 
8
 
SELECT SCHEMA();
9
 
 
10
 
--error ER_PARSE_ERROR,ER_SYNTAX_ERROR
11
 
CREATE SCHEMA .admin;
12
 
 
13
 
--error ER_WRONG_DB_NAME
14
 
CREATE SCHEMA `.admin `;
15
 
 
16
 
--error ER_WRONG_DB_NAME
17
 
CREATE SCHEMA `.admin`;
18
 
 
19
 
--error ER_PARSE_ERROR
20
 
CREATE SCHEMA #admin;
21
 
 
22
 
CREATE SCHEMA `#admin`;
23
 
DROP SCHEMA `#admin`;
24
 
 
25
 
SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA();
26
 
 
27
 
--error ER_WRONG_DB_NAME
28
 
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
29
 
 
30
 
DROP SCHEMA admin;
31
 
DROP SCHEMA temporary;