~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/tests/t/slap.test

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Concurrency tests for concurrency
 
2
 
 
3
# Truncate the log file to reset for the next test
 
4
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
5
 
 
6
CREATE SCHEMA drizzleslap;
 
7
 
 
8
CREATE TABLE t1
 
9
(
 
10
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 
11
  rand_float FLOAT NOT NULL
 
12
) ENGINE=InnoDB;
 
13
 
 
14
# We want a lot of transactions generated...
 
15
--exec $DRIZZLE_SLAP --silent  --concurrency=8 --iterations=100  --query="INSERT INTO test.t1 VALUES (NULL, RAND())" --delimiter=";"
 
16
 
 
17
# Should be 800
 
18
SELECT COUNT(*) FROM test.t1;
 
19
 
 
20
# Should show a single log file and data
 
21
--replace_column 2 X 5 X 6 X 7 X 8 X 9 X
 
22
SELECT * FROM data_dictionary.transaction_log;
 
23
 
 
24
# Both should be 802 (1 create schema, 1 create table, 800 inserts)
 
25
SELECT COUNT(*) FROM data_dictionary.transaction_log_transactions;
 
26
SELECT COUNT(*) FROM data_dictionary.transaction_log_entries;
 
27
 
 
28
--exec $DRIZZLE_SLAP --silent  --concurrency=5 --iterations=20  --query="select * from data_dictionary.transaction_log" --delimiter=";"
 
29
--exec $DRIZZLE_SLAP --silent  --concurrency=5 --iterations=20  --query="select count(*) from data_dictionary.transaction_log_transactions" --delimiter=";"
 
30
--exec $DRIZZLE_SLAP --silent  --concurrency=5 --iterations=20  --query="select * from data_dictionary.transaction_log_entries limit 100" --delimiter=";"
 
31
 
 
32
DROP SCHEMA drizzleslap;
 
33
 
 
34
DROP TABLE t1;
 
35
 
 
36
--source ../plugin/transaction_log/tests/t/truncate_log.inc