~xnox/ubuntu/saucy/drizzle/merge

« back to all changes in this revision

Viewing changes to plugin/storage_engine_api_tester/tests/t/txn_log_insert.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-01-01 13:55:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110101135503-x2ub1akxoisgwi6z
Tags: 2010.12.06-0ubuntu4
* Fixed missing build depends.
* Added Lee to uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Tests simple INSERT statements and the transaction log
 
3
#
 
4
 
 
5
# Ignore startup/shutdown events
 
6
--disable_query_log
 
7
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
8
--enable_query_log
 
9
 
 
10
 
 
11
# Populate log with some records...
 
12
##--source ../plugin/transaction_log/tests/t/insert.inc
 
13
#
 
14
# Simple test of the transaction log for single INSERT statements
 
15
#
 
16
# We create a table and insert some records
 
17
# into it.
 
18
#
 
19
# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.
 
20
#
 
21
 
 
22
--disable_warnings
 
23
DROP TABLE IF EXISTS t1;
 
24
--enable_warnings
 
25
CREATE TABLE t1 (
 
26
  pk int auto_increment primary key,
 
27
  id INT NOT NULL
 
28
, padding VARCHAR(200) NOT NULL
 
29
) engine=storage_engine_api_tester;
 
30
#enable error inject
 
31
SELECT seapitester_error_inject(1);
 
32
 
 
33
--error 1213,1205
 
34
INSERT INTO t1 (id,padding) values (40, "boo"),(41,"scary");
 
35
begin;
 
36
INSERT INTO t1 (id,padding) VALUES (1, "I love testing.");
 
37
--error 1213,1205
 
38
INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
 
39
update t1 set padding="bar" where id=1;
 
40
commit;
 
41
INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
 
42
COMMIT;
 
43
select * from t1;
 
44
DROP TABLE t1;
 
45
# disable err inject
 
46
select seapitester_error_inject(0);
 
47
# Read in the transaction.log.
 
48
 
 
49
--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log
 
50
 
 
51
# Truncate the log file to reset for the next test
 
52
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
53