--replace_regex /pattern/replacement/[i] ... example: --replace_regex /.*mysql.*// 这样下一行语句的实际输出中就没有包含“mysql”的行,对应的修改预期结果即可。 忽略日志的warning和error 加命令行参数--nowarnings。 忽略日志的某些输出 call mtr.add_suppression("The table 't[0-9]*' is full"...
mysql-test-run.pl:perl 脚本,简称 mtr,是 MySQL 最常用的测试工具,负责控制流程,包括启停、识别执行哪些用例、创建文件夹、收集结果等等,主要作用是验证 SQL 语句在各种场景下是否返回正确的结果。 mysqltest:C++二进制程序,负责执行测试用例,包括读文件、解析特定语法、执行用例。用例的特殊语法(比如,--source,-...
以前对 MySQL 测试框架 MTR 的使用,主要集中于 SQL 正确性验证。近期由于工作需要,深入了解了 MTR 的方方面面,发现 MTR 的能力不仅限于此,还支持单元测试、压力测试、代码覆盖率测试、内存错误检测、线程竞争与死锁等功能,因此,本着分享的精神,将其总结成一个系列。
replace_numeric_round precision replace_regex /pattern/replacement/[i] ... replace_result from_val to_val [from_val to_val] ... # 连接 ping reset_connection dirty_close connection_name send_quit connection send_shutdown shutdown_server [timeout] sync_slave_with_master [connection_name] # ...
dbkernel 33声望7粉丝 目前从事云数据库MySQL数据库内核研发工作,曾做过Postgres-XC、Greenplum等分布式数据库的内核开发。热衷于研究主流数据库架构、源码,对关系型数据库 MySQL/PostgreSQL及分布式数据库有深入研究。 « 上一篇 源码分析 | MySQL测试框架 MTR 系列教程(三):源码篇 ...
*/ run_query(cur_con, command, QUERY_SEND_FLAG); // 执行查询 command_executed++; command->last_argument = command->end; break; case Q_ERROR: do_error(command); break; case Q_REPLACE: do_get_replace(command); break; case Q_REPLACE_REGEX: do_get_replace_regex(command); break; case...
memo_push() : mtr_t memo_release() : mtr_t memory() : mysql_harness::SecureMemoryPool::Bucket< Strategy > memory_block_read_cost() : SE_cost_constants Memory_resource() : mysql::allocators::Memory_resource memory_source_type() : temptable::Header memory_temptable_create_cost() : Serv...
string) = '$old_auth_str' FROM mysql.user WHERE user LIKE 'user1' # [KH] replacetest #--replace_regex /AS '(.*)' REQUIRE/AS '<non-deterministic-password-hash>' REQUIRE/ --replace_regex / = '(.*)'FROM/ = '<non-deterministicpassword-hash>' FROM/ --let $post_binlog_...
For example: shell> export MTR_BUILD_THREAD=31 shell> ./mysql-test-run.pl [options] [test_name] mysql-test-run.pl defines several environment variables. Some of them are listed in the following table. +---+---+ |Variable | Meaning | +---+---+ |MYSQL_TEST | Path name to mysql...
To runmysql-test-run.plon Windows, you'll need either Cygwin or ActiveState Perl to run it. You may also need to install the modules required by the script. To run the test script, change location into themysql-testdirectory, set theMTR_VS_CONFIGenvironment variable to the configuration yo...