~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/innodb_mysql.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:
11
11
# InnoDB does support FOREIGN KEYFOREIGN KEYs
12
12
let $test_foreign_keys= 1;
13
13
set global innodb_support_xa=default;
 
14
set session innodb_support_xa=default;
14
15
--source include/mix1.inc
15
 
 
16
 
--echo #
17
 
--echo # Test for bug #39932 "create table fails if column for FK is in different
18
 
--echo #                      case than in corr index".
19
 
--echo #
20
 
--disable_warnings
21
 
drop tables if exists t1, t2;
22
 
--enable_warnings
23
 
create table t1 (pk int primary key) engine=InnoDB;
24
 
--echo # Even although the below statement uses uppercased field names in
25
 
--echo # foreign key definition it still should be able to find explicitly
26
 
--echo # created supporting index. So it should succeed and should not
27
 
--echo # create any additional supporting indexes.
28
 
create table t2 (fk int, key x (fk),
29
 
                 constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
30
 
show create table t2;
31
 
drop table t2, t1;
32
 
--echo #
33
 
--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA 
34
 
--echo #  is returned
35
 
--echo #
36
 
 
37
 
CREATE TABLE t1(a INT) ENGINE=innodb;
38
 
INSERT INTO t1 VALUES (0);
39
 
--error ER_TRUNCATED_WRONG_VALUE
40
 
CREATE TABLE t2 
41
 
  SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
42
 
DROP TABLE IF EXISTS t1,t2;