pingcap / pingcap/tidb

56 cases of `mysql_client_test` failed

Open
#44,672 2 comments 1 reaction 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

### 0. Background

`mysql_client_test` is the test cases in [mysql repository](https://github.com/YangKeao/mysql-server/tree/known-bugs/testclients). 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):

1. Cursor. About the server status, behavior, ...
2. `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.
3. The count of warning is unexpected. (Though, I think this problem is not serious, right?).
4. Others...

### 1. Minimal reproduce step (Required)

1. `git clone https://github.com/YangKeao/mysql-server.git -b known-bugs`
5. 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.
6. 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`
7. 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:

```
#####################################
25 of (1/1): test_func_fields
#####################################

table name: `test_dateformat` (expected: `test_dateformat`)
table name: `` (expected: ``)
field name: `YEAR` (expected: `YEAR`)
field org name: `YEAR` (expected: ``)/home/yangkeao/Downloads/mysql-server/testclients/mysql_client_test.cc:4767: check failed: 'field->org_name[0] == '\0''
```

### 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.

- [x] test_func_fields https://github.com/pingcap/tidb/issues/45145
- [ ] test_select_show
- [x] test_time_zone https://github.com/pingcap/tidb/issues/45144
- ~~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
- [ ] test_simple_temporal https://github.com/pingcap/tidb/issues/45190
- [ ] test_temporal_param https://github.com/pingcap/tidb/issues/45190#issuecomment-1691174628
- [ ] test_date_date https://github.com/pingcap/tidb/issues/31648
- [ ] test_date_time https://github.com/pingcap/tidb/issues/31648
- [ ] test_date_ts https://github.com/pingcap/tidb/issues/31648
- [ ] test_date_dt https://github.com/pingcap/tidb/issues/31648
- [ ] test_field_misc
- [ ] test_explain_bug https://github.com/pingcap/tidb/issues/46402
- [ ] test_truncated_rows
- [ ] test_list_fields
- [ ] test_bug1500
- [ ] test_subqueries
- [ ] test_create_drop
- [ ] test_bug4079
- [ ] test_datetime_ranges
- [ ] test_bug4172
- [ ] test_conversion
- [x] test_basic_cursors, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_cursors_with_union, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_cursor_for_show, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_bug9478, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_bug11111, fix in https://github.com/pingcap/tidb/pull/45163
- [ ] test_bug9992
- [ ] test_bug9735
- [x] test_bug11904, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_bug13524, fix in https://github.com/pingcap/tidb/pull/45163
- [ ] test_bug15510
- [ ] test_bug15613
- [ ] test_mysql_insert_id
- [ ] test_bug19671
- [x] test_bug32265, fix in https://github.com/pingcap/tidb/pull/45163
- [ ] test_bug21635
- [ ] test_bug29306
- [ ] test_bug20023
- [ ] test_bug36004
- [ ] test_wl4284_1
- [ ] test_bug54041
- [ ] test_bug57058
- [ ] test_bug56976
- [ ] test_wl5928
- [ ] test_bug20645725
- [ ] test_bug21293012
- [ ] test_wl8754
- [ ] test_skip_metadata
- [ ] test_limit_syntax
- [ ] test_bug30032302
- [ ] test_wl13510
- [ ] test_wl13510_multi_statements
- [ ] test_bug32915973
- [ ] test_wl13128
- [ ] test_bug25584097
- [x] test_bug41078, fix in https://github.com/pingcap/tidb/pull/45163
- [x] test_bug25701141, fix in https://github.com/pingcap/tidb/pull/45163

### 4. What is your TiDB version? (Required)

001319087533872677fff8bd1bf708ba0e5eafe6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.