mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge revisions from maria/5.5
bzr merge -r4388 lp:maria/5.5
This commit is contained in:
4
mysql-test/suite/innodb/r/innodb-stats-sample.result
Normal file
4
mysql-test/suite/innodb/r/innodb-stats-sample.result
Normal file
@@ -0,0 +1,4 @@
|
||||
Variable_name Value
|
||||
innodb_stats_sample_pages 1
|
||||
Variable_name Value
|
||||
innodb_stats_traditional OFF
|
@@ -9,6 +9,8 @@
|
||||
--source include/not_embedded.inc
|
||||
# DBUG_SUICIDE() hangs under valgrind
|
||||
--source include/not_valgrind.inc
|
||||
# No windows, need perl
|
||||
--source include/not_windows.inc
|
||||
|
||||
# The flag innodb_change_buffering_debug is only available in debug builds.
|
||||
# It instructs InnoDB to try to evict pages from the buffer pool when
|
||||
|
78
mysql-test/suite/innodb/t/innodb-stats-sample.test
Normal file
78
mysql-test/suite/innodb/t/innodb-stats-sample.test
Normal file
@@ -0,0 +1,78 @@
|
||||
--source include/have_innodb.inc
|
||||
#
|
||||
# Test that mysqld does not crash when running ANALYZE TABLE with
|
||||
# different values of the parameter innodb_stats_sample_pages.
|
||||
#
|
||||
|
||||
# we care only that the following SQL commands do not produce errors
|
||||
# and do not crash the server
|
||||
-- disable_query_log
|
||||
-- disable_result_log
|
||||
-- enable_warnings
|
||||
|
||||
let $sample_pages=`select @@innodb_stats_sample_pages`;
|
||||
let $traditional=`select @@innodb_stats_traditional`;
|
||||
SET GLOBAL innodb_stats_sample_pages=0;
|
||||
#use new method to calculate statistics
|
||||
SET GLOBAL innodb_stats_traditional=0;
|
||||
|
||||
# check that the value has been adjusted to 1
|
||||
-- enable_result_log
|
||||
SHOW VARIABLES LIKE 'innodb_stats_sample_pages';
|
||||
SHOW VARIABLES LIKE 'innodb_stats_traditional';
|
||||
-- disable_result_log
|
||||
|
||||
CREATE TABLE innodb_analyze (
|
||||
a INT,
|
||||
b INT,
|
||||
c char(50),
|
||||
KEY(a),
|
||||
KEY(b,a)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# test with empty table
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=2;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=1;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=8000;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
delimiter //;
|
||||
create procedure innodb_insert_proc (repeat_count int)
|
||||
begin
|
||||
declare current_num int;
|
||||
set current_num = 0;
|
||||
while current_num < repeat_count do
|
||||
insert into innodb_analyze values(current_num, current_num*100,substring(MD5(RAND()), -44));
|
||||
set current_num = current_num + 1;
|
||||
end while;
|
||||
end//
|
||||
delimiter ;//
|
||||
commit;
|
||||
|
||||
set autocommit=0;
|
||||
call innodb_insert_proc(7000);
|
||||
commit;
|
||||
set autocommit=1;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=1;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=8;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=16;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
SET GLOBAL innodb_stats_sample_pages=8000;
|
||||
ANALYZE TABLE innodb_analyze;
|
||||
|
||||
DROP PROCEDURE innodb_insert_proc;
|
||||
DROP TABLE innodb_analyze;
|
||||
EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages;
|
||||
EVAL SET GLOBAL innodb_stats_traditional=$traditional;
|
@@ -1333,7 +1333,7 @@ drop table t1;
|
||||
|
||||
# Test for testable InnoDB status variables. This test
|
||||
# uses previous ones(pages_created, rows_deleted, ...).
|
||||
--replace_result 511 ok 512 ok 2047 ok 513 ok
|
||||
--replace_result 511 ok 512 ok 2047 ok 513 ok 515 ok
|
||||
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
|
||||
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
|
||||
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
|
||||
|
@@ -10,6 +10,8 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n
|
||||
# Don't test under valgrind, undo slots of the previous test might exist still
|
||||
# and cause unstable result.
|
||||
--source include/not_valgrind.inc
|
||||
# undo slots of the previous test might exist still
|
||||
--source include/not_windows.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
|
||||
|
||||
|
@@ -12,6 +12,9 @@ source include/not_embedded.inc;
|
||||
source include/have_innodb.inc;
|
||||
# Require Debug for SET DEBUG
|
||||
source include/have_debug.inc;
|
||||
# Test could open crash reporter on Windows
|
||||
# if compiler set up
|
||||
source include/not_windows.inc;
|
||||
|
||||
CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
|
||||
CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
|
||||
|
@@ -122,7 +122,7 @@ SELECT * FROM ```t'\"_str` WHERE c1 = '4' FOR UPDATE;
|
||||
# then its contents will never change because the cache from which it is
|
||||
# filled is updated only if it has not been read for 0.1 seconds. See
|
||||
# CACHE_MIN_IDLE_TIME_US in trx/trx0i_s.c.
|
||||
let $cnt=10;
|
||||
let $cnt=200;
|
||||
while ($cnt)
|
||||
{
|
||||
let $success=`SELECT COUNT(*) = 14 FROM INFORMATION_SCHEMA.INNODB_LOCKS`;
|
||||
|
Reference in New Issue
Block a user