diff --git a/regression-test/suites/check_before_quit/check_before_quit.groovy b/regression-test/suites/check_before_quit/check_before_quit.groovy index 7b097b58cd23c6..f507fddeaa583b 100644 --- a/regression-test/suites/check_before_quit/check_before_quit.groovy +++ b/regression-test/suites/check_before_quit/check_before_quit.groovy @@ -237,5 +237,31 @@ suite("check_before_quit", "nonConcurrent,p0") { Thread.sleep(2000) } + + // check create table sql + List> allDataBases = sql "show databases;" + logger.info("show all databases: ${allDataBases}") + + def num = allDataBases.size() + + for (int i = 0; i < allDataBases.size(); i++) { + def db = allDataBases[i][0] + if (db == "__internal_schema" || db == "information_schema" || db == "mysql") { + continue + } + List> allTables = sql "show tables from ${db}" + logger.info("show all tabkes: ${allTables}") + for (int j = 0;j < allTables.size();j ++) { + def tbl = allTables[j][0] + def createTableSql = sql "show create table ${db}.${tbl}" + logger.info("create table sql info: ${createTableSql}") + sql "drop table if exists ${tbl}" + sql(createTableSql[0][1]) + def createTableSqlResult = sql "show create table ${tbl}" + logger.info("create table sql result info: ${createTableSqlResult}") + assertEquals(createTableSqlResult, createTableSql) + } + } + assertTrue(clear) }