{"id":19989033,"url":"https://github.com/icemap/tidb-proxysql-integration-test","last_synced_at":"2026-06-02T20:31:41.619Z","repository":{"id":43027842,"uuid":"511002078","full_name":"Icemap/tidb-proxysql-integration-test","owner":"Icemap","description":"Integration test by ProxySQL with TiDB.","archived":false,"fork":false,"pushed_at":"2022-11-15T11:04:09.000Z","size":675,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T21:42:51.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Icemap.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-06T05:35:01.000Z","updated_at":"2022-07-06T07:26:43.000Z","dependencies_parsed_at":"2023-01-22T19:45:36.941Z","dependency_job_id":null,"html_url":"https://github.com/Icemap/tidb-proxysql-integration-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Icemap/tidb-proxysql-integration-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-proxysql-integration-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-proxysql-integration-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-proxysql-integration-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-proxysql-integration-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icemap","download_url":"https://codeload.github.com/Icemap/tidb-proxysql-integration-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftidb-proxysql-integration-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33835766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:45:12.735Z","updated_at":"2026-06-02T20:31:41.600Z","avatar_url":"https://github.com/Icemap.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TiDB 与 ProxySQL 的集成测试\n\n[English](/README.md) | **_中文_**\n\n如果你不需要进行集成测试，仅对集成方案感兴趣，可以阅读 [手把手教你集成 TiDB 和 ProxySQL](/step-by-step-integration-zh.md)。\n\n## 目的\n\n找出 [TiDB](https://docs.pingcap.com/tidb/stable/dev-guide-overview) 与 [ProxySQL](https://proxysql.com/) 使用时的不兼容特性。\n\n## 搭建方案\n\n使用 TiDB 当前集成测试流水线中的[测试用例](https://github.com/pingcap/tidb-test)。将 **TiDB 与 ProxySQL** 当成是**原生的 TiDB** 来测试。以此来找出特性不兼容的部分。\n\n![build way](/doc-assert/test_build_way.png)\n\n## 依赖\n\n- 测试用例代码仓库 [tidb-test](https://github.com/pingcap/tidb-test) 的权限\n- 测试机器需连接网络\n- Golang SDK\n- Git\n- 以下两者其一：\n    1. 本地启动（请在\"运行\"一节中使用[本地启动](#本地启动)）\n\n        - CentOS 7 机器（可为实体机或虚拟机）\n        - Yum\n        \n    2. Docker 启动（请在\"运行\"一节中使用[Docker 启动](#docker-启动)）\n\n        - Docker\n        - Docker Compose\n\n## 运行\n\n### 本地启动\n\n1. 安装、启动、配置 ProxySQL：\n\n```sh\n./proxysql-initial.sh\n```\n\n2. 下载测试代码、编译测试程序、编译 TiDB 程序、运行测试用例：\n\n```sh\n./test-local.sh\n```\n\n### Docker 启动\n\n使用 Docker Compose 启动并配置 ProxySQL 与 TiDB 的容器，运行测试用例：\n\n```sh\n./test-docker.sh\n```\n\n## 预期输出\n\n[输出文件](/doc-assert/test.out)\n\n## 已知不兼容特性\n\n当前跳过了一些测试用例，见 [run-test.sh](https://github.com/Icemap/tidb-proxysql-integration-test/blob/main/run-test.sh#L12-L25)。\n\n这是因为 TiDB 与 ProxySQL 的一些不兼容特性导致的（除 `legency` 标注的测试用例，这是为了和 CI 流水线中跳过的测试用例保持一致）：\n\n- 涉及 `CREATE USER` 语句: TiDB 和 ProxySQL 使用不同的用户管理方式，TiDB 使用 `CREATE USER` 语句，而 ProxySQL 使用 admin interface (在另一个端口上)。\n- 设置的排序方式与字符集不匹配时：TiDB 不报错，ProxySQL 报错。\n    \n    - 例如：`Error 1253: COLLATION 'latin1_bin' is not valid for CHARACTER SET 'utf8mb4'`\n\n- ProxySQL 不支持 `LOAD STATS`、`LOAD DATA LOCAL INFILE` 等读取文件语句。\n- 在列涉及二义性时：TiDB 不报错，ProxySQL 报错。\n\n    - 例如：`Error 1052: Column 'a' in field list is ambiguous`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftidb-proxysql-integration-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficemap%2Ftidb-proxysql-integration-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftidb-proxysql-integration-test/lists"}