Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DAT-19188] Adding TiDB to Test Harness #976

Merged
merged 13 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ on:
"firebird-4",
"db2-luw",
"informix-12.10",
"informix-14.10"
"informix-14.10",
"ti-db-mysql"
]

jobs:
Expand All @@ -123,7 +124,7 @@ jobs:
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","postgres-17","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1",
"edb-postgres-12","edb-postgres-13","edb-postgres-14","edb-postgres-15","edb-postgres-16",
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw","informix-12.10","informix-14.10"]' }}
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw","informix-12.10","informix-14.10","ti-db-mysql"]' }}
testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }}
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="1" author="as">
<setColumnRemarks columnName="first_name"
remarks="A Test Column Remark"
tableName="authors"
columnDataType="varchar(50)"/>
<rollback>
<setColumnRemarks columnName="first_name"
remarks=""
tableName="authors"
columnDataType="varchar(50)"/>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="1" author="as">
<setTableRemarks remarks="A Test Remark"
tableName="authors"/>
<rollback>
<sql>ALTER TABLE authors COMMENT = ''</sql>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "1\\!\\{java.lang.Integer\\}",
"name": "booleanColumn",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "CURRENT_TIMESTAMP\\!\\{liquibase.statement.DatabaseFunction\\}",
"name": "inserted_date",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.View": [
{
"view": {
"definition": "SELECT `id` AS `id`,`first_name` AS `first_name`,`last_name` AS `last_name`,`email` AS `email` FROM `test`.`authors`",
"name": "test_view"
}
}]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "authors"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "first_name",
"remarks": "A Test Column Remark"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- TiDB does not support modifying an existing column to add the AUTO_INCREMENT property
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- Bug on Liquibase side: Change Type 'pro:addCheckConstraint' is not allowed for MySQL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- Bug on Liquibase side: Database mysql does not support sequences
-- https://docs.pingcap.com/tidb/stable/sql-statement-create-sequence
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not yet support the CREATE TABLE ... SELECT syntax
-- https://ask.pingcap.com/t/tidb-create-table-select-is-not-implemented-yet/3085
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- Bug on Liquibase side: Liquibase updates Sequence but it does not created on db
-- Also related to addDefaultValueSequenceNext.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support user-defined functions
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- TiDB does not support package
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- TiDB does not support package body
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support stored procedures.
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support stored procedures
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- Bug on Liquibase side: Liquibase updates Sequence but it does not created on db
-- Also related to addDefaultValueSequenceNext.sql,alterSequence.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support triggers
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- Bug on Liquibase side: Change Type 'pro:addCheckConstraint' is not allowed for MySQL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support triggers
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- Bug on Liquibase side: Change Type 'pro:addCheckConstraint' is not allowed for MySQL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support user-defined functions
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support stored procedures.
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support triggers
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INVALID TEST

-- Bug on Liquibase side: Change Type 'pro:addCheckConstraint' is not allowed for MySQL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support triggers
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support the RENAME SEQUENCE statement directly
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INVALID TEST

-- TiDB does not support triggers
-- https://docs.pingcap.com/tidb/stable/mysql-compatibility
3 changes: 3 additions & 0 deletions src/test/resources/automation-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,8 @@ case $db in
"informix-14.10")
test_command mvn -ntp -Dtest=$tc -DdbName=informix -DdbVersion=14 test
;;
"tidb")
test_command mvn -ntp -Dtest=$tc -DdbName=tidb test
;;
esac

4 changes: 4 additions & 0 deletions src/test/resources/harness-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,7 @@ databasesUnderTest:
username: informix
password: in4mix

- name: ti-db-mysql
prefix: docker
url: jdbc:mysql://localhost:4000/test
username: root
Loading