You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
It will require fix in vitess. So far, we get from vitess:
// INVALID_ARGUMENT indicates client specified an invalid argument.// Note that this differs from FAILED_PRECONDITION. It indicates arguments// that are problematic regardless of the state of the system// (e.g., a malformed file name).Code_INVALID_ARGUMENTCode=3
Looks that vitess doesn't support SubstrExpr for static strings (only column names), so the fix is not super trivial just by updating vitess lexer but it will require changes in ast (by adding a new StaticSubstrExpr type or by extending current one SubstrExpr), then update lexer generator after that implement it in go-mysql-server parser.
PR: vitessio/vitess#4350
But it will also require changes in /go-mysql-server.v0/sql/parse/parse.go by adding to func exprToExpression(e sqlparser.Expr):
case*sqlparser.SubstrExpr:
var (
name sql.Expressionerrerror
)
ifv.Name!=nil {
name, err=exprToExpression(v.Name)
} else {
name, err=exprToExpression(v.StrVal)
}
//...
I'm trying to implement #483 but it looks like we broke substring. The unit tests run fine but when we login into a console it doesn't work.
The text was updated successfully, but these errors were encountered: