1set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
2CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
3set global innodb_limit_optimistic_insert_debug = 2;
4insert into t1 values (1);
5connect  con5,localhost,root;
6begin;
7insert into t1 values (5);
8connect  con4,localhost,root;
9begin;
10insert into t1 values (4);
11connection default;
12insert into t1 values (3);
13connect  con2,localhost,root;
14begin;
15insert into t1 values (2);
16connection default;
17analyze table t1;
18Table	Op	Msg_type	Msg_text
19test.t1	analyze	status	Engine-independent statistics collected
20test.t1	analyze	status	OK
21select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
22CLUST_INDEX_SIZE
2310
24connection con4;
25rollback;
26disconnect con4;
27connection default;
28analyze table t1;
29Table	Op	Msg_type	Msg_text
30test.t1	analyze	status	Engine-independent statistics collected
31test.t1	analyze	status	OK
32select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
33CLUST_INDEX_SIZE
348
35connection con5;
36rollback;
37disconnect con5;
38connection default;
39analyze table t1;
40Table	Op	Msg_type	Msg_text
41test.t1	analyze	status	Engine-independent statistics collected
42test.t1	analyze	status	OK
43select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
44CLUST_INDEX_SIZE
454
46set global innodb_limit_optimistic_insert_debug = 10000;
47connection con2;
48rollback;
49disconnect con2;
50connection default;
51analyze table t1;
52Table	Op	Msg_type	Msg_text
53test.t1	analyze	status	Engine-independent statistics collected
54test.t1	analyze	status	OK
55select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
56CLUST_INDEX_SIZE
572
58begin;
59insert into t1 values (2);
60rollback;
61analyze table t1;
62Table	Op	Msg_type	Msg_text
63test.t1	analyze	status	Engine-independent statistics collected
64test.t1	analyze	status	OK
65select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
66CLUST_INDEX_SIZE
671
68begin;
69insert into t1 values (2);
70rollback;
71analyze table t1;
72Table	Op	Msg_type	Msg_text
73test.t1	analyze	status	Engine-independent statistics collected
74test.t1	analyze	status	OK
75select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
76CLUST_INDEX_SIZE
771
78drop table t1;
79set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
80