Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tuples and InOp implementation to EvalEngine #9281

Merged
merged 9 commits into from
Nov 24, 2021
1 change: 1 addition & 0 deletions go/mysql/sql_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ var stateToMysqlCode = map[vterrors.State]struct {
vterrors.CantDoThisInTransaction: {num: ERCantDoThisDuringAnTransaction, state: SSCantDoThisDuringAnTransaction},
vterrors.RequiresPrimaryKey: {num: ERRequiresPrimaryKey, state: SSClientError},
vterrors.NoSuchSession: {num: ERUnknownComError, state: SSNetError},
vterrors.OperandColumns: {num: EROperandColumns, state: SSWrongNumberOfColumns},
}

func init() {
Expand Down
21 changes: 21 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3255,6 +3255,27 @@ func TestCreateTable(t *testing.T) {
}
}

func TestOne(t *testing.T) {
testOne := struct {
input, output string
}{
input: "",
output: "",
}
if testOne.input == "" {
return
}
sql := strings.TrimSpace(testOne.input)
tree, err := Parse(sql)
harshit-gangal marked this conversation as resolved.
Show resolved Hide resolved
require.NoError(t, err)
got := String(tree)
expected := testOne.output
if expected == "" {
expected = sql
}
require.Equal(t, expected, got)
}

func TestCreateTableLike(t *testing.T) {
normal := "create table a like b"
testCases := []struct {
Expand Down
1 change: 1 addition & 0 deletions go/vt/vterrors/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
WrongNumberOfColumnsInSelect
CantDoThisInTransaction
RequiresPrimaryKey
OperandColumns

// not found
BadDb
Expand Down
Loading