Skip to content

Commit 9baa293

Browse files
author
James Cor
committed
Merge branch 'main' into james/proc
2 parents a14047c + be58f51 commit 9baa293

39 files changed

+1723
-1299
lines changed

enginetest/queries/imdb_plans.go

Lines changed: 113 additions & 113 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/index_query_plans.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/information_schema_queries.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,18 @@ var InfoSchemaScripts = []ScriptTest{
874874
},
875875
},
876876
},
877+
{
878+
Name: "issue 8930: connect to info schema",
879+
SetUpScript: []string{
880+
"use information_schema",
881+
},
882+
Assertions: []ScriptTestAssertion{
883+
{
884+
Query: "SELECT C.COLUMN_NAME AS label, 'connection.column' as \"type\", C.TABLE_NAME AS \"table\", C.DATA_TYPE AS \"dataType\", CAST(C.CHARACTER_MAXIMUM_LENGTH AS UNSIGNED) AS size, CAST(UPPER( CONCAT( C.DATA_TYPE, CASE WHEN C.DATA_TYPE = 'text' THEN '' ELSE ( CASE WHEN C.CHARACTER_MAXIMUM_LENGTH > 0 THEN ( CONCAT('(', C.CHARACTER_MAXIMUM_LENGTH, ')') ) ELSE '' END ) END ) ) AS CHAR CHARACTER SET utf8) AS \"detail\", C.TABLE_CATALOG AS \"catalog\", C.TABLE_SCHEMA AS \"database\", C.TABLE_SCHEMA AS \"schema\", C.COLUMN_DEFAULT AS \"defaultValue\", C.IS_NULLABLE AS \"isNullable\", (CASE WHEN C.COLUMN_KEY = 'PRI' THEN 1 ELSE 0 END) AS \"isPk\", (CASE WHEN KCU.REFERENCED_COLUMN_NAME IS NULL THEN 0 ELSE 1 END) AS \"isFk\" FROM INFORMATION_SCHEMA.COLUMNS AS C LEFT JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU ON ( C.TABLE_NAME = KCU.TABLE_NAME AND C.TABLE_SCHEMA = KCU.TABLE_SCHEMA AND C.TABLE_CATALOG = KCU.TABLE_CATALOG AND C.COLUMN_NAME = KCU.COLUMN_NAME ) JOIN INFORMATION_SCHEMA.TABLES AS T ON C.TABLE_NAME = T.TABLE_NAME AND C.TABLE_SCHEMA = T.TABLE_SCHEMA AND C.TABLE_CATALOG = T.TABLE_CATALOG WHERE C.TABLE_SCHEMA = 'dev' AND C.TABLE_NAME = 'countries' AND C.TABLE_CATALOG = 'def' ORDER BY C.TABLE_NAME, C.ORDINAL_POSITION",
885+
Expected: []sql.Row{},
886+
},
887+
},
888+
},
877889
{
878890
Name: "query does not use optimization rule on LIKE clause because info_schema db charset is utf8mb3",
879891
SetUpScript: []string{

enginetest/queries/integration_plans.go

Lines changed: 508 additions & 532 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/queries.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6616,6 +6616,14 @@ SELECT * FROM cte WHERE d = 2;`,
66166616
Query: "select abs(-i) from mytable order by 1",
66176617
Expected: []sql.Row{{1}, {2}, {3}},
66186618
},
6619+
{
6620+
Query: "select distinct abs(c5) as a from one_pk where c2 in (1,11,31) order by a",
6621+
Expected: []sql.Row{{4}, {14}, {34}},
6622+
},
6623+
{
6624+
Query: "select distinct abs(c5) as a from one_pk order by a",
6625+
Expected: []sql.Row{{4}, {14}, {24}, {34}},
6626+
},
66196627
{
66206628
Query: "select ceil(i + 0.5) from mytable order by 1",
66216629
Expected: []sql.Row{{"2"}, {"3"}, {"4"}},

enginetest/queries/query_plans.go

Lines changed: 178 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/sysbench_plans.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/tpcc_plans.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)