Skip to content

Commit 64bf553

Browse files
Ajit Pratap Singhclaude
authored andcommitted
fix(dialect): reduce MariaDB CONNECT BY hint weight to 2 so Oracle wins pure CONNECT BY queries
Oracle's CONNECT BY weight is 3; MariaDB's was also 3, causing a tie broken by non-deterministic map iteration. Reducing MariaDB to weight 2 ensures Oracle wins when CONNECT BY is the only hint. MariaDB is still correctly detected when its unique high-weight hints (NEXTVAL, FOR SYSTEM_TIME, etc.) are present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4f5d0fb commit 64bf553

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/sql/keywords/detect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var dialectHints = []dialectHint{
8585
{pattern: "SYSTEM VERSIONING", dialect: DialectMariaDB, weight: 5},
8686
{pattern: "FOR SYSTEM_TIME", dialect: DialectMariaDB, weight: 5},
8787
{pattern: "VERSIONING", dialect: DialectMariaDB, weight: 4},
88-
{pattern: "CONNECT BY", dialect: DialectMariaDB, weight: 3},
88+
{pattern: "CONNECT BY", dialect: DialectMariaDB, weight: 2},
8989
{pattern: "CREATE SEQUENCE", dialect: DialectMariaDB, weight: 5},
9090
{pattern: "DROP SEQUENCE", dialect: DialectMariaDB, weight: 5},
9191

0 commit comments

Comments
 (0)