~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/transaction_log/tests/t/no_modification.inc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
# Simple test of the transaction log for when a START TRANSACTION ... COMMIT
 
3
# is issued, but no data modifications actually occurred. Also tested is
 
4
# a update that does not update anything. 
 
5
 
6
# This situation occurs in, for instance, sysbench, which wraps even SELECTs
 
7
# in a transaction.
 
8
#
 
9
 
 
10
--disable_warnings
 
11
DROP TABLE IF EXISTS t1;
 
12
--enable_warnings
 
13
 
 
14
CREATE TABLE t1 (
 
15
  id INT NOT NULL PRIMARY KEY
 
16
, padding VARCHAR(200) NOT NULL
 
17
);
 
18
 
 
19
INSERT INTO t1 VALUES (1, "I love testing.");
 
20
INSERT INTO t1 VALUES (2, "I hate testing.");
 
21
 
 
22
UPDATE t1 SET id=1 WHERE padding='I love testing.';
 
23
 
 
24
START TRANSACTION;
 
25
 
 
26
SELECT * FROM t1 WHERE id = 1;
 
27
SELECT * FROM t1 WHERE id = 2;
 
28
 
 
29
COMMIT;