| 1 |
--source include/have_debug.inc |
| 2 |
--source include/have_innodb_16k.inc |
| 3 |
--source include/not_hypergraph.inc |
| 4 |
--source include/not_log_bin.inc |
| 5 |
|
| 6 |
CREATE TABLE t1 (pk INT PRIMARY KEY, data BLOB); |
| 7 |
DELIMITER |; |
| 8 |
CREATE PROCEDURE populate() |
| 9 |
BEGIN |
| 10 |
DECLARE p1 INT DEFAULT 1; |
| 11 |
label1: loop |
| 12 |
INSERT INTO t1 VALUES (p1, REPEAT('a', 3200)); |
| 13 |
SET p1 = p1 + 1; |
| 14 |
IF p1 < 10000 THEN |
| 15 |
iterate label1; |
| 16 |
END IF; |
| 17 |
leave label1; |
| 18 |
end loop label1; |
| 19 |
END;| |
| 20 |
|
| 21 |
DELIMITER ;| |
| 22 |
|
| 23 |
CALL populate(); |
| 24 |
|
| 25 |
--let $OUTFILE = `SELECT @@secure_file_priv` |
| 26 |
|
| 27 |
--echo # Generate data into temporary file |
| 28 |
--disable_query_log |
| 29 |
eval SELECT * FROM t1 ORDER BY rand(28) INTO OUTFILE '$OUTFILE/fseg_reserve_factor.dat'; |
| 30 |
--enable_query_log |
| 31 |
|
| 32 |
SET GLOBAL innodb_segment_reserve_factor = 1.0; |
| 33 |
CREATE TABLE t2 LIKE t1; |
| 34 |
--echo # Load data into t2 from temporary file |
| 35 |
--disable_query_log |
| 36 |
eval LOAD DATA INFILE '$OUTFILE/fseg_reserve_factor.dat' INTO TABLE t2; |
| 37 |
--enable_query_log |
| 38 |
|
| 39 |
SET GLOBAL innodb_segment_reserve_factor = 30.0; |
| 40 |
CREATE TABLE t3 LIKE t1; |
| 41 |
--echo # Load data into t3 from temporary file |
| 42 |
--disable_query_log |
| 43 |
eval LOAD DATA INFILE '$OUTFILE/fseg_reserve_factor.dat' INTO TABLE t3; |
| 44 |
--enable_query_log |
| 45 |
|
| 46 |
SET innodb_interpreter = 'init'; |
| 47 |
SET innodb_interpreter = 'count_page_type test/t2'; |
| 48 |
SELECT @@innodb_interpreter_output; |
| 49 |
SET innodb_interpreter = 'count_used_and_free test/t2'; |
| 50 |
SELECT @@innodb_interpreter_output; |
| 51 |
SET innodb_interpreter = 'count_page_type test/t3'; |
| 52 |
SELECT @@innodb_interpreter_output; |
| 53 |
SET innodb_interpreter = 'count_used_and_free test/t3'; |
| 54 |
SELECT @@innodb_interpreter_output; |
| 55 |
SET innodb_interpreter = 'destroy'; |
| 56 |
|
| 57 |
--remove_file '$OUTFILE/fseg_reserve_factor.dat'; |
| 58 |
|
| 59 |
SET GLOBAL innodb_segment_reserve_factor = DEFAULT; |
| 60 |
DROP TABLE t1, t2, t3; |
| 61 |
DROP PROCEDURE populate; |
| 62 |
|