MySql教程

【mysql MTR】MTR's internal check of the test case 'xxx' failed的解决方法

本文主要是介绍【mysql MTR】MTR's internal check of the test case 'xxx' failed的解决方法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

(1)报错信息如下

[root@dev mysql-test]# ./mtr --suite=tianmu dropdb.test --force
Logging: ./mtr  --suite=tianmu dropdb.test --force
MySQL Version 5.7.36
Checking supported features...
 - SSL connections supported
Collecting tests...
Checking leftover processes...
Removing old var directory...
Creating var directory '/data/stonedb57/install/mysql-test/var'...
Installing system database...
Using parallel: 1
==============================================================================
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
[ 50%] tianmu.dropdb                            [ pass ]     16
#############报错信息如下###############
MTR's internal check of the test case 'tianmu.dropdb' failed.
This means that the test case does not preserve the state that existed
before the test case was executed.  Most likely the test case did not
do a proper clean-up. It could also be caused by the previous test run
by this thread, if the server wasn't restarted.
This is the diff of the states of the servers before and after the
test case was executed:
mysqltest: Logging to '/data/stonedb57/install/mysql-test/var/tmp/check-mysqld_1.log'.
mysqltest: Results saved in '/data/stonedb57/install/mysql-test/var/tmp/check-mysqld_1.result'.
mysqltest: Connecting to server localhost:13000 (socket /data/stonedb57/install/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: ... Done processing test commands.
Binary files /data/stonedb57/install/mysql-test/var/tmp/check-mysqld_1.result and /data/stonedb57/install/mysql-test/var/tmp/check-mysqld_1.reject differ
mysqltest: Result content mismatch

not ok
safe_process[31443]: Child process: 31444, exit: 1
[100%] shutdown_report                          [ pass ]       
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.016 of 19 seconds executing testcases
Check of testcase failed for: tianmu.dropdb
Completed: All 2 tests were successful.

(2)问题分析

根据自己的判定,这些内容应全部执行成功,但是在运行的时候出现了如上的报错,经过分析得出结果:

一般情况下mtr是启动自己的MySQL服务来进行测试,如果在启动时指定参数—extern,则可以使用指定的MySQL服务进行测试;

(3)解决方法

在运行的脚本中添加上自己数据库的服务器相关信息,即可看到运行成功

./mtr --extern host=192.168.30.45 --extern port=3306 --extern user=root --extern password="123456" --suite=tianmu --force dropdb.test

得出结果如下,可看到问题已被解决

Logging: ./mtr  --extern host=192.168.30.45 --extern port=3306 --extern user=root --extern password=123456 --suite=tianmu --force dropdb.test
mysql: [Warning] Using a password on the command line interface can be insecure.
MySQL Version 5.7.36
Checking supported features...
 - SSL connections supported
Collecting tests...
Using parallel: 1

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
[ 50%] tianmu.dropdb                            [ pass ]     17
[100%] shutdown_report                          [ pass ]       
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.017 of 1 seconds executing testcases

Completed: All 2 tests were successful.

 

这篇关于【mysql MTR】MTR's internal check of the test case 'xxx' failed的解决方法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!