mysql_client_test is the test cases in mysql repository. It's used to test both the server and the client(libmysql) implementation. As a MySQL-compatible database, I think it'd be better to pass all these tests. It can enrich our test cases on protocol layer.
Unfortunately, tons of the test cases have failed. They can be concluded in the following areas (except known unsupported features):
Cursor. About the server status, behavior, ...
ComFieldList. The type and length of a field is usually different from the expectation of the tests. I'm not sure whether it's expected.
The count of warning is unexpected. (Though, I think this problem is not serious, right?).
See the testclients/mysql_client_test.cc, and find "TODO" in it. Several lines are commented out with "TODO: need fix", which means this test case cannot pass on TiDB.
Uncomment any one of them, and compile the target mysql_client_test. Assume the location of mysql_client_test binary is at ./cmake-build-mysql/runtime_output_directory/mysql_client_test
Run MYSQL_TEST_DIR=$(pwd)/mysql-test ./cmake-build-mysql/runtime_output_directory/mysql_client_test -P 4000 -h 127.0.0.1 -u root, you'll see the error output.
For example, if I uncommented test_func_fields, I'll get:
test_bug33781442 Don't need to fix. Because TiDB and MySQL returns the aggregation of BIT columns in different format (TiDB in Binary, and MySQL in text). Both are fine for a standard client. See https://bugs.mysql.com/bug.php?id=67225
Bug Report
0. Background
mysql_client_test
is the test cases in mysql repository. It's used to test both the server and the client(libmysql) implementation. As a MySQL-compatible database, I think it'd be better to pass all these tests. It can enrich our test cases on protocol layer.Unfortunately, tons of the test cases have failed. They can be concluded in the following areas (except known unsupported features):
ComFieldList
. The type and length of a field is usually different from the expectation of the tests. I'm not sure whether it's expected.1. Minimal reproduce step (Required)
git clone https://github.com/YangKeao/mysql-server.git -b known-bugs
testclients/mysql_client_test.cc
, and find "TODO" in it. Several lines are commented out with "TODO: need fix", which means this test case cannot pass on TiDB.mysql_client_test
. Assume the location ofmysql_client_test
binary is at./cmake-build-mysql/runtime_output_directory/mysql_client_test
MYSQL_TEST_DIR=$(pwd)/mysql-test ./cmake-build-mysql/runtime_output_directory/mysql_client_test -P 4000 -h 127.0.0.1 -u root
, you'll see the error output.For example, if I uncommented
test_func_fields
, I'll get:2. What did you expect to see? (Required)
All tests passed (except those which are known to be unsupported, like procedure, unsupported character set (utf8mb3) and other features).
3. What did you see instead (Required)
A lot of tests failed.
test_bug33781442Don't need to fix. Because TiDB and MySQL returns the aggregation of BIT columns in different format (TiDB in Binary, and MySQL in text). Both are fine for a standard client. See https://bugs.mysql.com/bug.php?id=672254. What is your TiDB version? (Required)
001319087533872677fff8bd1bf708ba0e5eafe6