Merge lp:~stewart/drizzle/seapitester-state-history into lp:drizzle/7.0

Proposed by Stewart Smith
Status: Merged
Approved by: Brian Aker
Approved revision: 2080
Merged at revision: 2085
Proposed branch: lp:~stewart/drizzle/seapitester-state-history
Merge into: lp:drizzle/7.0
Diff against target: 991 lines (+640/-49)
20 files modified
plugin/storage_engine_api_tester/engine_state_history.cc (+135/-0)
plugin/storage_engine_api_tester/engine_state_history.h (+26/-0)
plugin/storage_engine_api_tester/plugin.ini (+3/-2)
plugin/storage_engine_api_tester/storage_engine_api_tester.cc (+6/-0)
plugin/storage_engine_api_tester/tests/r/create_table.result (+12/-0)
plugin/storage_engine_api_tester/tests/r/multi_stmt_txn.result (+100/-29)
plugin/storage_engine_api_tester/tests/r/rnd_pos.result (+68/-0)
plugin/storage_engine_api_tester/tests/r/rollback_statement.result (+16/-0)
plugin/storage_engine_api_tester/tests/r/select.result (+28/-0)
plugin/storage_engine_api_tester/tests/r/transaction.result (+75/-0)
plugin/storage_engine_api_tester/tests/r/txn_log_insert.result (+51/-0)
plugin/storage_engine_api_tester/tests/r/txn_log_rollback_large_stmt.result (+44/-0)
plugin/storage_engine_api_tester/tests/t/create_table.test (+3/-0)
plugin/storage_engine_api_tester/tests/t/multi_stmt_txn.test (+24/-18)
plugin/storage_engine_api_tester/tests/t/rnd_pos.test (+12/-0)
plugin/storage_engine_api_tester/tests/t/rollback_statement.test (+3/-0)
plugin/storage_engine_api_tester/tests/t/select.test (+6/-0)
plugin/storage_engine_api_tester/tests/t/transaction.test (+15/-0)
plugin/storage_engine_api_tester/tests/t/txn_log_insert.test (+8/-0)
plugin/storage_engine_api_tester/tests/t/txn_log_rollback_large_stmt.test (+5/-0)
To merge this branch: bzr merge lp:~stewart/drizzle/seapitester-state-history
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+46092@code.launchpad.net

Description of the change

track what is being called in the Storage Engine in storage_engine_api_tester.

this means that if we start frakking around with things like TransactionServices we can check that we're not suddenly changing how the engines are being called without intending to.

http://hudson.drizzle.org/view/Drizzle-param/job/drizzle-param/705/

To post a comment you must log in.
2080. By Stewart Smith

cpplint fix for header guard

