MySQL Test Suite使用
MySQL Test Suite使用
一、主要目录介绍
- include
1
2
3
4
|
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
--skip Test requires InnoDB.
}
|
如不满足,则会跳过需要该验证的测试。
- suite
- t
1
2
3
4
5
|
#
# Check that we haven't any strange new tables or databases
#
show databases;
show tables in mysql;
|
上面内容即为1st这个测试用例的测试脚本
- r
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
|
show databases;
Database
information_schema
mtr
mysql
performance_schema
test
show tables in mysql;
Tables_in_mysql
column_stats
columns_priv
db
event
func
general_log
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
host
index_stats
innodb_index_stats
innodb_table_stats
plugin
proc
procs_priv
proxies_priv
roles_mapping
servers
slow_log
table_stats
tables_priv
time_zone
time_zone_leap_second
time_zone_name
time_zone_transition
time_zone_transition_type
user
|
执行完1st用例会严格比对该文件。完全一致则测试通过。
- std_date
- var
二、测试用例集
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
|
main:主要测试用例
archive
binlog
csv
encryption:加密功能
engines
federated
funcs_1:额外功能(包括视图、存储过程、INFORMATION_SCHEMA等)
funcs_2:额外功能(字符集等)
galera
galera_3nodes
handler
heap
innodb
innodb_fts:innodb全文索引
innodb_zip:innodb压缩
jp:日本字符相关测试
large_tests:
maria
mtr
mtr2
multi_source
ndb
optimizer_unfixed_bugs
parts
percona
perfschema
perfschema_stress
plugins
roles
rpl
storage_engine
stress
sys_vars
unit
vcol
wsrep
|
三、主要参数
四、测试举例
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
|
[lzk@redhat64-26 mysql-test]$ ./mtr --force --big-test --suite=archive
Logging: ./mtr --force --big-test --suite=archive
vardir: /home/lzk/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/lzk/mysql-test/var'...
Checking supported features...
MariaDB Version 10.1.12-MariaDB
- SSL connections supported
Using suites: archive
Collecting tests...
Installing system database...
==============================================================================
TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
archive.archive_debug [ skipped ] Requires debug build
archive.partition_archive [ pass ] 74
archive.archive_no_symlink [ pass ] 5
archive.archive-big [ pass ] 298619
archive.archive [ pass ] 417
archive.archive_bitfield [ pass ] 37
archive.archive_gis [ pass ] 66
archive.archive_symlink [ pass ] 11
archive.discover [ pass ] 47
archive.discover_5438 [ pass ] 7
archive.mysqlhotcopy_archive [ pass ] 1035
archive.repair [ pass ] 3
archive.archive_plugin [ pass ] 6
--------------------------------------------------------------------------
The servers were restarted 3 times
Spent 300.327 of 309 seconds executing testcases
Completed: All 12 tests were successful.
1 tests were skipped, 0 by the test itself.
|
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
|
[lzk@redhat64-26 mysql-test]$ ./mtr binlog_innodb_row
Logging: ./mtr binlog_innodb_row
vardir: /home/lzk/mysql-test/var
Checking leftover processes...
- found old pid 28610 in 'mysqld.1.pid', killing it...
process did not exist!
Removing old var directory...
Creating var directory '/home/lzk/mysql-test/var'...
Checking supported features...
MariaDB Version 10.1.12-MariaDB
- SSL connections supported
klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_550)
Collecting tests...
Installing system database...
==============================================================================
TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
binlog.binlog_innodb_row 'innodb_plugin,row' [ pass ] 3361
binlog.binlog_innodb_row 'row,xtradb' [ pass ] 3349
--------------------------------------------------------------------------
The servers were restarted 1 times
Spent 6.710 of 17 seconds executing testcases
Completed: All 2 tests were successful.
|
每个测试结束前,mtr会检索error日志,如果发现warning或error,则测试失败。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
innodb.innodb_bug53674 'innodb_plugin' [ fail ] Found warnings/errors in server log file!
Test ended at 2016-03-24 20:57:36
line
2016-03-24 20:57:35 7fd0fc6fc7e0 InnoDB: Warning: Using innodb_locks_unsafe_for_binlog is DEPRECATED. This option may be removed in future releases. Please use READ COMMITTED transaction isolation level instead, see http://dev.mysql.com/doc/refman/5.6/en/set-transaction.html.
^ Found warnings in /home/lzk/mysql-test/var/log/mysqld.1.err
ok
- saving '/home/lzk/mysql-test/var/log/innodb.innodb_bug53674-innodb_plugin/' to '/home/lzk/mysql-test/var/log/innodb.innodb_bug53674-innodb_plugin/'
innodb.innodb_bug53674 'xtradb' [ fail ] Found warnings/errors in server log file!
Test ended at 2016-03-24 20:57:37
line
2016-03-24 20:57:36 7f274c58b7e0 InnoDB: Warning: Using innodb_locks_unsafe_for_binlog is DEPRECATED. This option may be removed in future releases. Please use READ COMMITTED transaction isolation level instead, see http://dev.mysql.com/doc/refman/5.6/en/set-transaction.html.
^ Found warnings in /home/lzk/mysql-test/var/log/mysqld.1.err
ok
- saving '/home/lzk/mysql-test/var/log/innodb.innodb_bug53674-xtradb/' to '/home/lzk/mysql-test/var/log/innodb.innodb_bug53674-xtradb/'
|
分析日志可以看出是在测试过程中在错误日志中发现了warnings/errors。原因是使用了废弃的参数innodb_locks_unsafe_for_binlog导致warning。
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
|
[lzk@redhat64-26 mysql-test]$ ./mtr innodb_bug53674
Logging: ./mtr innodb_bug53674
vardir: /home/lzk/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/lzk/mysql-test/var'...
Checking supported features...
MariaDB Version 10.1.12-MariaDB
- SSL connections supported
klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_550)
Collecting tests...
Installing system database...
==============================================================================
TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
innodb.innodb_bug53674 'innodb_plugin' [ pass ] 211
innodb.innodb_bug53674 'xtradb' [ pass ] 205
--------------------------------------------------------------------------
The servers were restarted 1 times
Spent 0.416 of 10 seconds executing testcases
Completed: All 2 tests were successful.
|
不再有warning,测试通过。
MySQL Test Suite使用的更多相关文章
- mysql几种性能测试的工具使用
mysql几种性能测试的工具使用 近期由于要比较mysql及其分支mariadb, percona的性能,了解了几个这方面的工具,包括:mysqlslap sysbench tpcc-mysql,做一 ...
- Installing MySQL Server
Installing MySQL Server Here we will learn how to Compile and Install the MySQL Server from source c ...
- MySQL基准测试(三)--开源工具与实例演示
MySQL基准测试(三)--开源工具与实例演示 针对web应用 ab ab是一个Apache HTTP服务的基准测试工具. http_load http_load是一个针对Web服务器测试工具. JM ...
- mysql压力测试工具Mysqlslap
mysql 性能测试工具:The MySQL Benchmark Suite(不支持多CPU而且不是压力工具) 压力测试工具: MySQL super-smack:需要找能连接外网的机器,能连接外网的 ...
- 测试mysql性能工具
mysqlslap mysqlslap可以模拟服务器的负载,并输出计时信息.它包含在MySQL 5.1 的发行包中,应该在MySQL 4.1或者更新的版本中都可以使用.测试时可以执行并发连接数,并指定 ...
- MySQL常用配置和性能压力测试:MySQL系列之十五
一.MySQL常用配置 以下所有配置参数以32G内存的服务器为基 1.打开独立的表空间 innodb_file_per_table = 1 2.MySQL服务所允许的同时会话数的上限,默认为151,经 ...
- 高性能MySQL(二)
MySQL基准测试 为什么需要benchmark 验证基于系统的假设,确认是否符合实际情况 重现系统中的某些异常行为,以解决它们 测试系统当前的运行情况,如果不清楚当前性能,就无法确认优化效果 模拟比 ...
- Mysql 5.7 官方文档翻译
始于 2017年4月1日-愚人节 1.1 MySQL 5.7 新功能 本章节介绍了MySQL 5.7 新版本中新增.废弃.删除的功能. 在1.5章节 Section 1.5, "Server ...
- MySQL集群高可用
目录 MySQL高可用 Galera Cluster Galera Cluster Galera Cluster特点 Galera Cluster 缺点 Galera Cluster工作过程 Gale ...
随机推荐
- maven正确的集成命令-U -B 等
在持续集成服务器上使用怎样的 mvn 命令集成项目,这个问题乍一看答案很显然,不就是 mvn clean install 么?事实上比较好的集成命令会稍微复杂些,下面是一些总结: 不要忘了clean: ...
- 【AtCoder】AGC020
A - Move and Win 题解 看两个人相遇的时候谁先手即可,相遇之后第一个移动的人必输 代码 #include <bits/stdc++.h> #define fi first ...
- 【LOJ】#2527. 「HAOI2018」染色
题解 简单容斥题 至少选了\(k\)个颜色恰好出现\(S\)次方案数是 \(F[k] = \binom{M}{k} \frac{N!}{(S!)^{k}(N - i * S)!}(M - k)^{N ...
- 【noip模拟赛3】确定的位置 (map的遍历 位置原理)
描述 hzy很喜欢了解歌曲的排行榜,他每次都从XX网站获知. 由于这个网站想对这个歌曲的排行榜含蓄的告诉大家,组织了一个“猜榜大赛”. 这个网站宣布一些歌曲的信息,那些歌曲在歌曲榜上的前几名 例如: ...
- Python基础笔记(三)
1. 循环与流程控制 (1) for myList1 = ["A", "B", "C", "D"] # 正序遍历 for ...
- BZOJ2330 SCOI2011糖果
复习了一波差分约束. http://blog.csdn.net/my_sunshine26/article/details/72849441 构图方式记住就好. 本题要倒序插入否则会被卡. #incl ...
- ==与equals与hashCode的区别联系。
前言:对于引用类型的变量,它涉及到两块内存,一块是堆中的内存,用于存放new出来的对象(就是对象的具体内容):另一块是栈内存,用来存放变量在堆内存中的地址. 1,“==” 判断两个变量是否是同一个变量 ...
- HDU 5832 A water problem 水题
A water problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named H ...
- 自己封装jquery的一些方法 链式调用模式
function getIndex(ele){ var parent=ele.parentNode; var brothers=parent.children; for(var i=0,len=bro ...
- 【Go命令教程】12. go tool pprof
我们可以使用 go tool pprof 命令来交互式的访问概要文件的内容.命令将会分析指定的概要文件,并会根据我们的要求为我们提供高可读性的输出信息. 在 Go 语言中,我们可以通过标准库的代码包 ...