diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index c54b7f1e596..c1055fbc30f 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -142,9 +142,11 @@ type Session struct { FoundRows uint64 `protobuf:"varint,12,opt,name=found_rows,json=foundRows,proto3" json:"found_rows,omitempty"` // user_defined_variables contains all the @variables defined for this session UserDefinedVariables map[string]*query.BindVariable `protobuf:"bytes,13,rep,name=user_defined_variables,json=userDefinedVariables,proto3" json:"user_defined_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // system_variables keeps track of all session variables set for this connection + SystemVariables map[string]string `protobuf:"bytes,14,rep,name=system_variables,json=systemVariables,proto3" json:"system_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Session) Reset() { *m = Session{} } @@ -263,6 +265,13 @@ func (m *Session) GetUserDefinedVariables() map[string]*query.BindVariable { return nil } +func (m *Session) GetSystemVariables() map[string]string { + if m != nil { + return m.SystemVariables + } + return nil +} + type Session_ShardSession struct { Target *query.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` TransactionId int64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` @@ -937,6 +946,7 @@ func init() { proto.RegisterEnum("vtgate.TransactionMode", TransactionMode_name, TransactionMode_value) proto.RegisterEnum("vtgate.CommitOrder", CommitOrder_name, CommitOrder_value) proto.RegisterType((*Session)(nil), "vtgate.Session") + proto.RegisterMapType((map[string]string)(nil), "vtgate.Session.SystemVariablesEntry") proto.RegisterMapType((map[string]*query.BindVariable)(nil), "vtgate.Session.UserDefinedVariablesEntry") proto.RegisterType((*Session_ShardSession)(nil), "vtgate.Session.ShardSession") proto.RegisterType((*ExecuteRequest)(nil), "vtgate.ExecuteRequest") @@ -951,75 +961,79 @@ func init() { proto.RegisterType((*VStreamResponse)(nil), "vtgate.VStreamResponse") } -func init() { proto.RegisterFile("vtgate.proto", fileDescriptor_aab96496ceaf1ebb) } +func init() { + proto.RegisterFile("vtgate.proto", fileDescriptor_aab96496ceaf1ebb) +} var fileDescriptor_aab96496ceaf1ebb = []byte{ - // 1058 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xef, 0x6e, 0x23, 0xb5, - 0x17, 0xdd, 0xc9, 0xff, 0xdc, 0xfc, 0x9b, 0x9f, 0xb7, 0xbb, 0xbf, 0xd9, 0xb2, 0xa0, 0x28, 0xcb, - 0x6a, 0xd3, 0x82, 0x12, 0x14, 0x04, 0x42, 0x08, 0x84, 0xda, 0x34, 0xbb, 0x0a, 0x6a, 0x9b, 0xe2, - 0xa4, 0xad, 0x84, 0x16, 0x8d, 0xa6, 0x19, 0x37, 0xb5, 0x36, 0x1d, 0xcf, 0xda, 0x4e, 0x4a, 0x9e, - 0x82, 0xef, 0xbc, 0x00, 0xef, 0xc2, 0x37, 0x9e, 0x81, 0x17, 0x41, 0xb6, 0x67, 0x92, 0x69, 0x54, - 0xd8, 0x6e, 0x57, 0xfd, 0x12, 0xd9, 0xf7, 0x5c, 0xdb, 0xd7, 0xe7, 0xdc, 0xe3, 0x0c, 0x94, 0xe7, - 0x72, 0xe2, 0x49, 0xd2, 0x0a, 0x39, 0x93, 0x0c, 0xe5, 0xcc, 0x6c, 0xd3, 0x3e, 0xa3, 0xc1, 0x94, - 0x4d, 0x7c, 0x4f, 0x7a, 0x06, 0xd9, 0x2c, 0xbd, 0x9d, 0x11, 0xbe, 0x88, 0x26, 0x55, 0xc9, 0x42, - 0x96, 0x04, 0xe7, 0x92, 0x87, 0x63, 0x33, 0x69, 0xfc, 0x9d, 0x83, 0xfc, 0x90, 0x08, 0x41, 0x59, - 0x80, 0x9e, 0x43, 0x95, 0x06, 0xae, 0xe4, 0x5e, 0x20, 0xbc, 0xb1, 0xa4, 0x2c, 0x70, 0xac, 0xba, - 0xd5, 0x2c, 0xe0, 0x0a, 0x0d, 0x46, 0xab, 0x20, 0xea, 0x42, 0x55, 0x5c, 0x78, 0xdc, 0x77, 0x85, - 0x59, 0x27, 0x9c, 0x54, 0x3d, 0xdd, 0x2c, 0x75, 0x9e, 0xb6, 0xa2, 0xea, 0xa2, 0xfd, 0x5a, 0x43, - 0x95, 0x15, 0x4d, 0x70, 0x45, 0x24, 0x66, 0x02, 0x7d, 0x04, 0x45, 0x41, 0x83, 0xc9, 0x94, 0xb8, - 0xfe, 0x99, 0x93, 0xd6, 0xc7, 0x14, 0x4c, 0x60, 0xef, 0x0c, 0x7d, 0x02, 0xe0, 0xcd, 0x24, 0x1b, - 0xb3, 0xcb, 0x4b, 0x2a, 0x9d, 0x8c, 0x46, 0x13, 0x11, 0xf4, 0x0c, 0x2a, 0xd2, 0xe3, 0x13, 0x22, - 0x5d, 0x21, 0x39, 0x0d, 0x26, 0x4e, 0xb6, 0x6e, 0x35, 0x8b, 0xb8, 0x6c, 0x82, 0x43, 0x1d, 0x43, - 0x6d, 0xc8, 0xb3, 0x50, 0xea, 0xfa, 0x72, 0x75, 0xab, 0x59, 0xea, 0x3c, 0x6a, 0x19, 0x56, 0x7a, - 0xbf, 0x92, 0xf1, 0x4c, 0x92, 0x81, 0x01, 0x71, 0x9c, 0x85, 0x76, 0xc1, 0x4e, 0xdc, 0xdd, 0xbd, - 0x64, 0x3e, 0x71, 0xf2, 0x75, 0xab, 0x59, 0xed, 0xfc, 0x3f, 0xbe, 0x59, 0x82, 0x86, 0x03, 0xe6, - 0x13, 0x5c, 0x93, 0xd7, 0x03, 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0xe6, - 0x59, 0x4e, 0xcf, 0xbe, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x19, 0x5b, 0xd5, 0x21, 0x0b, - 0x00, 0x00, + // 1099 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1b, 0x37, + 0x13, 0xcd, 0xea, 0x5f, 0xa3, 0xbf, 0xfd, 0x18, 0x25, 0xdf, 0x46, 0x4d, 0x0b, 0x41, 0x49, 0x10, + 0xc5, 0x2d, 0xa4, 0x42, 0x45, 0x8b, 0xa2, 0x68, 0x51, 0xd8, 0xb2, 0x12, 0xa8, 0xb0, 0x2d, 0x97, + 0x92, 0x6d, 0xa0, 0x48, 0xb1, 0x58, 0x6b, 0x69, 0x99, 0x88, 0xbc, 0xdc, 0x90, 0x94, 0x5c, 0x3d, + 0x45, 0xef, 0xfb, 0x02, 0x7d, 0x97, 0xde, 0xf5, 0x6d, 0x7a, 0x59, 0x90, 0x5c, 0x49, 0x6b, 0xd5, + 0x6d, 0x1c, 0x07, 0xbe, 0x59, 0x90, 0x73, 0x86, 0xc3, 0x99, 0x73, 0x38, 0xe4, 0x42, 0x71, 0x2e, + 0x27, 0x9e, 0x24, 0xad, 0x90, 0x33, 0xc9, 0x50, 0xc6, 0xcc, 0x6a, 0xf6, 0x29, 0x0d, 0xa6, 0x6c, + 0xe2, 0x7b, 0xd2, 0x33, 0x48, 0xad, 0xf0, 0x76, 0x46, 0xf8, 0x22, 0x9a, 0x94, 0x25, 0x0b, 0x59, + 0x1c, 0x9c, 0x4b, 0x1e, 0x8e, 0xcd, 0xa4, 0xf1, 0x57, 0x16, 0xb2, 0x43, 0x22, 0x04, 0x65, 0x01, + 0x7a, 0x06, 0x65, 0x1a, 0xb8, 0x92, 0x7b, 0x81, 0xf0, 0xc6, 0x92, 0xb2, 0xc0, 0xb1, 0xea, 0x56, + 0x33, 0x87, 0x4b, 0x34, 0x18, 0xad, 0x8d, 0xa8, 0x0b, 0x65, 0x71, 0xee, 0x71, 0xdf, 0x15, 0x66, + 0x9d, 0x70, 0x12, 0xf5, 0x64, 0xb3, 0xd0, 0x79, 0xdc, 0x8a, 0xb2, 0x8b, 0xe2, 0xb5, 0x86, 0xca, + 0x2b, 0x9a, 0xe0, 0x92, 0x88, 0xcd, 0x04, 0xfa, 0x08, 0xf2, 0x82, 0x06, 0x93, 0x29, 0x71, 0xfd, + 0x53, 0x27, 0xa9, 0xb7, 0xc9, 0x19, 0xc3, 0xee, 0x29, 0xfa, 0x04, 0xc0, 0x9b, 0x49, 0x36, 0x66, + 0x17, 0x17, 0x54, 0x3a, 0x29, 0x8d, 0xc6, 0x2c, 0xe8, 0x09, 0x94, 0xa4, 0xc7, 0x27, 0x44, 0xba, + 0x42, 0x72, 0x1a, 0x4c, 0x9c, 0x74, 0xdd, 0x6a, 0xe6, 0x71, 0xd1, 0x18, 0x87, 0xda, 0x86, 0xda, + 0x90, 0x65, 0xa1, 0xd4, 0xf9, 0x65, 0xea, 0x56, 0xb3, 0xd0, 0x79, 0xd0, 0x32, 0xac, 0xf4, 0x7e, + 0x21, 0xe3, 0x99, 0x24, 0x03, 0x03, 0xe2, 0xa5, 0x17, 0xda, 0x01, 0x3b, 0x56, 0xbb, 0x7b, 0xc1, + 0x7c, 0xe2, 0x64, 0xeb, 0x56, 0xb3, 0xdc, 0xf9, 0xff, 0xb2, 0xb2, 0x18, 0x0d, 0xfb, 0xcc, 0x27, + 0xb8, 0x22, 0xaf, 0x1a, 0x50, 0x1b, 0x72, 0x97, 0x1e, 0x0f, 0x68, 0x30, 0x11, 0x4e, 0x4e, 0xb3, + 0x72, 0x3f, 0xda, 0xf5, 0x47, 0xf5, 0x3d, 0x31, 0x18, 0x5e, 0x39, 0xa1, 0xef, 0xa1, 0x18, 0x72, + 0xb2, 0xa6, 0x32, 0x7f, 0x03, 0x2a, 0x0b, 0x21, 0x27, 0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d9, 0xd6, 0x68, 0xdb, 0x1c, 0xcd, 0xd3, 0x8c, 0x9e, 0x7d, 0xf1, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x3d, 0xd4, 0x72, 0x2b, 0xb6, 0x0b, 0x00, 0x00, } diff --git a/go/vt/vtgate/engine/fake_vcursor_test.go b/go/vt/vtgate/engine/fake_vcursor_test.go index e9837e9f507..5f4b2c71db9 100644 --- a/go/vt/vtgate/engine/fake_vcursor_test.go +++ b/go/vt/vtgate/engine/fake_vcursor_test.go @@ -42,6 +42,7 @@ import ( var testMaxMemoryRows = 100 var _ VCursor = (*noopVCursor)(nil) +var _ SessionActions = (*noopVCursor)(nil) // noopVCursor is used to build other vcursors. type noopVCursor struct { @@ -51,6 +52,10 @@ func (t noopVCursor) SetUDV(key string, value interface{}) error { panic("implement me") } +func (t noopVCursor) SetSysVar(name string, expr string) { + //panic("implement me") +} + func (t noopVCursor) ExecuteVSchema(keyspace string, vschemaDDL *sqlparser.DDL) error { panic("implement me") } @@ -105,6 +110,7 @@ func (t noopVCursor) ResolveDestinations(keyspace string, ids []*querypb.Value, } var _ VCursor = (*loggingVCursor)(nil) +var _ SessionActions = (*loggingVCursor)(nil) // loggingVCursor logs requests and allows you to verify // that the correct requests were made. @@ -134,6 +140,10 @@ func (f *loggingVCursor) SetUDV(key string, value interface{}) error { return nil } +func (f *loggingVCursor) SetSysVar(name string, expr string) { + f.log = append(f.log, fmt.Sprintf("SysVar set with (%s,%v)", name, expr)) +} + func (f *loggingVCursor) ExecuteVSchema(keyspace string, vschemaDDL *sqlparser.DDL) error { panic("implement me") } diff --git a/go/vt/vtgate/engine/ordered_aggregate_test.go b/go/vt/vtgate/engine/ordered_aggregate_test.go index e0f43d322a1..77985a876ef 100644 --- a/go/vt/vtgate/engine/ordered_aggregate_test.go +++ b/go/vt/vtgate/engine/ordered_aggregate_test.go @@ -573,7 +573,6 @@ func TestOrderedAggregateKeysFail(t *testing.T) { } func TestOrderedAggregateMergeFail(t *testing.T) { - t.Skip("this looks like an invalid test") fields := sqltypes.MakeTestFields( "col|count(*)", "varbinary|decimal", @@ -582,7 +581,7 @@ func TestOrderedAggregateMergeFail(t *testing.T) { results: []*sqltypes.Result{sqltypes.MakeTestResult( fields, "a|1", - "a|b", + "a|0", )}, } diff --git a/go/vt/vtgate/engine/primitive.go b/go/vt/vtgate/engine/primitive.go index 72670d2d7ad..1fe163f2c84 100644 --- a/go/vt/vtgate/engine/primitive.go +++ b/go/vt/vtgate/engine/primitive.go @@ -82,7 +82,10 @@ type ( RecordWarning(warning *querypb.QueryWarning) SetTarget(target string) error + SetUDV(key string, value interface{}) error + + SetSysVar(name string, expr string) } // Plan represents the execution strategy for a given query. diff --git a/go/vt/vtgate/engine/set.go b/go/vt/vtgate/engine/set.go index 62c017a4acf..10ad7deeb47 100644 --- a/go/vt/vtgate/engine/set.go +++ b/go/vt/vtgate/engine/set.go @@ -66,6 +66,14 @@ type ( TargetDestination key.Destination Expr string } + + // SysVarSet implements the SetOp interface and will write the changes variable into the session + SysVarSet struct { + Name string + Keyspace *vindexes.Keyspace + TargetDestination key.Destination + Expr string + } ) var _ Primitive = (*Set)(nil) @@ -235,3 +243,41 @@ func (svci *SysVarCheckAndIgnore) Execute(vcursor VCursor, env evalengine.Expres vcursor.Session().RecordWarning(warning) return nil } + +var _ SetOp = (*SysVarSet)(nil) + +//MarshalJSON provides the type to SetOp for plan json +func (svs *SysVarSet) MarshalJSON() ([]byte, error) { + return json.Marshal(struct { + Type string + SysVarSet + }{ + Type: "SysVarSet", + SysVarSet: *svs, + }) + +} + +//VariableName implements the SetOp interface method +func (svs *SysVarSet) VariableName() string { + return svs.Name +} + +//Execute implements the SetOp interface method +func (svs *SysVarSet) Execute(vcursor VCursor, res evalengine.ExpressionEnv) error { + rss, _, err := vcursor.ResolveDestinations(svs.Keyspace.Name, nil, []key.Destination{svs.TargetDestination}) + if err != nil { + return vterrors.Wrap(err, "SysVarSet") + } + + if len(rss) != 1 { + return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "Unexpected error, DestinationKeyspaceID mapping to multiple shards: %v", svs.TargetDestination) + } + sysVarExprValidationQuery := fmt.Sprintf("select %s from dual where false", svs.Expr) + _, err = execShard(vcursor, sysVarExprValidationQuery, res.BindVars, rss[0], false /* rollbackOnError */, false /* canAutocommit */) + if err != nil { + return err + } + vcursor.Session().SetSysVar(svs.Name, svs.Expr) + return nil +} diff --git a/go/vt/vtgate/engine/set_test.go b/go/vt/vtgate/engine/set_test.go index f19ed43a490..34a949edb6e 100644 --- a/go/vt/vtgate/engine/set_test.go +++ b/go/vt/vtgate/engine/set_test.go @@ -17,6 +17,7 @@ limitations under the License. package engine import ( + "fmt" "strconv" "testing" @@ -180,6 +181,25 @@ func TestSetTable(t *testing.T) { "1", )}, }, + { + testName: "sysvar set", + setOps: []SetOp{ + &SysVarSet{ + Name: "x", + Keyspace: &vindexes.Keyspace{ + Name: "ks", + Sharded: true, + }, + TargetDestination: key.DestinationAnyShard{}, + Expr: "dummy_expr", + }, + }, + expectedQueryLog: []string{ + `ResolveDestinations ks [] Destinations:DestinationAnyShard()`, + `ExecuteMultiShard ks.-20: select dummy_expr from dual where false {} false false`, + `SysVar set with (x,dummy_expr)`, + }, + }, } for _, tc := range tests { @@ -204,3 +224,35 @@ func TestSetTable(t *testing.T) { }) } } + +func TestSysVarSetErr(t *testing.T) { + + setOps := []SetOp{ + &SysVarSet{ + Name: "x", + Keyspace: &vindexes.Keyspace{ + Name: "ks", + Sharded: true, + }, + TargetDestination: key.DestinationAnyShard{}, + Expr: "dummy_expr", + }, + } + + expectedQueryLog := []string{ + `ResolveDestinations ks [] Destinations:DestinationAnyShard()`, + `ExecuteMultiShard ks.-20: select dummy_expr from dual where false {} false false`, + } + + set := &Set{ + Ops: setOps, + Input: &SingleRow{}, + } + vc := &loggingVCursor{ + shards: []string{"-20", "20-"}, + multiShardErrs: []error{fmt.Errorf("error")}, + } + _, err := set.Execute(vc, map[string]*querypb.BindVariable{}, false) + require.EqualError(t, err, "error") + vc.ExpectLog(t, expectedQueryLog) +} diff --git a/go/vt/vtgate/planbuilder/builder.go b/go/vt/vtgate/planbuilder/builder.go index 6a1721c703d..92b72ff8ddf 100644 --- a/go/vt/vtgate/planbuilder/builder.go +++ b/go/vt/vtgate/planbuilder/builder.go @@ -127,6 +127,7 @@ type ContextVSchema interface { Destination() key.Destination TabletType() topodatapb.TabletType TargetDestination(qualifier string) (key.Destination, *vindexes.Keyspace, topodatapb.TabletType, error) + AnyKeyspace() (*vindexes.Keyspace, error) } //------------------------------------------------------------------------- diff --git a/go/vt/vtgate/planbuilder/plan_test.go b/go/vt/vtgate/planbuilder/plan_test.go index 27f71054096..38582e14cce 100644 --- a/go/vt/vtgate/planbuilder/plan_test.go +++ b/go/vt/vtgate/planbuilder/plan_test.go @@ -311,6 +311,10 @@ func (vw *vschemaWrapper) DefaultKeyspace() (*vindexes.Keyspace, error) { return vw.v.Keyspaces["main"].Keyspace, nil } +func (vw *vschemaWrapper) AnyKeyspace() (*vindexes.Keyspace, error) { + return vw.DefaultKeyspace() +} + func (vw *vschemaWrapper) TargetString() string { return "targetString" } diff --git a/go/vt/vtgate/planbuilder/set.go b/go/vt/vtgate/planbuilder/set.go index c155ef0db42..7bab90dc40a 100644 --- a/go/vt/vtgate/planbuilder/set.go +++ b/go/vt/vtgate/planbuilder/set.go @@ -20,6 +20,8 @@ import ( "fmt" "strings" + "vitess.io/vitess/go/vt/vtgate/vindexes" + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/vterrors" @@ -34,6 +36,7 @@ var sysVarPlanningFunc = map[string]func(expr *sqlparser.SetExpr, vschema Contex func init() { sysVarPlanningFunc["default_storage_engine"] = buildSetOpIgnore sysVarPlanningFunc["sql_mode"] = buildSetOpCheckAndIgnore + sysVarPlanningFunc["sql_safe_updates"] = buildSetOpVarSet } func buildSetPlan(stmt *sqlparser.Set, vschema ContextVSchema) (engine.Primitive, error) { @@ -100,16 +103,11 @@ func buildSetPlan(stmt *sqlparser.Set, vschema ContextVSchema) (engine.Primitive } func planTabletInput(vschema ContextVSchema, tabletExpressions []*sqlparser.SetExpr) (engine.Primitive, error) { - keyspace, err := vschema.DefaultKeyspace() + ks, dest, err := resolveDestination(vschema) if err != nil { return nil, err } - dest := vschema.Destination() - if dest == nil { - dest = key.DestinationAnyShard{} - } - var expr []string for _, e := range tabletExpressions { expr = append(expr, sqlparser.String(e.Expr)) @@ -117,7 +115,7 @@ func planTabletInput(vschema ContextVSchema, tabletExpressions []*sqlparser.SetE query := fmt.Sprintf("select %s from dual", strings.Join(expr, ",")) primitive := &engine.Send{ - Keyspace: keyspace, + Keyspace: ks, TargetDestination: dest, Query: query, IsDML: false, @@ -137,20 +135,11 @@ func buildSetOpIgnore(expr *sqlparser.SetExpr, _ ContextVSchema) (engine.SetOp, } func buildSetOpCheckAndIgnore(expr *sqlparser.SetExpr, vschema ContextVSchema) (engine.SetOp, error) { - keyspace, err := vschema.DefaultKeyspace() + keyspace, dest, err := resolveDestination(vschema) if err != nil { - //TODO: Record warning for switching plan construct. - if strings.HasPrefix(err.Error(), "no keyspace in database name specified") { - return buildSetOpIgnore(expr, vschema) - } return nil, err } - dest := vschema.Destination() - if dest == nil { - dest = key.DestinationAnyShard{} - } - return &engine.SysVarCheckAndIgnore{ Name: expr.Name.Lowered(), Keyspace: keyspace, @@ -159,6 +148,50 @@ func buildSetOpCheckAndIgnore(expr *sqlparser.SetExpr, vschema ContextVSchema) ( }, nil } +func expressionOkToDelegateToTablet(e sqlparser.Expr) bool { + valid := true + sqlparser.Rewrite(e, nil, func(cursor *sqlparser.Cursor) bool { + switch n := cursor.Node().(type) { + case *sqlparser.Subquery, *sqlparser.TimestampFuncExpr, *sqlparser.CurTimeFuncExpr: + valid = false + return false + case *sqlparser.FuncExpr: + _, ok := validFuncs[n.Name.Lowered()] + valid = ok + return ok + } + return true + }) + return valid +} + +func buildSetOpVarSet(expr *sqlparser.SetExpr, vschema ContextVSchema) (engine.SetOp, error) { + ks, dest, err := resolveDestination(vschema) + if err != nil { + return nil, err + } + + return &engine.SysVarSet{ + Name: expr.Name.Lowered(), + Keyspace: ks, + TargetDestination: dest, + Expr: sqlparser.String(expr.Expr), + }, nil +} + +func resolveDestination(vschema ContextVSchema) (*vindexes.Keyspace, key.Destination, error) { + keyspace, err := vschema.AnyKeyspace() + if err != nil { + return nil, nil, err + } + + dest := vschema.Destination() + if dest == nil { + dest = key.DestinationAnyShard{} + } + return keyspace, dest, nil +} + // whitelist of functions knows to be safe to pass through to mysql for evaluation // this list tries to not include functions that might return different results on different tablets var validFuncs = map[string]interface{}{ @@ -292,20 +325,3 @@ var validFuncs = map[string]interface{}{ "upper": nil, "weight_string": nil, } - -func expressionOkToDelegateToTablet(e sqlparser.Expr) bool { - valid := true - sqlparser.Rewrite(e, nil, func(cursor *sqlparser.Cursor) bool { - switch n := cursor.Node().(type) { - case *sqlparser.Subquery, *sqlparser.TimestampFuncExpr, *sqlparser.CurTimeFuncExpr: - valid = false - return false - case *sqlparser.FuncExpr: - _, ok := validFuncs[n.Name.Lowered()] - valid = ok - return ok - } - return true - }) - return valid -} diff --git a/go/vt/vtgate/planbuilder/testdata/set_sysvar_cases.txt b/go/vt/vtgate/planbuilder/testdata/set_sysvar_cases.txt index ca389a8965c..857bb6fa187 100644 --- a/go/vt/vtgate/planbuilder/testdata/set_sysvar_cases.txt +++ b/go/vt/vtgate/planbuilder/testdata/set_sysvar_cases.txt @@ -47,6 +47,33 @@ } } +# set check and ignore plan +"set @@sql_safe_updates = 1" +{ + "QueryType": "SET", + "Original": "set @@sql_safe_updates = 1", + "Instructions": { + "OperatorType": "Set", + "Ops": [ + { + "Type": "SysVarSet", + "Name": "sql_safe_updates", + "Keyspace": { + "Name": "main", + "Sharded": false + }, + "TargetDestination": {}, + "Expr": "1" + } + ], + "Inputs": [ + { + "OperatorType": "SingleRow" + } + ] + } +} + # set plan building not supported "set @@innodb_strict_mode = OFF" "plan building not supported" diff --git a/go/vt/vtgate/safe_session.go b/go/vt/vtgate/safe_session.go index 7f84933a9b0..b1b5bb70364 100644 --- a/go/vt/vtgate/safe_session.go +++ b/go/vt/vtgate/safe_session.go @@ -254,3 +254,10 @@ func (session *SafeSession) SetTargetString(target string) { defer session.mu.Unlock() session.TargetString = target } + +//SetSystemVariable sets the system variable in th session. +func (session *SafeSession) SetSystemVariable(name string, expr string) { + session.mu.Lock() + defer session.mu.Unlock() + session.SystemVariables[name] = expr +} diff --git a/go/vt/vtgate/vcursor_impl.go b/go/vt/vtgate/vcursor_impl.go index 4bd87784b37..0d589740377 100644 --- a/go/vt/vtgate/vcursor_impl.go +++ b/go/vt/vtgate/vcursor_impl.go @@ -226,6 +226,29 @@ func (vc *vcursorImpl) DefaultKeyspace() (*vindexes.Keyspace, error) { return ks.Keyspace, nil } +func (vc *vcursorImpl) AnyKeyspace() (*vindexes.Keyspace, error) { + keyspace, err := vc.DefaultKeyspace() + if err == nil { + return keyspace, nil + } + if err != errNoKeyspace { + return nil, err + } + + if len(vc.vschema.Keyspaces) == 0 { + return nil, vterrors.New(vtrpcpb.Code_FAILED_PRECONDITION, "no keyspaces available") + } + + // Looks for any sharded keyspace if present, otherwise take any keyspace. + for _, ks := range vc.vschema.Keyspaces { + keyspace = ks.Keyspace + if keyspace.Sharded { + return keyspace, nil + } + } + return keyspace, nil +} + // TargetString returns the current TargetString of the session. func (vc *vcursorImpl) TargetString() string { return vc.safeSession.TargetString @@ -341,6 +364,10 @@ func (vc *vcursorImpl) SetUDV(key string, value interface{}) error { return nil } +func (vc *vcursorImpl) SetSysVar(name string, expr string) { + vc.safeSession.SetSystemVariable(name, expr) +} + // Destination implements the ContextVSchema interface func (vc *vcursorImpl) Destination() key.Destination { return vc.destination diff --git a/proto/vtgate.proto b/proto/vtgate.proto index aa8b552531e..c68bf742163 100644 --- a/proto/vtgate.proto +++ b/proto/vtgate.proto @@ -114,6 +114,9 @@ message Session { // user_defined_variables contains all the @variables defined for this session map user_defined_variables = 13; + + // system_variables keeps track of all session variables set for this connection + map system_variables = 14; } // ExecuteRequest is the payload to Execute.