Skip to content

Icemap/tidb-proxysql-integration-test

Repository files navigation

TiDB With ProxySQL Integration Test

English | 中文

If you don't need to run integration testing and are only interested in the integration solution, you can read Integration TiDB with ProxySQL step by step.

Objective

Figure out the incompatible features of TiDB when used with ProxySQL.

Build Solution

Use the test case, which is also used in TiDB's CI pipeline. In this test case, I'm trying to treat ProxySQL with TiDB as pure TiDB to figure out the incompatible features.

build way

Dependency

  • Permissions for the tidb-test code repository tidb-test

  • The machine needs to be connected to the network

  • Golang SDK

  • Git

  • One of the following:

    1. Local Startup (Please use Local Startup in the "Run" section.)

      • CentOS 7 machine (can be a physical or virtual machine)
      • Yum
    2. Docker Startup (Please use Docker Startup in the "Run" section.)

      • Docker
      • Docker Compose

Run

Local Startup

  1. Installation, startup, configuration ProxySQL:
./proxysql-initial.sh
  1. Download test code, compile test programs, compile TiDB programs, run test cases:
./test-local.sh

Docker Startup

Use Docker Compose to start and configure a container of ProxySQL with TiDB, and run the test case:

./test-docker.sh

Expected output

Output File

Incompatible features

Some test cases are skipped, see run-test.sh.

This is caused by some incompatible features between TiDB and ProxySQL (except for the test cases marked with legency, which are consistent with the test cases skipped in the CI flow):

  • Related to the CREATE USER statement: TiDB and ProxySQL use different user management methods, TiDB uses the CREATE USER statement and ProxySQL uses the admin interface (on a different port).

  • When the set COLLATION does not match the CHARACTER SET: TiDB doesn't report an error, but ProxySQL does.

    • e.g.: Error 1253: COLLATION 'latin1_bin' is not valid for CHARACTER SET 'utf8mb4'
  • ProxySQL does not support LOAD STATS, LOAD DATA LOCAL INFILE, and other load file statements.

  • When column is ambiguous:TiDB doesn't report an error, but ProxySQL does.

    • e.g.: Error 1052: Column 'a' in field list is ambiguous

About

Integration test by ProxySQL with TiDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages