~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/preload.result

  • 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
drop table if exists t1, t2;
 
2
create table t1 (
 
3
a int not null auto_increment,
 
4
b char(16) not null,
 
5
primary key (a),
 
6
key (b)
 
7
);
 
8
create table t2(
 
9
a int not null auto_increment,
 
10
b char(16) not null,
 
11
primary key (a),
 
12
key (b)
 
13
);
 
14
insert into t1(b) values 
 
15
('test0'),
 
16
('test1'),
 
17
('test2'),
 
18
('test3'),
 
19
('test4'),
 
20
('test5'),
 
21
('test6'),
 
22
('test7');
 
23
insert into t2(b) select b from t1;
 
24
insert into t1(b) select b from t2;
 
25
insert into t2(b) select b from t1;
 
26
insert into t1(b) select b from t2;
 
27
insert into t2(b) select b from t1;
 
28
insert into t1(b) select b from t2;
 
29
insert into t2(b) select b from t1;
 
30
insert into t1(b) select b from t2;
 
31
insert into t2(b) select b from t1;
 
32
insert into t1(b) select b from t2;
 
33
insert into t2(b) select b from t1;
 
34
insert into t1(b) select b from t2;
 
35
insert into t2(b) select b from t1;
 
36
insert into t1(b) select b from t2;
 
37
insert into t2(b) select b from t1;
 
38
insert into t1(b) select b from t2;
 
39
insert into t2(b) select b from t1;
 
40
insert into t1(b) select b from t2;
 
41
select count(*) from t1;
 
42
count(*)
 
43
33448
 
44
select count(*) from t2;
 
45
count(*)
 
46
20672
 
47
flush tables;
 
48
flush status;
 
49
show status like "key_read%";
 
50
Variable_name   Value
 
51
Key_read_requests       0
 
52
Key_reads       0
 
53
select count(*) from t1 where b = 'test1';
 
54
count(*)
 
55
4181
 
56
show status like "key_read%";
 
57
Variable_name   Value
 
58
Key_read_requests       294
 
59
Key_reads       60
 
60
select count(*) from t1 where b = 'test1';
 
61
count(*)
 
62
4181
 
63
show status like "key_read%";
 
64
Variable_name   Value
 
65
Key_read_requests       588
 
66
Key_reads       60
 
67
flush tables;
 
68
flush status;
 
69
select @@preload_buffer_size;
 
70
@@preload_buffer_size
 
71
32768
 
72
load index into cache t1;
 
73
Table   Op      Msg_type        Msg_text
 
74
test.t1 preload_keys    status  OK
 
75
show status like "key_read%";
 
76
Variable_name   Value
 
77
Key_read_requests       774
 
78
Key_reads       774
 
79
select count(*) from t1 where b = 'test1';
 
80
count(*)
 
81
4181
 
82
show status like "key_read%";
 
83
Variable_name   Value
 
84
Key_read_requests       1068
 
85
Key_reads       774
 
86
flush tables;
 
87
flush status;
 
88
show status like "key_read%";
 
89
Variable_name   Value
 
90
Key_read_requests       0
 
91
Key_reads       0
 
92
set session preload_buffer_size=256*1024;
 
93
select @@preload_buffer_size;
 
94
@@preload_buffer_size
 
95
262144
 
96
load index into cache t1 ignore leaves;
 
97
Table   Op      Msg_type        Msg_text
 
98
test.t1 preload_keys    status  OK
 
99
show status like "key_read%";
 
100
Variable_name   Value
 
101
Key_read_requests       17
 
102
Key_reads       17
 
103
select count(*) from t1 where b = 'test1';
 
104
count(*)
 
105
4181
 
106
show status like "key_read%";
 
107
Variable_name   Value
 
108
Key_read_requests       311
 
109
Key_reads       75
 
110
flush tables;
 
111
flush status;
 
112
show status like "key_read%";
 
113
Variable_name   Value
 
114
Key_read_requests       0
 
115
Key_reads       0
 
116
set session preload_buffer_size=1*1024;
 
117
select @@preload_buffer_size;
 
118
@@preload_buffer_size
 
119
1024
 
120
load index into cache t1, t2 key (primary,b) ignore leaves;
 
121
Table   Op      Msg_type        Msg_text
 
122
test.t1 preload_keys    status  OK
 
123
test.t2 preload_keys    status  OK
 
124
show status like "key_read%";
 
125
Variable_name   Value
 
126
Key_read_requests       785
 
127
Key_reads       785
 
128
select count(*) from t1 where b = 'test1';
 
129
count(*)
 
130
4181
 
131
select count(*) from t2 where b = 'test1';
 
132
count(*)
 
133
2584
 
134
show status like "key_read%";
 
135
Variable_name   Value
 
136
Key_read_requests       1266
 
137
Key_reads       821
 
138
flush tables;
 
139
flush status;
 
140
show status like "key_read%";
 
141
Variable_name   Value
 
142
Key_read_requests       0
 
143
Key_reads       0
 
144
load index into cache t3, t2 key (primary,b) ;
 
145
Table   Op      Msg_type        Msg_text
 
146
test.t3 preload_keys    Error   Table 'test.t3' doesn't exist
 
147
test.t3 preload_keys    error   Corrupt
 
148
test.t2 preload_keys    status  OK
 
149
show status like "key_read%";
 
150
Variable_name   Value
 
151
Key_read_requests       478
 
152
Key_reads       478
 
153
flush tables;
 
154
flush status;
 
155
show status like "key_read%";
 
156
Variable_name   Value
 
157
Key_read_requests       0
 
158
Key_reads       0
 
159
load index into cache t3 key (b), t2 key (c) ;
 
160
Table   Op      Msg_type        Msg_text
 
161
test.t3 preload_keys    Error   Table 'test.t3' doesn't exist
 
162
test.t3 preload_keys    error   Corrupt
 
163
test.t2 preload_keys    Error   Key 'c' doesn't exist in table 't2'
 
164
test.t2 preload_keys    status  Operation failed
 
165
show status like "key_read%";
 
166
Variable_name   Value
 
167
Key_read_requests       0
 
168
Key_reads       0
 
169
drop table t1, t2;