~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to mysql-test/suite/large_tests/t/falcon_record_cache_memory_leak-big.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/have_falcon.inc
 
2
--source include/big_test.inc
 
3
#
 
4
# Record cache memory leak test inspired by Kevin.
 
5
#
 
6
# Note: Original test is with loop count of
 
7
#   250000. For the big-test version we use loop count of 500k.
 
8
 
 
9
# ----------------------------------------------------- #
 
10
# --- Initialisation                                --- #
 
11
# ----------------------------------------------------- #
 
12
let $engine = 'Falcon';
 
13
eval SET @@storage_engine = $engine;
 
14
 
 
15
--disable_warnings
 
16
DROP TABLE IF EXISTS t1;
 
17
--enable_warnings
 
18
 
 
19
CREATE TABLE t1 (c1 varchar(100));
 
20
INSERT INTO t1 VALUES (repeat('A', 100));
 
21
INSERT INTO t1 VALUES (repeat('B', 100));
 
22
INSERT INTO t1 VALUES (repeat('C', 100));
 
23
COMMIT;
 
24
 
 
25
# ----------------------------------------------------- #
 
26
# --- Test                                          --- #
 
27
# ----------------------------------------------------- #
 
28
BEGIN;
 
29
# During this series of updates, there should be no increase in memory
 
30
# since each previous record version should be freed once it is replaced.
 
31
 
 
32
--disable_query_log
 
33
let $i= 500000;
 
34
while ($i)
 
35
{
 
36
    UPDATE t1 SET c1 = lower(c1);
 
37
    UPDATE t1 SET c1 = upper(c1);
 
38
 
 
39
    dec $i;
 
40
}
 
41
--enable_query_log
 
42
 
 
43
COMMIT;
 
44
 
 
45
# ----------------------------------------------------- #
 
46
# --- Check                                         --- #
 
47
# ----------------------------------------------------- #
 
48
SELECT count(*) FROM t1;
 
49
 
 
50
# ----------------------------------------------------- #
 
51
# --- Final cleanup                                 --- #
 
52
# ----------------------------------------------------- #
 
53
DROP TABLE t1;