summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb-changed-pages.test
blob: 14668af25cbde56d649bf77732c7023c8678866b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
-- source include/have_xtradb.inc

#
# This test requires innodb-changed-pages=1 so that necessary information schema table exists
# and innodb-track-changed-pages=0 to disable actual changed pages tracking, because
# page number are not consistent from run to run
#

#
# MDEV-4791: ssertion range_end >= range_start fails in log0online.c 
# on select from I_S.INNODB_CHANGED_PAGES

SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 10 AND end_lsn > 20 ;

SELECT * FROM INFORMATION_SCHEMA . `INNODB_CHANGED_PAGES` AS table1 WHERE ( ( (NOT ( ( ( ( (NOT ( table1 . `page_id` <> table1 . `start_lsn` AND table1 . `space_id` <> 8) AND table1 . `page_id` >= table1 . `end_lsn`) OR table1 . `end_lsn` = table1 . `space_id`) AND table1 . `end_lsn` <> table1 . `page_id`) OR table1 . `end_lsn` < 8) AND table1 . `space_id` >= '2000-06-10 11:33:07.046821') AND table1 . `end_lsn` >= 5) AND table1 . `start_lsn` < 'mm') OR table1 . `end_lsn` != table1 . `end_lsn`) HAVING ( table1 . `start_lsn` < '2005-09-09 01:34:19.012946' OR table1 . `page_id` < 6) ORDER BY table1 . `start_lsn`
LIMIT 3;

#
# Basic tests
#

SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;

SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn = 2000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn = 2000000;

#
# OR
#
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn < 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn <= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn > 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn > 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn >= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn >= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn > 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn > 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn >= 3000000;
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn >= 3000000;

#
# Range
#
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE (start_lsn > 2000000 and end_lsn < 3000000) or (start_lsn > 4000000 and end_lsn < 5000000);