SQLStore: Improve recursive CTE support detection (#86397)

sqlstore: improve recursive CTE support detection

Vitess returns a not supported error, not a parse error

Co-authored-by: Derek Perkins <derek@nozzle.io>
This commit is contained in:
Kristin Laemmert 2024-04-17 08:37:47 -04:00 committed by GitHub
parent 1ffe858e06
commit 03b795844c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,7 +382,7 @@ func (ss *SQLStore) RecursiveQueriesAreSupported() (bool, error) {
}); err != nil {
var driverErr *mysql.MySQLError
if errors.As(err, &driverErr) {
if driverErr.Number == mysqlerr.ER_PARSE_ERROR {
if driverErr.Number == mysqlerr.ER_PARSE_ERROR || driverErr.Number == mysqlerr.ER_NOT_SUPPORTED_YET {
return false, nil
}
}