SQL Expressions: Allow substring_index func (#103021)

This commit is contained in:
Kyle Brandt
2025-03-27 16:49:21 -04:00
committed by GitHub
parent 98a1dfbad4
commit e6480a050c
2 changed files with 6 additions and 1 deletions

View File

@ -62,6 +62,11 @@ func TestAllowQuery(t *testing.T) {
q: `SELECT 'some text' COLLATE utf8mb4_bin`,
err: nil,
},
{
name: "allow substring_index",
q: `SELECT __value__, SUBSTRING_INDEX(name, '.', -1) AS code FROM A`,
err: nil,
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {