~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/delete.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:
109
109
select * from t11;
110
110
--sorted_result
111
111
select * from t12;
112
 
--error ER_SUBQUERY_NO_1_ROW
 
112
-- error 1242
113
113
delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
114
114
select * from t11;
115
 
 
116
 
# PBXT doesn't currently support DELETE IGNORE and turns it into plain DELETE
117
 
if (`select if (@@storage_engine = 'PBXT', 0, 1)`) { 
118
 
  delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
119
 
}
 
115
delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
120
116
select * from t11;
121
117
drop table t11, t12, t2;
122
118
 
247
243
CREATE TABLE db2.t2 AS SELECT * FROM db2.t1;
248
244
CREATE TABLE t1 AS SELECT * FROM db2.t2;
249
245
CREATE TABLE t2 AS SELECT * FROM t1;
250
 
 
251
 
DROP DATABASE db1;
252
 
DROP DATABASE db2;
253
 
DROP TABLE t1, t2;