Revision history for this message
Stewart Smith (stewart) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'plugin/storage_engine_api_tester/engine_state_history.cc'
--- plugin/storage_engine_api_tester/engine_state_history.cc 1970-01-01 00:00:00 +0000
+++ plugin/storage_engine_api_tester/engine_state_history.cc 2011-01-13 06:17:20 +0000
@@ -0,0 +1,135 @@
1/*
2 Copyright (C) 2011 Stewart Smith
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#include "config.h"
20#include "drizzled/plugin/table_function.h"
21#include <drizzled/plugin/function.h>
22#include <drizzled/item/func.h>
23#include <drizzled/algorithm/crc32.h>
24
25#include "engine_state_history.h"
26
27#include <string>
28#include <vector>
29
30using namespace std;
31using namespace drizzled;
32
33std::vector<std::string> engine_state_history;
34
35class EngineStateHistory : public drizzled::plugin::TableFunction
36{
37public:
38
39 EngineStateHistory();
40
41 EngineStateHistory(const char *table_arg) :
42 drizzled::plugin::TableFunction("data_dictionary", table_arg)
43 { }
44
45 ~EngineStateHistory() {}
46
47 class Generator : public drizzled::plugin::TableFunction::Generator
48 {
49 private:
50 std::vector<std::string>::iterator it;
51 public:
52 Generator(drizzled::Field **arg);
53 ~Generator();
54
55 bool populate();
56 };
57
58 EngineStateHistory::Generator *generator(drizzled::Field **arg)
59 {
60 return new Generator(arg);
61 }
62};
63
64EngineStateHistory::EngineStateHistory() :
65 plugin::TableFunction("DATA_DICTIONARY", "SEAPITESTER_ENGINE_STATE_HISTORY")
66{
67 add_field("STATE");
68}
69
70EngineStateHistory::Generator::Generator(Field **arg) :
71 plugin::TableFunction::Generator(arg)
72{
73 it= engine_state_history.begin();
74}
75
76EngineStateHistory::Generator::~Generator()
77{
78}
79
80bool EngineStateHistory::Generator::populate()
81{
82 if (engine_state_history.empty())
83 return false;
84
85 if (it == engine_state_history.end())
86 return false; // No more rows
87
88 push(*it);
89 it++;
90
91
92 return true;
93}
94
95class ClearEngineStateHistoryFunction :public Item_int_func
96{
97public:
98 int64_t val_int();
99
100 ClearEngineStateHistoryFunction() :Item_int_func()
101 {
102 unsigned_flag= true;
103 }
104
105 const char *func_name() const
106 {
107 return "seapitester_clear_engine_state_history";
108 }
109
110 void fix_length_and_dec()
111 {
112 max_length= 10;
113 }
114
115 bool check_argument_count(int n)
116 {
117 return (n == 0);
118 }
119};
120
121int64_t ClearEngineStateHistoryFunction::val_int()
122{
123 engine_state_history.clear();
124 null_value= false;
125 return 0;
126}
127
128
129int engine_state_history_table_initialize(drizzled::module::Context &context)
130{
131 context.add(new(std::nothrow)EngineStateHistory());
132 context.add(new plugin::Create_function<ClearEngineStateHistoryFunction>("SEAPITESTER_CLEAR_ENGINE_STATE_HISTORY"));
133
134 return 0;
135}
0136
=== added file 'plugin/storage_engine_api_tester/engine_state_history.h'
--- plugin/storage_engine_api_tester/engine_state_history.h 1970-01-01 00:00:00 +0000
+++ plugin/storage_engine_api_tester/engine_state_history.h 2011-01-13 06:17:20 +0000
@@ -0,0 +1,26 @@
1/*
2 Copyright (C) 2011 Stewart Smith
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef PLUGIN_STORAGE_ENGINE_API_TESTER_ENGINE_STATE_HISTORY_H
20#define PLUGIN_STORAGE_ENGINE_API_TESTER_ENGINE_STATE_HISTORY_H
21
22extern std::vector<std::string> engine_state_history;
23
24int engine_state_history_table_initialize(drizzled::module::Context &context);
25
26#endif /* PLUGIN_STORAGE_ENGINE_API_TESTER_ENGINE_STATE_HISTORY_H */
027
=== modified file 'plugin/storage_engine_api_tester/plugin.ini'
--- plugin/storage_engine_api_tester/plugin.ini 2010-10-25 14:11:22 +0000
+++ plugin/storage_engine_api_tester/plugin.ini 2011-01-13 06:17:20 +0000
@@ -1,6 +1,7 @@
1[plugin]1[plugin]
2title=Storage Engine API Tester2title=Storage Engine API Tester
3description=Test engine that enforces SE API calling conventions very strictly3description=Test engine that enforces SE API calling conventions very strictly
4sources=storage_engine_api_tester.cc engine_states.cc cursor_states.cc4sources=storage_engine_api_tester.cc engine_states.cc cursor_states.cc engine_state_history.cc
5headers=engine_state_history.h
5load_by_default=no6load_by_default=no
6static=no
7\ No newline at end of file7\ No newline at end of file
8static=no
89
=== modified file 'plugin/storage_engine_api_tester/storage_engine_api_tester.cc'
--- plugin/storage_engine_api_tester/storage_engine_api_tester.cc 2010-12-08 04:51:43 +0000
+++ plugin/storage_engine_api_tester/storage_engine_api_tester.cc 2011-01-13 06:17:20 +0000
@@ -31,10 +31,13 @@
3131
32#include <boost/unordered_map.hpp>32#include <boost/unordered_map.hpp>
3333
34#include "engine_state_history.h"
35
34using namespace std;36using namespace std;
35using namespace drizzled;37using namespace drizzled;
3638
37string engine_state;39string engine_state;
40
38typedef multimap<string, string> state_multimap;41typedef multimap<string, string> state_multimap;
39typedef multimap<string, string>::value_type state_pair;42typedef multimap<string, string>::value_type state_pair;
40typedef multimap<string, string>::iterator state_multimap_iter;43typedef multimap<string, string>::iterator state_multimap_iter;
@@ -131,6 +134,7 @@
131 }134 }
132135
133 engine_state= new_state;136 engine_state= new_state;
137 engine_state_history.push_back(new_state);
134138
135 cerr << "\tENGINE STATE : " << engine_state << endl;139 cerr << "\tENGINE STATE : " << engine_state << endl;
136}140}
@@ -529,6 +533,8 @@
529533
530 context.add(new plugin::Create_function<SEAPITesterErrorInjectFunc>("seapitester_error_inject"));534 context.add(new plugin::Create_function<SEAPITesterErrorInjectFunc>("seapitester_error_inject"));
531535
536 engine_state_history_table_initialize(context);
537
532 return 0;538 return 0;
533}539}
534540
535541
=== modified file 'plugin/storage_engine_api_tester/tests/r/create_table.result'
--- plugin/storage_engine_api_tester/tests/r/create_table.result 2010-10-25 12:46:17 +0000
+++ plugin/storage_engine_api_tester/tests/r/create_table.result 2011-01-13 06:17:20 +0000
@@ -1,2 +1,14 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1CREATE TABLE t1 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;4CREATE TABLE t1 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;
5select * from data_dictionary.seapitester_engine_state_history;
6STATE
7::max_supported_key_length()
8::max_supported_keys()
9::doCreateTable()
10::SEAPITester()
11select seapitester_clear_engine_state_history();
12seapitester_clear_engine_state_history()
130
2drop table t1;14drop table t1;
315
=== modified file 'plugin/storage_engine_api_tester/tests/r/multi_stmt_txn.result'
--- plugin/storage_engine_api_tester/tests/r/multi_stmt_txn.result 2010-11-26 05:19:00 +0000
+++ plugin/storage_engine_api_tester/tests/r/multi_stmt_txn.result 2011-01-13 06:17:20 +0000
@@ -1,29 +1,100 @@
1create table t1 (a int) engine=storage_engine_api_tester;1select seapitester_clear_engine_state_history();
2begin;2seapitester_clear_engine_state_history()
3select * from t1;30
4a4create table t1 (a int) engine=storage_engine_api_tester;
5select * from t1;5begin;
6a6select * from t1;
7commit;7a
8drop table t1;8select * from t1;
9create table t1 (a int) engine=storage_engine_api_tester;9a
10begin;10commit;
11select * from t1;11select * from data_dictionary.seapitester_engine_state_history;
12a12STATE
13insert into t1 values (1);13::max_supported_key_length()
14insert into t1 values (1);14::max_supported_keys()
15insert into t1 values (1);15::doCreateTable()
16select * from t1;16::SEAPITester()
17a17BEGIN
18118In Transaction
19119END STATEMENT
20120COMMIT STATEMENT
21insert into t1 values (1);21In Transaction
22select * from t1;22START STATEMENT
23a23END STATEMENT
24124COMMIT STATEMENT
25125In Transaction
26126START STATEMENT
27127END STATEMENT
28commit;28COMMIT STATEMENT
29drop table t1;29In Transaction
30COMMIT
31::SEAPITester()
32select seapitester_clear_engine_state_history();
33seapitester_clear_engine_state_history()
340
35drop table t1;
36create table t1 (a int) engine=storage_engine_api_tester;
37begin;
38select * from t1;
39a
40insert into t1 values (1);
41insert into t1 values (1);
42insert into t1 values (1);
43select * from t1;
44a
451
461
471
48insert into t1 values (1);
49select * from t1;
50a
511
521
531
541
55commit;
56drop table t1;
57select * from data_dictionary.seapitester_engine_state_history;
58STATE
59::max_supported_key_length()
60::max_supported_keys()
61::doCreateTable()
62::SEAPITester()
63BEGIN
64In Transaction
65END STATEMENT
66COMMIT STATEMENT
67In Transaction
68START STATEMENT
69END STATEMENT
70COMMIT STATEMENT
71In Transaction
72START STATEMENT
73END STATEMENT
74COMMIT STATEMENT
75In Transaction
76START STATEMENT
77END STATEMENT
78COMMIT STATEMENT
79In Transaction
80START STATEMENT
81END STATEMENT
82COMMIT STATEMENT
83In Transaction
84START STATEMENT
85END STATEMENT
86COMMIT STATEMENT
87In Transaction
88START STATEMENT
89END STATEMENT
90COMMIT STATEMENT
91In Transaction
92START STATEMENT
93END STATEMENT
94COMMIT STATEMENT
95In Transaction
96COMMIT
97::SEAPITester()
98select seapitester_clear_engine_state_history();
99seapitester_clear_engine_state_history()
1000
30101
=== modified file 'plugin/storage_engine_api_tester/tests/r/rnd_pos.result'
--- plugin/storage_engine_api_tester/tests/r/rnd_pos.result 2010-11-29 02:36:55 +0000
+++ plugin/storage_engine_api_tester/tests/r/rnd_pos.result 2011-01-13 06:17:20 +0000
@@ -1,4 +1,7 @@
1set storage_engine=storage_engine_api_tester;1set storage_engine=storage_engine_api_tester;
2select seapitester_clear_engine_state_history();
3seapitester_clear_engine_state_history()
40
2CREATE TABLE t1 (5CREATE TABLE t1 (
3aufnr varchar(12) NOT NULL default '',6aufnr varchar(12) NOT NULL default '',
4plnfl varchar(6) NOT NULL default '',7plnfl varchar(6) NOT NULL default '',
@@ -11,6 +14,27 @@
11"40004712" AND t1.plnfl = "000001" AND t1.vornr > "0010" ORDER BY t1.vornr14"40004712" AND t1.plnfl = "000001" AND t1.vornr > "0010" ORDER BY t1.vornr
12ASC LIMIT 1;15ASC LIMIT 1;
13drop table t1;16drop table t1;
17select * from data_dictionary.seapitester_engine_state_history;
18STATE
19::max_supported_key_length()
20::max_supported_keys()
21::doCreateTable()
22::SEAPITester()
23START STATEMENT
24END STATEMENT
25COMMIT
26::SEAPITester()
27START STATEMENT
28END STATEMENT
29COMMIT
30::SEAPITester()
31START STATEMENT
32END STATEMENT
33COMMIT
34::SEAPITester()
35select seapitester_clear_engine_state_history();
36seapitester_clear_engine_state_history()
370
14CREATE TABLE t1 (38CREATE TABLE t1 (
15aufnr varchar(12) NOT NULL default '',39aufnr varchar(12) NOT NULL default '',
16plnfl varchar(6) NOT NULL default '',40plnfl varchar(6) NOT NULL default '',
@@ -23,6 +47,50 @@
23"40004712" AND t1.plnfl = "000001" AND t1.vornr > "0010" ORDER BY t1.vornr47"40004712" AND t1.plnfl = "000001" AND t1.vornr > "0010" ORDER BY t1.vornr
24ASC LIMIT 1;48ASC LIMIT 1;
25drop table t1;49drop table t1;
50select * from data_dictionary.seapitester_engine_state_history;
51STATE
52::max_supported_key_length()
53::max_supported_key_parts()
54::max_supported_keys()
55::max_supported_key_part_length()
56::doCreateTable()
57::SEAPITester()
58START STATEMENT
59END STATEMENT
60COMMIT
61::SEAPITester()
62START STATEMENT
63END STATEMENT
64COMMIT
65::SEAPITester()
66START STATEMENT
67END STATEMENT
68COMMIT
69::SEAPITester()
70select seapitester_clear_engine_state_history();
71seapitester_clear_engine_state_history()
720
26create table t1 (a int, b int, c int);73create table t1 (a int, b int, c int);
27alter table t1 add unique(a,b);74alter table t1 add unique(a,b);
28drop table t1;75drop table t1;
76select * from data_dictionary.seapitester_engine_state_history;
77STATE
78::max_supported_key_length()
79::max_supported_keys()
80::doCreateTable()
81::SEAPITester()
82START STATEMENT
83::max_supported_key_length()
84::max_supported_key_parts()
85::max_supported_keys()
86::max_supported_key_part_length()
87::max_supported_key_part_length()
88::doCreateTable()
89::SEAPITester()
90START STATEMENT
91END STATEMENT
92COMMIT
93::SEAPITester()
94select seapitester_clear_engine_state_history();
95seapitester_clear_engine_state_history()
960
2997
=== modified file 'plugin/storage_engine_api_tester/tests/r/rollback_statement.result'
--- plugin/storage_engine_api_tester/tests/r/rollback_statement.result 2010-10-25 12:45:29 +0000
+++ plugin/storage_engine_api_tester/tests/r/rollback_statement.result 2011-01-13 06:17:20 +0000
@@ -1,4 +1,20 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1create table t1 (a int not null) engine=storage_engine_api_tester;4create table t1 (a int not null) engine=storage_engine_api_tester;
2insert into t1 values (1), (NULL), (2);5insert into t1 values (1), (NULL), (2);
3ERROR 23000: Column 'a' cannot be null6ERROR 23000: Column 'a' cannot be null
4drop table t1;7drop table t1;
8select * from data_dictionary.seapitester_engine_state_history;
9STATE
10::max_supported_key_length()
11::max_supported_keys()
12::doCreateTable()
13::SEAPITester()
14START STATEMENT
15END STATEMENT
16ROLLBACK
17::SEAPITester()
18select seapitester_clear_engine_state_history();
19seapitester_clear_engine_state_history()
200
521
=== modified file 'plugin/storage_engine_api_tester/tests/r/select.result'
--- plugin/storage_engine_api_tester/tests/r/select.result 2010-12-12 00:13:57 +0000
+++ plugin/storage_engine_api_tester/tests/r/select.result 2011-01-13 06:17:20 +0000
@@ -1,6 +1,34 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1CREATE TABLE t2 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;4CREATE TABLE t2 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;
2start transaction with consistent snapshot;5start transaction with consistent snapshot;
6select * from data_dictionary.seapitester_engine_state_history;
7STATE
8::max_supported_key_length()
9::max_supported_keys()
10::doCreateTable()
11::SEAPITester()
12BEGIN
13In Transaction
14END STATEMENT
15COMMIT STATEMENT
16In Transaction
17select seapitester_clear_engine_state_history();
18seapitester_clear_engine_state_history()
190
3select * from t2;20select * from t2;
4a21a
5commit;22commit;
6drop table t2;23drop table t2;
24select * from data_dictionary.seapitester_engine_state_history;
25STATE
26START STATEMENT
27END STATEMENT
28COMMIT STATEMENT
29In Transaction
30COMMIT
31::SEAPITester()
32select seapitester_clear_engine_state_history();
33seapitester_clear_engine_state_history()
340
735
=== modified file 'plugin/storage_engine_api_tester/tests/r/transaction.result'
--- plugin/storage_engine_api_tester/tests/r/transaction.result 2010-11-29 07:03:38 +0000
+++ plugin/storage_engine_api_tester/tests/r/transaction.result 2011-01-13 06:17:20 +0000
@@ -1,3 +1,6 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1DROP TABLE IF EXISTS t1_trx, t1_non_trx;4DROP TABLE IF EXISTS t1_trx, t1_non_trx;
2SET AUTOCOMMIT= 0;5SET AUTOCOMMIT= 0;
3CREATE TABLE t1_trx (6CREATE TABLE t1_trx (
@@ -18,6 +21,32 @@
18ROLLBACK;21ROLLBACK;
19Warnings:22Warnings:
20Warning 1196 Some non-transactional changed tables couldn't be rolled back23Warning 1196 Some non-transactional changed tables couldn't be rolled back
24select * from data_dictionary.seapitester_engine_state_history;
25STATE
26::max_supported_key_length()
27::max_supported_key_parts()
28::max_supported_keys()
29::max_supported_key_part_length()
30::doCreateTable()
31::SEAPITester()
32BEGIN
33In Transaction
34END STATEMENT
35COMMIT STATEMENT
36In Transaction
37START STATEMENT
38END STATEMENT
39COMMIT STATEMENT
40In Transaction
41START STATEMENT
42END STATEMENT
43COMMIT STATEMENT
44In Transaction
45ROLLBACK
46::SEAPITester()
47select seapitester_clear_engine_state_history();
48seapitester_clear_engine_state_history()
490
21Expected warning about non-trx data changes not being rolled back50Expected warning about non-trx data changes not being rolled back
22SELECT * FROM t1_trx;51SELECT * FROM t1_trx;
23k v52k v
@@ -25,6 +54,15 @@
25k v54k v
26key1 value155key1 value1
27key2 value256key2 value2
57select * from data_dictionary.seapitester_engine_state_history;
58STATE
59START STATEMENT
60END STATEMENT
61COMMIT STATEMENT
62In Transaction
63select seapitester_clear_engine_state_history();
64seapitester_clear_engine_state_history()
650
28START TRANSACTION;66START TRANSACTION;
29INSERT INTO t1_trx VALUES ('key1','value1');67INSERT INTO t1_trx VALUES ('key1','value1');
30INSERT INTO t1_trx VALUES ('key2','value2');68INSERT INTO t1_trx VALUES ('key2','value2');
@@ -35,9 +73,46 @@
35key1 value173key1 value1
36key2 value274key2 value2
37ROLLBACK;75ROLLBACK;
76select * from data_dictionary.seapitester_engine_state_history;
77STATE
78COMMIT
79::SEAPITester()
80BEGIN
81In Transaction
82END STATEMENT
83COMMIT STATEMENT
84In Transaction
85START STATEMENT
86END STATEMENT
87COMMIT STATEMENT
88In Transaction
89START STATEMENT
90END STATEMENT
91COMMIT STATEMENT
92In Transaction
93START STATEMENT
94END STATEMENT
95COMMIT STATEMENT
96In Transaction
97ROLLBACK
98::SEAPITester()
99select seapitester_clear_engine_state_history();
100seapitester_clear_engine_state_history()
1010
38SELECT t1_trx.k, t1_trx.v102SELECT t1_trx.k, t1_trx.v
39FROM t1_trx103FROM t1_trx
40INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;104INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;
41k v105k v
42DROP TABLE t1_trx;106DROP TABLE t1_trx;
43DROP TABLE t1_non_trx;107DROP TABLE t1_non_trx;
108select * from data_dictionary.seapitester_engine_state_history;
109STATE
110START STATEMENT
111END STATEMENT
112COMMIT STATEMENT
113In Transaction
114COMMIT
115::SEAPITester()
116select seapitester_clear_engine_state_history();
117seapitester_clear_engine_state_history()
1180
44119
=== modified file 'plugin/storage_engine_api_tester/tests/r/txn_log_insert.result'
--- plugin/storage_engine_api_tester/tests/r/txn_log_insert.result 2010-12-30 18:07:58 +0000
+++ plugin/storage_engine_api_tester/tests/r/txn_log_insert.result 2011-01-13 06:17:20 +0000
@@ -1,3 +1,6 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1DROP TABLE IF EXISTS t1;4DROP TABLE IF EXISTS t1;
2CREATE TABLE t1 (5CREATE TABLE t1 (
3pk int auto_increment primary key,6pk int auto_increment primary key,
@@ -27,6 +30,52 @@
27select seapitester_error_inject(0);30select seapitester_error_inject(0);
28seapitester_error_inject(0)31seapitester_error_inject(0)
290320
33select * from data_dictionary.seapitester_engine_state_history;
34STATE
35::max_supported_key_length()
36::max_supported_key_parts()
37::max_supported_keys()
38::max_supported_key_part_length()
39::doCreateTable()
40::SEAPITester()
41START STATEMENT
42END STATEMENT
43ROLLBACK
44::SEAPITester()
45BEGIN
46In Transaction
47END STATEMENT
48COMMIT STATEMENT
49In Transaction
50START STATEMENT
51END STATEMENT
52COMMIT STATEMENT
53In Transaction
54START STATEMENT
55END STATEMENT
56ROLLBACK STATEMENT
57In Transaction
58START STATEMENT
59END STATEMENT
60COMMIT STATEMENT
61In Transaction
62COMMIT
63::SEAPITester()
64START STATEMENT
65END STATEMENT
66COMMIT
67::SEAPITester()
68START STATEMENT
69END STATEMENT
70ROLLBACK
71::SEAPITester()
72START STATEMENT
73END STATEMENT
74COMMIT
75::SEAPITester()
76select seapitester_clear_engine_state_history();
77seapitester_clear_engine_state_history()
780
30START TRANSACTION;79START TRANSACTION;
31CREATE TABLE `test`.`t1` ( `pk` INT NOT NULL AUTO_INCREMENT, `id` INT NOT NULL, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`pk`) ) ENGINE=STORAGE_ENGINE_API_TESTER COLLATE = utf8_general_ci;80CREATE TABLE `test`.`t1` ( `pk` INT NOT NULL AUTO_INCREMENT, `id` INT NOT NULL, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`pk`) ) ENGINE=STORAGE_ENGINE_API_TESTER COLLATE = utf8_general_ci;
32COMMIT;81COMMIT;
@@ -41,3 +90,5 @@
41DROP TABLE `test`.`t1`;90DROP TABLE `test`.`t1`;
42COMMIT;91COMMIT;
43SET GLOBAL transaction_log_truncate_debug= true;92SET GLOBAL transaction_log_truncate_debug= true;
93select * from data_dictionary.seapitester_engine_state_history;
94STATE
4495
=== modified file 'plugin/storage_engine_api_tester/tests/r/txn_log_rollback_large_stmt.result'
--- plugin/storage_engine_api_tester/tests/r/txn_log_rollback_large_stmt.result 2010-12-23 19:23:22 +0000
+++ plugin/storage_engine_api_tester/tests/r/txn_log_rollback_large_stmt.result 2011-01-13 06:17:20 +0000
@@ -1,3 +1,6 @@
1select seapitester_clear_engine_state_history();
2seapitester_clear_engine_state_history()
30
1DROP TABLE IF EXISTS t1;4DROP TABLE IF EXISTS t1;
2CREATE TABLE source (5CREATE TABLE source (
3pk int auto_increment primary key,6pk int auto_increment primary key,
@@ -22,6 +25,47 @@
22select seapitester_error_inject(0);25select seapitester_error_inject(0);
23seapitester_error_inject(0)26seapitester_error_inject(0)
240270
28select * from data_dictionary.seapitester_engine_state_history;
29STATE
30::max_supported_key_length()
31::max_supported_key_parts()
32::max_supported_keys()
33::max_supported_key_part_length()
34::doCreateTable()
35::SEAPITester()
36::max_supported_key_length()
37::max_supported_key_parts()
38::max_supported_keys()
39::max_supported_key_part_length()
40::doCreateTable()
41::SEAPITester()
42START STATEMENT
43END STATEMENT
44COMMIT
45::SEAPITester()
46START STATEMENT
47END STATEMENT
48COMMIT
49::SEAPITester()
50START STATEMENT
51END STATEMENT
52COMMIT
53::SEAPITester()
54START STATEMENT
55END STATEMENT
56COMMIT
57::SEAPITester()
58START STATEMENT
59END STATEMENT
60COMMIT
61::SEAPITester()
62START STATEMENT
63END STATEMENT
64ROLLBACK
65::SEAPITester()
66select seapitester_clear_engine_state_history();
67seapitester_clear_engine_state_history()
680
25START TRANSACTION;69START TRANSACTION;
26CREATE TABLE `test`.`source` ( `pk` INT NOT NULL AUTO_INCREMENT, `d` VARCHAR(16000) COLLATE utf8_general_ci DEFAULT NULL, PRIMARY KEY (`pk`) ) ENGINE=STORAGE_ENGINE_API_TESTER COLLATE = utf8_general_ci;70CREATE TABLE `test`.`source` ( `pk` INT NOT NULL AUTO_INCREMENT, `d` VARCHAR(16000) COLLATE utf8_general_ci DEFAULT NULL, PRIMARY KEY (`pk`) ) ENGINE=STORAGE_ENGINE_API_TESTER COLLATE = utf8_general_ci;
27COMMIT;71COMMIT;
2872
=== modified file 'plugin/storage_engine_api_tester/tests/t/create_table.test'
--- plugin/storage_engine_api_tester/tests/t/create_table.test 2010-10-25 12:46:17 +0000
+++ plugin/storage_engine_api_tester/tests/t/create_table.test 2011-01-13 06:17:20 +0000
@@ -1,2 +1,5 @@
1select seapitester_clear_engine_state_history();
1CREATE TABLE t1 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;2CREATE TABLE t1 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;
3select * from data_dictionary.seapitester_engine_state_history;
4select seapitester_clear_engine_state_history();
2drop table t1;5drop table t1;
36
=== modified file 'plugin/storage_engine_api_tester/tests/t/multi_stmt_txn.test'
--- plugin/storage_engine_api_tester/tests/t/multi_stmt_txn.test 2010-11-23 13:19:53 +0000
+++ plugin/storage_engine_api_tester/tests/t/multi_stmt_txn.test 2011-01-13 06:17:20 +0000
@@ -1,18 +1,24 @@
1create table t1 (a int) engine=storage_engine_api_tester;1select seapitester_clear_engine_state_history();
2begin;2create table t1 (a int) engine=storage_engine_api_tester;
3select * from t1;3begin;
4select * from t1;4select * from t1;
5commit;5select * from t1;
6drop table t1;6commit;
77select * from data_dictionary.seapitester_engine_state_history;
8create table t1 (a int) engine=storage_engine_api_tester;8select seapitester_clear_engine_state_history();
9begin;9drop table t1;
10select * from t1;10
11insert into t1 values (1);11create table t1 (a int) engine=storage_engine_api_tester;
12insert into t1 values (1);12begin;
13insert into t1 values (1);13select * from t1;
14select * from t1;14insert into t1 values (1);
15insert into t1 values (1);15insert into t1 values (1);
16select * from t1;16insert into t1 values (1);
17commit;17select * from t1;
18drop table t1;18insert into t1 values (1);
19select * from t1;
20commit;
21drop table t1;
22select * from data_dictionary.seapitester_engine_state_history;
23select seapitester_clear_engine_state_history();
24
1925
=== modified file 'plugin/storage_engine_api_tester/tests/t/rnd_pos.test'
--- plugin/storage_engine_api_tester/tests/t/rnd_pos.test 2010-11-29 02:36:55 +0000
+++ plugin/storage_engine_api_tester/tests/t/rnd_pos.test 2011-01-13 06:17:20 +0000
@@ -4,6 +4,8 @@
4#4#
5set storage_engine=storage_engine_api_tester;5set storage_engine=storage_engine_api_tester;
66
7select seapitester_clear_engine_state_history();
8
7# This failed because of syntax. Changed int(5) to int.9# This failed because of syntax. Changed int(5) to int.
8CREATE TABLE t1 (10CREATE TABLE t1 (
9 aufnr varchar(12) NOT NULL default '',11 aufnr varchar(12) NOT NULL default '',
@@ -21,6 +23,9 @@
2123
22drop table t1;24drop table t1;
2325
26select * from data_dictionary.seapitester_engine_state_history;
27select seapitester_clear_engine_state_history();
28
24# and again with a primary key29# and again with a primary key
2530
26CREATE TABLE t1 (31CREATE TABLE t1 (
@@ -39,6 +44,9 @@
3944
40drop table t1;45drop table t1;
4146
47select * from data_dictionary.seapitester_engine_state_history;
48select seapitester_clear_engine_state_history();
49
42# and again with a unique key that becomes the clustered key50# and again with a unique key that becomes the clustered key
4351
44create table t1 (a int, b int, c int);52create table t1 (a int, b int, c int);
@@ -46,3 +54,7 @@
46alter table t1 add unique(a,b);54alter table t1 add unique(a,b);
4755
48drop table t1;56drop table t1;
57
58select * from data_dictionary.seapitester_engine_state_history;
59select seapitester_clear_engine_state_history();
60
4961
=== modified file 'plugin/storage_engine_api_tester/tests/t/rollback_statement.test'
--- plugin/storage_engine_api_tester/tests/t/rollback_statement.test 2010-10-25 12:45:29 +0000
+++ plugin/storage_engine_api_tester/tests/t/rollback_statement.test 2011-01-13 06:17:20 +0000
@@ -1,4 +1,7 @@
1select seapitester_clear_engine_state_history();
1create table t1 (a int not null) engine=storage_engine_api_tester;2create table t1 (a int not null) engine=storage_engine_api_tester;
2--error 10483--error 1048
3insert into t1 values (1), (NULL), (2);4insert into t1 values (1), (NULL), (2);
4drop table t1;5drop table t1;
6select * from data_dictionary.seapitester_engine_state_history;
7select seapitester_clear_engine_state_history();
58
=== modified file 'plugin/storage_engine_api_tester/tests/t/select.test'
--- plugin/storage_engine_api_tester/tests/t/select.test 2010-12-12 00:13:57 +0000
+++ plugin/storage_engine_api_tester/tests/t/select.test 2011-01-13 06:17:20 +0000
@@ -1,6 +1,12 @@
1select seapitester_clear_engine_state_history();
1CREATE TABLE t2 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;2CREATE TABLE t2 (a int) ENGINE=STORAGE_ENGINE_API_TESTER;
2start transaction with consistent snapshot;3start transaction with consistent snapshot;
4select * from data_dictionary.seapitester_engine_state_history;
5select seapitester_clear_engine_state_history();
3#--error 11466#--error 1146
4select * from t2;7select * from t2;
5commit;8commit;
6drop table t2;9drop table t2;
10select * from data_dictionary.seapitester_engine_state_history;
11select seapitester_clear_engine_state_history();
12
713
=== modified file 'plugin/storage_engine_api_tester/tests/t/transaction.test'
--- plugin/storage_engine_api_tester/tests/t/transaction.test 2010-11-29 07:03:38 +0000
+++ plugin/storage_engine_api_tester/tests/t/transaction.test 2011-01-13 06:17:20 +0000
@@ -4,6 +4,9 @@
4# 2. Correct commit and rollback behaviour4# 2. Correct commit and rollback behaviour
5# 3. XA protocol communication and recovery5# 3. XA protocol communication and recovery
66
7select seapitester_clear_engine_state_history();
8
9
7--disable_warnings10--disable_warnings
8DROP TABLE IF EXISTS t1_trx, t1_non_trx;11DROP TABLE IF EXISTS t1_trx, t1_non_trx;
9--enable_warnings12--enable_warnings
@@ -32,11 +35,17 @@
3235
33ROLLBACK;36ROLLBACK;
3437
38select * from data_dictionary.seapitester_engine_state_history;
39select seapitester_clear_engine_state_history();
40
35--echo Expected warning about non-trx data changes not being rolled back41--echo Expected warning about non-trx data changes not being rolled back
3642
37SELECT * FROM t1_trx;43SELECT * FROM t1_trx;
38SELECT * FROM t1_non_trx;44SELECT * FROM t1_non_trx;
3945
46select * from data_dictionary.seapitester_engine_state_history;
47select seapitester_clear_engine_state_history();
48
40START TRANSACTION;49START TRANSACTION;
4150
42INSERT INTO t1_trx VALUES ('key1','value1');51INSERT INTO t1_trx VALUES ('key1','value1');
@@ -47,6 +56,8 @@
47INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;56INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;
4857
49ROLLBACK;58ROLLBACK;
59select * from data_dictionary.seapitester_engine_state_history;
60select seapitester_clear_engine_state_history();
5061
51SELECT t1_trx.k, t1_trx.v62SELECT t1_trx.k, t1_trx.v
52FROM t1_trx63FROM t1_trx
@@ -54,3 +65,7 @@
5465
55DROP TABLE t1_trx;66DROP TABLE t1_trx;
56DROP TABLE t1_non_trx;67DROP TABLE t1_non_trx;
68
69select * from data_dictionary.seapitester_engine_state_history;
70select seapitester_clear_engine_state_history();
71
5772
=== modified file 'plugin/storage_engine_api_tester/tests/t/txn_log_insert.test'
--- plugin/storage_engine_api_tester/tests/t/txn_log_insert.test 2010-12-30 18:07:58 +0000
+++ plugin/storage_engine_api_tester/tests/t/txn_log_insert.test 2011-01-13 06:17:20 +0000
@@ -19,6 +19,8 @@
19# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.19# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.
20#20#
2121
22select seapitester_clear_engine_state_history();
23
22--disable_warnings24--disable_warnings
23DROP TABLE IF EXISTS t1;25DROP TABLE IF EXISTS t1;
24--enable_warnings26--enable_warnings
@@ -48,8 +50,14 @@
48select seapitester_error_inject(0);50select seapitester_error_inject(0);
49# Read in the transaction.log.51# Read in the transaction.log.
5052
53select * from data_dictionary.seapitester_engine_state_history;
54select seapitester_clear_engine_state_history();
55
56
51--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log57--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log
5258
53# Truncate the log file to reset for the next test59# Truncate the log file to reset for the next test
54--source ../plugin/transaction_log/tests/t/truncate_log.inc60--source ../plugin/transaction_log/tests/t/truncate_log.inc
5561
62select * from data_dictionary.seapitester_engine_state_history;
63
5664
=== modified file 'plugin/storage_engine_api_tester/tests/t/txn_log_rollback_large_stmt.test'
--- plugin/storage_engine_api_tester/tests/t/txn_log_rollback_large_stmt.test 2010-12-01 11:16:06 +0000
+++ plugin/storage_engine_api_tester/tests/t/txn_log_rollback_large_stmt.test 2011-01-13 06:17:20 +0000
@@ -19,6 +19,8 @@
19# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.19# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.
20#20#
2121
22select seapitester_clear_engine_state_history();
23
22--disable_warnings24--disable_warnings
23DROP TABLE IF EXISTS t1;25DROP TABLE IF EXISTS t1;
24--enable_warnings26--enable_warnings
@@ -46,6 +48,9 @@
46select seapitester_error_inject(0);48select seapitester_error_inject(0);
47# Read in the transaction.log.49# Read in the transaction.log.
4850
51select * from data_dictionary.seapitester_engine_state_history;
52select seapitester_clear_engine_state_history();
53
49--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log54--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log
5055
51# Truncate the log file to reset for the next test56# Truncate the log file to reset for the next test

Subscribers

People subscribed via source and target branches