mysqltest执行失败排查

之前咨询过 mysqltest 的问题,社区版提交pr 前自测与 mysqltest 测试问题

最新的mysqltest 目录中的测试案例,使用最新社区版OBD(1.5.0) 和 Oceanbase的代码(gitee commitid: 4ad6e00),执行case 大部分都 FAILED(Result (Total 163, Passed 45, Failed 118) ),貌似还是不可用状态?

例如,如下错误需要如何排查?./var/log/px_basic.log 中也只是部分SQL语句

[ RUN ]Running case: static_engine.px_basic ( 1 / 163 ) x
– local execute: obclient -h10.144.3.151 -P12881 -uroot -A -Doceanbase -e “select value from __all_virtual_sys_parameter_stat where name like ‘_enable_static_typing_engine’;” – exited code 0
– query engine result: value
True
True
True

– local execute: timeout 3600 /u01/obclient/bin/mysqltest --host=10.144.3.151 --port=12881 --tmpdir=./tmp --logdir=./var/log --silent --user=admin@mysql --password=admin --database=test --timer-file=./var/log/timer --test-file=./mysql_test/test_suite/static_engine/t/px_basic.test --tail-lines=20 --result-file=./mysql_test/test_suite/static_engine/r/mysql/px_basic.result

– exited code 1
mysqltest: At line 85: Version format 4 has not yet been implemented

The result from queries just before the failure was:
< snip >
insert into t5 values(4,4);
insert into t5 values(5,5);
insert into t5 values(6,6);
commit;
create table t1(c1 int,c2 int) partition by hash(c1) partitions 5;
create table t2(c1 int,c2 int) partition by hash(c2) partitions 6;
insert into t1 values(1,1);
insert into t1 values(2,2);
insert into t1 values(3,3);
insert into t1 values(4,4);
insert into t1 values(5,5);
insert into t1 values(6,6);
insert into t2 values(1,1);
insert into t2 values(2,2);
insert into t2 values(3,3);
insert into t2 values(4,4);
insert into t2 values(5,5);
insert into t2 values(6,6);
commit;
connection syscon;

More results from queries before failure can be found in ./var/log/px_basic.log

[ FAILED ]static_engine.px_basic peihan.dph ( 4.477835 s )

有关这个错误信息

– exited code 1
mysqltest: At line 85: Version format 4 has not yet been implemented

查阅了一下 mysql test framework 官网文档,以及 mysqltest 源码,发现 mysqltest 只支持--result_format 1 或者 --result_format 2
https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_COMMANDS.html

  • result_format version
    Set the format to the specified version, which is either 1 for the current, default behavior, or to 2 which is an extended alternative format. The setting is in effect until it is changed or until the end of the test.
    In format version 2, empty lines and indentation in the test file are preserveded in the result. Also, comments indicated by a double ## are copied verbatim to the result. Comments using a single # are not copied. Format version 2 makes it easier for humans to read the result output, but at the cost of somewhat larger files due to the white space and comments.
    –result_format 2

但是在当前的 ob mysqltest px_basic.test等文件中,大量使用了
``–result_format 4` 选项,请问哪个版本的 mysqltest 可以支持这个参数?

这个是mysqltest的二进制版本不是最新的,可以更新obclient,获取最新的mysqltest可执行文件

1 个赞

好的我去试下,多谢

直接下载最新obclient v2.2.0 后执行 sudo rpm -ivh 安装,提示与旧版本冲突,需要使用OBD 升级 obclient 吗?obd update 没找到升级 obclient 的命令…

可以先用rpm -e把旧版本卸载了,然后再装新版本;

1 个赞