diff --git a/config.json b/config.json index fb72cec..4a8cc01 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "dbms_list": ["mysql", "postgres", "sqlite"], + "dbms_list": ["mysql", "postgres", "sqlite", "tidb"], "dbms": "mysql", "container_name": "mysql-custom", "image": "mysql-custom", diff --git a/tidb/Dockerfile b/tidb/Dockerfile new file mode 100644 index 0000000..a9f764f --- /dev/null +++ b/tidb/Dockerfile @@ -0,0 +1,25 @@ + + FROM golang:1.23 AS builder + + ARG TIDB_VERSION=master + ENV TIDB_VERSION=${TIDB_VERSION} + + WORKDIR /go/src/github.com/pingcap + + + RUN git clone --depth=1 --branch=${TIDB_VERSION} https://github.com/pingcap/tidb.git + + WORKDIR /go/src/github.com/pingcap/tidb + + + RUN make + + + FROM debian:bookworm-slim + + WORKDIR /tidb + COPY --from=builder /go/src/github.com/pingcap/tidb/bin/tidb-server . + + EXPOSE 4000 + ENTRYPOINT ["./tidb-server"] + \ No newline at end of file diff --git a/tidb/__init__.py b/tidb/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tidb/config.json b/tidb/config.json new file mode 100644 index 0000000..40c5b15 --- /dev/null +++ b/tidb/config.json @@ -0,0 +1,13 @@ +{ + "embedded": "no", + "dbms": "tidb", + "image": "pingcap/tidb:nightly", + "container_name": "tidb-sqlancer", + "port": 4000, + "username": "root", + "password": "", + "oracle": "WHERE", + "num_threads": 4, + "timeout_seconds": 60 + } + \ No newline at end of file