Skip to content

Commit c51fc67

Browse files
committed
Merge 5.5 into 10.0
2 parents 0d622be + a821ef7 commit c51fc67

File tree

2 files changed

+43
-51
lines changed

2 files changed

+43
-51
lines changed
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,59 @@
1+
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
12
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
23
set global innodb_limit_optimistic_insert_debug = 2;
34
insert into t1 values (1);
5+
begin;
46
insert into t1 values (5);
7+
begin;
58
insert into t1 values (4);
69
insert into t1 values (3);
10+
begin;
711
insert into t1 values (2);
812
analyze table t1;
913
Table Op Msg_type Msg_text
1014
test.t1 analyze status OK
1115
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
1216
CLUST_INDEX_SIZE
1317
10
14-
delete from t1 where a=4;
15-
set global innodb_purge_stop_now=ON;
16-
set global innodb_purge_run_now=ON;
18+
rollback;
1719
analyze table t1;
1820
Table Op Msg_type Msg_text
1921
test.t1 analyze status OK
2022
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
2123
CLUST_INDEX_SIZE
2224
8
23-
delete from t1 where a=5;
24-
set global innodb_purge_stop_now=ON;
25-
set global innodb_purge_run_now=ON;
25+
rollback;
2626
analyze table t1;
2727
Table Op Msg_type Msg_text
2828
test.t1 analyze status OK
2929
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
3030
CLUST_INDEX_SIZE
3131
5
32-
set global innodb_limit_optimistic_insert_debug = 0;
33-
delete from t1 where a=2;
34-
set global innodb_purge_stop_now=ON;
35-
set global innodb_purge_run_now=ON;
32+
set global innodb_limit_optimistic_insert_debug = 10000;
33+
rollback;
3634
analyze table t1;
3735
Table Op Msg_type Msg_text
3836
test.t1 analyze status OK
3937
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
4038
CLUST_INDEX_SIZE
4139
3
40+
begin;
4241
insert into t1 values (2);
43-
delete from t1 where a=2;
44-
set global innodb_purge_stop_now=ON;
45-
set global innodb_purge_run_now=ON;
42+
rollback;
4643
analyze table t1;
4744
Table Op Msg_type Msg_text
4845
test.t1 analyze status OK
4946
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
5047
CLUST_INDEX_SIZE
5148
2
49+
begin;
5250
insert into t1 values (2);
53-
delete from t1 where a=2;
54-
set global innodb_purge_stop_now=ON;
55-
set global innodb_purge_run_now=ON;
51+
rollback;
5652
analyze table t1;
5753
Table Op Msg_type Msg_text
5854
test.t1 analyze status OK
5955
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
6056
CLUST_INDEX_SIZE
6157
1
6258
drop table t1;
59+
set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;

mysql-test/suite/innodb/t/innodb_bug14676111.test

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@
22

33
-- source include/have_innodb.inc
44
-- source include/have_debug.inc
5+
-- source include/count_sessions.inc
56

6-
if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG'`)
7-
{
8-
--skip Test requires InnoDB built with UNIV_DEBUG definition.
9-
}
10-
11-
--disable_query_log
127
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
13-
set @old_innodb_undo_logs = @@innodb_undo_logs;
14-
# Limit undo segments for stable progress of purge.
15-
set global innodb_undo_logs = 1;
16-
--enable_query_log
178

189
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
1910

@@ -22,36 +13,45 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
2213
#
2314
set global innodb_limit_optimistic_insert_debug = 2;
2415
insert into t1 values (1);
16+
--connect (con5,localhost,root)
17+
begin;
2518
insert into t1 values (5);
2619
#current tree form
2720
# (1, 5)
2821

22+
--connect (con4,localhost,root)
23+
begin;
2924
insert into t1 values (4);
3025
#records in a page is limited to 2 artificially. root rise occurs
3126
#current tree form
3227
# (1, 5)
3328
#(1, 4) (5)
3429

30+
--connection default
3531
insert into t1 values (3);
3632
#current tree form
3733
# (1, 5)
3834
# (1, 4) (5)
3935
#(1, 3) (4) (5)
4036

37+
--connect (con2,localhost,root)
38+
begin;
4139
insert into t1 values (2);
4240
#current tree form
4341
# (1, 5)
4442
# (1, 4) (5)
4543
# (1, 3) (4) (5)
4644
#(1, 2) (3) (4) (5)
4745

46+
--connection default
4847
analyze table t1;
4948
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
5049

51-
delete from t1 where a=4;
52-
set global innodb_purge_stop_now=ON;
53-
set global innodb_purge_run_now=ON;
54-
--source include/wait_innodb_all_purged.inc
50+
--connection con4
51+
rollback;
52+
--disconnect con4
53+
--connection default
54+
5555
#deleting 1 record of 2 records don't cause merge artificially.
5656
#current tree form
5757
# (1, 5)
@@ -62,10 +62,11 @@ set global innodb_purge_run_now=ON;
6262
analyze table t1;
6363
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
6464

65-
delete from t1 where a=5;
66-
set global innodb_purge_stop_now=ON;
67-
set global innodb_purge_run_now=ON;
68-
--source include/wait_innodb_all_purged.inc
65+
--connection con5
66+
rollback;
67+
--disconnect con5
68+
--connection default
69+
6970
#deleting 1 record of 2 records don't cause merge artificially.
7071
#current tree form
7172
# (1)
@@ -81,11 +82,12 @@ select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME
8182
#
8283

8384
#disable the artificial limitation of records in a page
84-
set global innodb_limit_optimistic_insert_debug = 0;
85-
delete from t1 where a=2;
86-
set global innodb_purge_stop_now=ON;
87-
set global innodb_purge_run_now=ON;
88-
--source include/wait_innodb_all_purged.inc
85+
set global innodb_limit_optimistic_insert_debug = 10000;
86+
--connection con2
87+
rollback;
88+
--disconnect con2
89+
--connection default
90+
8991
#merge page occurs. and lift up occurs.
9092
#current tree form
9193
# (1)
@@ -95,32 +97,27 @@ set global innodb_purge_run_now=ON;
9597
analyze table t1;
9698
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
9799

100+
begin;
98101
insert into t1 values (2);
99102
#current tree form
100103
# (1)
101104
# (1) <- lift up this level next, because it is not root
102105
# (1, 2, 3)
106+
rollback;
103107

104-
delete from t1 where a=2;
105-
set global innodb_purge_stop_now=ON;
106-
set global innodb_purge_run_now=ON;
107-
--source include/wait_innodb_all_purged.inc
108108
#current tree form
109109
# (1)
110110
# (1, 3)
111111

112112
analyze table t1;
113113
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
114114

115+
begin;
115116
insert into t1 values (2);
116117
#current tree form
117118
# (1)
118119
# (1, 2, 3) <- lift up this level next, because the father is root
119-
120-
delete from t1 where a=2;
121-
set global innodb_purge_stop_now=ON;
122-
set global innodb_purge_run_now=ON;
123-
--source include/wait_innodb_all_purged.inc
120+
rollback;
124121
#current tree form
125122
# (1, 3)
126123

@@ -129,7 +126,5 @@ select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME
129126

130127
drop table t1;
131128

132-
--disable_query_log
133129
set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
134-
set global innodb_undo_logs = @old_innodb_undo_logs;
135-
--enable_query_log
130+
-- source include/wait_until_count_sessions.inc

0 commit comments

Comments
 (0)