~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/errors.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:
5
5
--disable_warnings
6
6
drop table if exists t1;
7
7
--enable_warnings
8
 
--error ER_TABLE_UNKNOWN
 
8
--error 1146
9
9
insert into t1 values(1);
10
 
--error ER_TABLE_UNKNOWN
 
10
--error 1146
11
11
delete from t1;
12
 
--error ER_TABLE_UNKNOWN
 
12
--error 1146
13
13
update t1 set a=1;
14
14
create table t1 (a int);
15
 
--error ER_BAD_FIELD_ERROR
 
15
--error 1054
16
16
select count(test.t1.b) from t1;
17
 
--error ER_BAD_FIELD_ERROR
 
17
--error 1054
18
18
select count(not_existing_database.t1) from t1;
19
 
--error ER_BAD_FIELD_ERROR
 
19
--error 1054
20
20
select count(not_existing_database.t1.a) from t1;
21
 
--error ER_DBACCESS_DENIED_ERROR, ER_TABLE_UNKNOWN
 
21
--error 1044,1146
22
22
select count(not_existing_database.t1.a) from not_existing_database.t1;
23
 
--error ER_BAD_FIELD_ERROR
 
23
--error 1054
24
24
select 1 from t1 order by 2;
25
 
--error ER_BAD_FIELD_ERROR
 
25
--error 1054
26
26
select 1 from t1 group by 2;
27
 
--error ER_BAD_FIELD_ERROR
 
27
--error 1054
28
28
select 1 from t1 order by t1.b;
29
 
--error ER_BAD_FIELD_ERROR
 
29
--error 1054
30
30
select count(*),b from t1;
31
31
drop table t1;
32
32
 
35
35
#
36
36
# Bug #6080: Error message for a field with a display width that is too long
37
37
#
38
 
--error ER_TOO_BIG_FIELDLENGTH
 
38
--error 1064
 
39
create table t1 (a int(256));
 
40
--error 1074
39
41
create table t1 (a varchar(66000));
40
42
 
41
43
#
42
44
# Bug #27513: mysql 5.0.x + NULL pointer DoS
43
45
#
44
46
CREATE TABLE t1 (a INT);
45
 
--error ER_DIVISION_BY_ZERO
46
47
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
47
48
INSERT INTO t1 VALUES(1);
48
 
--error ER_DIVISION_BY_ZERO
49
49
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
50
50
INSERT INTO t1 VALUES(2),(3);
51
 
--error ER_DIVISION_BY_ZERO
52
51
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
53
52
DROP TABLE t1;
54
53