~clint-fewbar/drizzle/regex-policy-cache-limiter

« back to all changes in this revision

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

  • Committer: Clint Byrum
  • Date: 2012-03-15 18:05:43 UTC
  • mfrom: (2224.1.302 workspace)
  • Revision ID: clint@ubuntu.com-20120315180543-9jxxm4q10k3np2ws
merging with latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# Simple test of the transaction log for INSERT ...
3
 
# ON DUPLICATE KEY UPDATE statements
4
 
5
 
# We create a table and insert some records
6
 
# into it.  We then issue an INSERT ... ON DUPLICATE KEY UPDATE
7
 
# statement which will affect an existing record.
8
 
9
 
# We then use the transaction_reader in plugin/transaction_log/utilities to read the events.
10
 
#
11
 
 
12
 
--disable_warnings
13
 
DROP TABLE IF EXISTS t1;
14
 
--enable_warnings
15
 
 
16
 
CREATE TABLE t1 (
17
 
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
18
 
, padding VARCHAR(200) NOT NULL
19
 
);
20
 
 
21
 
INSERT INTO t1 VALUES (1, "I love testing.");
22
 
INSERT INTO t1 VALUES (2, "I hate testing.");
23
 
 
24
 
INSERT INTO t1 VALUES (2, "I love testing")
25
 
ON DUPLICATE KEY UPDATE padding="I love testing";
26
 
 
27
 
DROP TABLE t1;