From d4e3615e6941a7819e879fd066b995093c3f0fc4 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 24 Oct 2024 11:30:02 -0700 Subject: [PATCH 01/25] progress --- engine.go | 38 ++++++++-- engine_test.go | 3 +- sql/analyzer/apply_update_accumulators.go | 2 + sql/rowexec/dml.go | 27 ------- sql/rowexec/dml_iters.go | 86 ++++++++++++++++++++++- 5 files changed, 120 insertions(+), 36 deletions(-) diff --git a/engine.go b/engine.go index a555633ce3..c6db4b75d6 100644 --- a/engine.go +++ b/engine.go @@ -443,11 +443,17 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar if err2 != nil { return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: "+err2.Error()) } - return nil, nil, nil, err } - iter = finalizeIters(ctx, analyzed, qFlags, iter) + iter, err = finalizeIters(ctx, analyzed, qFlags, iter) + if err != nil { + clearAutocommitErr := clearAutocommitTransaction(ctx) + if clearAutocommitErr != nil { + return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: " + clearAutocommitErr.Error()) + } + return nil, nil, nil, err + } return analyzed.Schema(), iter, qFlags, nil } @@ -478,11 +484,17 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. if err2 != nil { return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: "+err2.Error()) } - return nil, nil, nil, err } - iter = finalizeIters(ctx, plan, nil, iter) + iter, err = finalizeIters(ctx, plan, nil, iter) + if err != nil { + clearAutocommitErr := clearAutocommitTransaction(ctx) + if clearAutocommitErr != nil { + return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: " + clearAutocommitErr.Error()) + } + return nil, nil, nil, err + } return plan.Schema(), iter, nil, nil } @@ -830,7 +842,14 @@ func (e *Engine) executeEvent(ctx *sql.Context, dbName, createEventStatement, us return err } - iter = finalizeIters(ctx, definitionNode, nil, iter) + iter, err = finalizeIters(ctx, definitionNode, nil, iter) + if err != nil { + clearAutocommitErr := clearAutocommitTransaction(ctx) + if clearAutocommitErr != nil { + return clearAutocommitErr + } + return err + } // Drain the iterate to execute the event body/definition // NOTE: No row data is returned for an event; we just need to execute the statements @@ -865,9 +884,14 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { } // finalizeIters applies the final transformations on sql.RowIter before execution. -func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) sql.RowIter { +func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, error) { + var err error + iter, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) + if err != nil { + return nil, err + } iter = rowexec.AddTransactionCommittingIter(qFlags, iter) iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = rowexec.AddExpressionCloser(analyzed, iter) - return iter + return iter, nil } diff --git a/engine_test.go b/engine_test.go index 4838b34911..a64b84c5be 100755 --- a/engine_test.go +++ b/engine_test.go @@ -231,7 +231,8 @@ func TestTrackProcess(t *testing.T) { require.True(ok) iter, err := rowexec.DefaultBuilder.Build(ctx, result, nil) - iter = finalizeIters(ctx, result, nil, iter) + require.NoError(err) + iter, err = finalizeIters(ctx, result, nil, iter) require.NoError(err) _, err = sql.RowIterToRows(ctx, iter) require.NoError(err) diff --git a/sql/analyzer/apply_update_accumulators.go b/sql/analyzer/apply_update_accumulators.go index 47f35cc23b..8565277c1c 100644 --- a/sql/analyzer/apply_update_accumulators.go +++ b/sql/analyzer/apply_update_accumulators.go @@ -26,6 +26,7 @@ import ( // applyUpdateAccumulators wraps any Insert, Update, or Delete nodes with RowUpdateAccumulators to tally the results // for report to the client. func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, sel RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error) { + return n, transform.SameTree, nil switch n := n.(type) { case *plan.TriggerExecutor, *plan.InsertInto, *plan.DeleteFrom, *plan.Update: accumulatorType, err := getUpdateAccumulatorType(n) @@ -40,6 +41,7 @@ func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *p // getUpdateAccumulatorType returns the type of accumulator needed for the node given, or an error if there's no match. func getUpdateAccumulatorType(n sql.Node) (plan.RowUpdateType, error) { + return -1, nil switch n := n.(type) { case *plan.TriggerExecutor: return getUpdateAccumulatorType(n.Left()) diff --git a/sql/rowexec/dml.go b/sql/rowexec/dml.go index 4c86bf17b5..a62daf9567 100644 --- a/sql/rowexec/dml.go +++ b/sql/rowexec/dml.go @@ -395,33 +395,6 @@ func (b *BaseBuilder) buildRowUpdateAccumulator(ctx *sql.Context, n *plan.RowUpd }, nil } -func findInsertIter(rowIter sql.RowIter) (*insertIter, error) { - var insertItr *insertIter - switch rowIter := rowIter.(type) { - case *plan.TableEditorIter: - var ok bool - insertItr, ok = rowIter.InnerIter().(*insertIter) - if !ok { - return nil, fmt.Errorf("unexpected iter type %T", rowIter) - } - case *plan.CheckpointingTableEditorIter: - var ok bool - insertItr, ok = rowIter.InnerIter().(*insertIter) - if !ok { - return nil, fmt.Errorf("unexpected iter type %T", rowIter) - } - case *triggerIter: - var err error - insertItr, err = findInsertIter(rowIter.child) - if err != nil { - return nil, err - } - default: - return nil, fmt.Errorf("unexpected iter type %T", rowIter) - } - return insertItr, nil -} - func (b *BaseBuilder) buildTruncate(ctx *sql.Context, n *plan.Truncate, row sql.Row) (sql.RowIter, error) { truncatable, err := plan.GetTruncatable(n.Child) if err != nil { diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 0c3bbc0b60..de6009f63e 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -16,7 +16,8 @@ package rowexec import ( "fmt" - "io" + "github.com/dolthub/vitess/go/mysql" +"io" "sync" "github.com/dolthub/go-mysql-server/sql" @@ -493,6 +494,89 @@ type accumulatorIter struct { updateRowHandler accumulatorRowHandler } +func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, error) { + clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows + + var rowHandler accumulatorRowHandler + switch n := node.(type) { + case *plan.TriggerExecutor: + return AddAccumulatorIter(ctx, n.Left(), iter) + case *plan.InsertInto: + if n.IsReplace { + rowHandler = &replaceRowHandler{} + } else if len(n.OnDupExprs) > 0 { + rowHandler = &onDuplicateUpdateHandler{schema: n.Schema(), clientFoundRowsCapability: clientFoundRowsToggled} + } else { + rowHandler = &insertRowHandler{} + } + case *plan.DeleteFrom: + rowHandler = &deleteRowHandler{} + case *plan.Update: + // search for a join + hasJoin := false + transform.Inspect(n, func(node sql.Node) bool { + switch node.(type) { + case *plan.JoinNode: + hasJoin = true + return false + } + return true + }) + if hasJoin { + var schema sql.Schema + var updaterMap map[string]sql.RowUpdater + transform.Inspect(n, func(node sql.Node) bool { + switch nn := node.(type) { + case *plan.JoinNode, *plan.Project: + schema = node.Schema() + return false + case *plan.UpdateJoin: + updaterMap = nn.Updaters + return true + default: + return true + } + }) + if schema == nil { + return nil, fmt.Errorf("error: No JoinNode found in query plan to go along with an UpdateTypeJoinUpdate") + } + // assign row handler to updateJoinIter + rowHandler = &updateJoinRowHandler{joinSchema: schema, tableMap: plan.RecreateTableSchemaFromJoinSchema(schema), updaterMap: updaterMap} + for iter, done := iter, false; !done; { + switch i := iter.(type) { + case *plan.TableEditorIter: + iter = i.InnerIter() + case *ProjectIter: + iter = i.childIter + case *plan.CheckpointingTableEditorIter: + iter = i.InnerIter() + case *triggerIter: + iter = i.child + case *updateIter: + iter = i.childIter + case *updateJoinIter: + i.accumulator = rowHandler.(*updateJoinRowHandler) + done = true + default: + return nil, fmt.Errorf("failed to apply rowHandler to updateJoin, unknown type: %T", iter) + } + } + } else { + // the schema of the update node is a self-concatenation of the underlying table's, so split it in half + // for new / old row comparison purposes + sch := n.Schema() + rowHandler = &updateRowHandler{schema: sch[:len(sch)/2], clientFoundRowsCapability: clientFoundRowsToggled} + } + default: + return iter, nil + } + + return &accumulatorIter{ + iter: iter, + updateRowHandler: rowHandler, + }, nil +} + func (a *accumulatorIter) Next(ctx *sql.Context) (r sql.Row, err error) { run := false a.once.Do(func() { From bd4b1a18a384434a6de1689458c4091e26cba0f0 Mon Sep 17 00:00:00 2001 From: jycor Date: Fri, 25 Oct 2024 21:33:45 +0000 Subject: [PATCH 02/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- engine.go | 4 ++-- sql/rowexec/dml_iters.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/engine.go b/engine.go index c6db4b75d6..513156a15a 100644 --- a/engine.go +++ b/engine.go @@ -450,7 +450,7 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { - return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: " + clearAutocommitErr.Error()) + return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: "+clearAutocommitErr.Error()) } return nil, nil, nil, err } @@ -491,7 +491,7 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { - return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: " + clearAutocommitErr.Error()) + return nil, nil, nil, errors.Wrap(err, "unable to clear autocommit transaction: "+clearAutocommitErr.Error()) } return nil, nil, nil, err } diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index de6009f63e..4c13d7f3d2 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -16,10 +16,11 @@ package rowexec import ( "fmt" - "github.com/dolthub/vitess/go/mysql" -"io" + "io" "sync" + "github.com/dolthub/vitess/go/mysql" + "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression" "github.com/dolthub/go-mysql-server/sql/plan" From 973bb30117d9f2e6556afdaad1a64acf03bec98c Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 25 Oct 2024 14:39:15 -0700 Subject: [PATCH 03/25] format --- sql/rowexec/dml_iters.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 4c13d7f3d2..9f8c0ddbb2 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -19,13 +19,13 @@ import ( "io" "sync" - "github.com/dolthub/vitess/go/mysql" - "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression" "github.com/dolthub/go-mysql-server/sql/plan" "github.com/dolthub/go-mysql-server/sql/transform" "github.com/dolthub/go-mysql-server/sql/types" + + "github.com/dolthub/vitess/go/mysql" ) const TriggerSavePointPrefix = "__go_mysql_server_trigger_savepoint__" From f5b3d05fcc04b8d76c8bdd96d71f3538e4e3b09a Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 25 Oct 2024 15:27:43 -0700 Subject: [PATCH 04/25] removing now unused code --- engine.go | 1 + sql/analyzer/rule_ids.go | 1 - sql/analyzer/ruleid_string.go | 35 ++++++----- sql/analyzer/rules.go | 1 - sql/analyzer/triggers.go | 38 ------------ sql/plan/trigger.go | 102 +------------------------------- sql/rowexec/builder.go | 1 - sql/rowexec/dml.go | 26 -------- sql/rowexec/dml_iters.go | 41 +++++++++++++ sql/rowexec/node_builder.gen.go | 4 -- sql/rowexec/transaction.go | 5 -- 11 files changed, 60 insertions(+), 195 deletions(-) diff --git a/engine.go b/engine.go index a555633ce3..c72b2224d1 100644 --- a/engine.go +++ b/engine.go @@ -866,6 +866,7 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { // finalizeIters applies the final transformations on sql.RowIter before execution. func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) sql.RowIter { + iter = rowexec.AddTriggerRollbackIter(ctx, analyzed, iter) iter = rowexec.AddTransactionCommittingIter(qFlags, iter) iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = rowexec.AddExpressionCloser(analyzed, iter) diff --git a/sql/analyzer/rule_ids.go b/sql/analyzer/rule_ids.go index 97f923e4c9..fd6e183945 100644 --- a/sql/analyzer/rule_ids.go +++ b/sql/analyzer/rule_ids.go @@ -68,7 +68,6 @@ const ( assignRoutinesId // assignRoutines modifyUpdateExprsForJoinId // modifyUpdateExprsForJoin applyUpdateAccumulatorsId // applyUpdateAccumulators - wrapWithRollbackId // wrapWithRollback applyForeignKeysId // applyForeignKeys // validate diff --git a/sql/analyzer/ruleid_string.go b/sql/analyzer/ruleid_string.go index 7186bbc769..8b2855696f 100755 --- a/sql/analyzer/ruleid_string.go +++ b/sql/analyzer/ruleid_string.go @@ -66,27 +66,26 @@ func _() { _ = x[assignRoutinesId-55] _ = x[modifyUpdateExprsForJoinId-56] _ = x[applyUpdateAccumulatorsId-57] - _ = x[wrapWithRollbackId-58] - _ = x[applyForeignKeysId-59] - _ = x[validateResolvedId-60] - _ = x[validateOrderById-61] - _ = x[validateGroupById-62] - _ = x[validateSchemaSourceId-63] - _ = x[validateIndexCreationId-64] - _ = x[ValidateOperandsId-65] - _ = x[validateIntervalUsageId-66] - _ = x[validateSubqueryColumnsId-67] - _ = x[validateUnionSchemasMatchId-68] - _ = x[validateAggregationsId-69] - _ = x[validateDeleteFromId-70] - _ = x[cacheSubqueryAliasesInJoinsId-71] - _ = x[BacktickDefaulColumnValueNamesId-72] - _ = x[TrackProcessId-73] + _ = x[applyForeignKeysId-58] + _ = x[validateResolvedId-59] + _ = x[validateOrderById-60] + _ = x[validateGroupById-61] + _ = x[validateSchemaSourceId-62] + _ = x[validateIndexCreationId-63] + _ = x[ValidateOperandsId-64] + _ = x[validateIntervalUsageId-65] + _ = x[validateSubqueryColumnsId-66] + _ = x[validateUnionSchemasMatchId-67] + _ = x[validateAggregationsId-68] + _ = x[validateDeleteFromId-69] + _ = x[cacheSubqueryAliasesInJoinsId-70] + _ = x[BacktickDefaulColumnValueNamesId-71] + _ = x[TrackProcessId-72] } -const _RuleId_name = "applyDefaultSelectLimitvalidateOffsetAndLimitvalidateStarExpressionsvalidateCreateTablevalidateAlterTablevalidateExprSemloadStoredProceduresvalidateDropTablesresolveDropConstraintvalidateDropConstraintresolveCreateSelectresolveSubqueriesresolveUnionsresolveDescribeQueryvalidateColumnDefaultsvalidateCreateTriggervalidateCreateProcedurevalidateReadOnlyDatabasevalidateReadOnlyTransactionvalidateDatabaseSetvalidatePrivilegesapplyEventSchedulerflattenTableAliasespushdownSubqueryAliasFiltersvalidateCheckConstraintsreplaceCountStarreplaceCrossJoinsmoveJoinConditionsToFiltersimplifyFilterspushNotFiltershoistOutOfScopeFiltersunnestInSubqueriesunnestExistsSubqueriesfinalizeSubqueriesfinalizeUnionsloadTriggersprocessTruncateresolveAlterColumnstripTableNamesFromColumnDefaultsoptimizeJoinspushFiltersapplyIndexesFromOuterScopepruneTablesassignExecIndexesinlineSubqueryAliasRefseraseProjectionflattenDistinctreplaceAggreplaceIdxSortinsertTopNNodesreplaceIdxOrderByDistanceapplyHashInresolveInsertRowsapplyTriggersapplyProceduresassignRoutinesmodifyUpdateExprsForJoinapplyUpdateAccumulatorswrapWithRollbackapplyForeignKeysvalidateResolvedvalidateOrderByvalidateGroupByvalidateSchemaSourcevalidateIndexCreationvalidateOperandsvalidateIntervalUsagevalidateSubqueryColumnsvalidateUnionSchemasMatchvalidateAggregationsvalidateDeleteFromcacheSubqueryAliasesInJoinsbacktickDefaultColumnValueNamestrackProcess" +const _RuleId_name = "applyDefaultSelectLimitvalidateOffsetAndLimitvalidateStarExpressionsvalidateCreateTablevalidateAlterTablevalidateExprSemloadStoredProceduresvalidateDropTablesresolveDropConstraintvalidateDropConstraintresolveCreateSelectresolveSubqueriesresolveUnionsresolveDescribeQueryvalidateColumnDefaultsvalidateCreateTriggervalidateCreateProcedurevalidateReadOnlyDatabasevalidateReadOnlyTransactionvalidateDatabaseSetvalidatePrivilegesapplyEventSchedulerflattenTableAliasespushdownSubqueryAliasFiltersvalidateCheckConstraintsreplaceCountStarreplaceCrossJoinsmoveJoinConditionsToFiltersimplifyFilterspushNotFiltershoistOutOfScopeFiltersunnestInSubqueriesunnestExistsSubqueriesfinalizeSubqueriesfinalizeUnionsloadTriggersprocessTruncateresolveAlterColumnstripTableNamesFromColumnDefaultsoptimizeJoinspushFiltersapplyIndexesFromOuterScopepruneTablesassignExecIndexesinlineSubqueryAliasRefseraseProjectionflattenDistinctreplaceAggreplaceIdxSortinsertTopNNodesreplaceIdxOrderByDistanceapplyHashInresolveInsertRowsapplyTriggersapplyProceduresassignRoutinesmodifyUpdateExprsForJoinapplyUpdateAccumulatorsapplyForeignKeysvalidateResolvedvalidateOrderByvalidateGroupByvalidateSchemaSourcevalidateIndexCreationvalidateOperandsvalidateIntervalUsagevalidateSubqueryColumnsvalidateUnionSchemasMatchvalidateAggregationsvalidateDeleteFromcacheSubqueryAliasesInJoinsbacktickDefaultColumnValueNamestrackProcess" -var _RuleId_index = [...]uint16{0, 23, 45, 68, 87, 105, 120, 140, 158, 179, 201, 220, 237, 250, 270, 292, 313, 336, 360, 387, 406, 424, 443, 462, 490, 514, 530, 547, 573, 588, 602, 624, 642, 664, 682, 696, 708, 723, 741, 774, 787, 798, 824, 835, 852, 875, 890, 905, 915, 929, 944, 969, 980, 997, 1010, 1025, 1039, 1063, 1086, 1102, 1118, 1134, 1149, 1164, 1184, 1205, 1221, 1242, 1265, 1290, 1310, 1328, 1355, 1386, 1398} +var _RuleId_index = [...]uint16{0, 23, 45, 68, 87, 105, 120, 140, 158, 179, 201, 220, 237, 250, 270, 292, 313, 336, 360, 387, 406, 424, 443, 462, 490, 514, 530, 547, 573, 588, 602, 624, 642, 664, 682, 696, 708, 723, 741, 774, 787, 798, 824, 835, 852, 875, 890, 905, 915, 929, 944, 969, 980, 997, 1010, 1025, 1039, 1063, 1086, 1102, 1118, 1133, 1148, 1168, 1189, 1205, 1226, 1249, 1274, 1294, 1312, 1339, 1370, 1382} func (i RuleId) String() string { if i < 0 || i >= RuleId(len(_RuleId_index)-1) { diff --git a/sql/analyzer/rules.go b/sql/analyzer/rules.go index dc7a431b09..26438d7487 100644 --- a/sql/analyzer/rules.go +++ b/sql/analyzer/rules.go @@ -22,7 +22,6 @@ func init() { {applyTriggersId, applyTriggers}, {applyProceduresId, applyProcedures}, {applyUpdateAccumulatorsId, applyUpdateAccumulators}, - {wrapWithRollbackId, wrapWithRollback}, {inlineSubqueryAliasRefsId, inlineSubqueryAliasRefs}, {cacheSubqueryAliasesInJoinsId, cacheSubqueryAliasesInJoins}, {BacktickDefaulColumnValueNamesId, backtickDefaultColumnValueNames}, diff --git a/sql/analyzer/triggers.go b/sql/analyzer/triggers.go index 7fb8b4402a..4401db9b40 100644 --- a/sql/analyzer/triggers.go +++ b/sql/analyzer/triggers.go @@ -517,41 +517,3 @@ func orderTriggersAndReverseAfter(triggers []*plan.CreateTrigger) []*plan.Create func triggerEventsMatch(event plan.TriggerEvent, event2 string) bool { return strings.ToLower((string)(event)) == strings.ToLower(event2) } - -// wrapWithRollback wraps the entire tree iff it contains a trigger, allowing rollback when a trigger errors -func wrapWithRollback(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, sel RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error) { - // Check if tree contains a TriggerExecutor - containsTrigger := false - transform.Inspect(n, func(n sql.Node) bool { - // After Triggers wrap nodes - if _, ok := n.(*plan.TriggerExecutor); ok { - containsTrigger = true - return false // done, don't bother to recurse - } - - // Before Triggers on Inserts are inside Source - if n, ok := n.(*plan.InsertInto); ok { - if _, ok := n.Source.(*plan.TriggerExecutor); ok { - containsTrigger = true - return false - } - } - - // Before Triggers on Delete and Update should be in children - return true - }) - - // No TriggerExecutor, so return same tree - if !containsTrigger { - return n, transform.SameTree, nil - } - - // If we don't have a transaction session we can't do rollbacks - _, ok := ctx.Session.(sql.TransactionSession) - if !ok { - return plan.NewNoopTriggerRollback(n), transform.NewTree, nil - } - - // Wrap tree with new node - return plan.NewTriggerRollback(n), transform.NewTree, nil -} diff --git a/sql/plan/trigger.go b/sql/plan/trigger.go index fe776e7ba5..47d6973de1 100644 --- a/sql/plan/trigger.go +++ b/sql/plan/trigger.go @@ -102,104 +102,4 @@ func (t *TriggerExecutor) CheckPrivileges(ctx *sql.Context, opChecker sql.Privil // CollationCoercibility implements the interface sql.CollationCoercible. func (t *TriggerExecutor) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) { return sql.GetCoercibility(ctx, t.left) -} - -// TriggerRollback is a node that wraps the entire tree iff it contains a trigger, creates a savepoint, and performs a -// rollback if something went wrong during execution -type TriggerRollback struct { - UnaryNode -} - -var _ sql.Node = (*TriggerRollback)(nil) -var _ sql.CollationCoercible = (*TriggerRollback)(nil) - -func NewTriggerRollback(child sql.Node) *TriggerRollback { - return &TriggerRollback{ - UnaryNode: UnaryNode{Child: child}, - } -} - -func (t *TriggerRollback) WithChildren(children ...sql.Node) (sql.Node, error) { - if len(children) != 1 { - return nil, sql.ErrInvalidChildrenNumber.New(t, len(children), 1) - } - - return NewTriggerRollback(children[0]), nil -} - -// CheckPrivileges implements the interface sql.Node. -func (t *TriggerRollback) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool { - return t.Child.CheckPrivileges(ctx, opChecker) -} - -// CollationCoercibility implements the interface sql.CollationCoercible. -func (t *TriggerRollback) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) { - return sql.GetCoercibility(ctx, t.Child) -} - -func (t *TriggerRollback) IsReadOnly() bool { - return t.Child.IsReadOnly() -} - -func (t *TriggerRollback) String() string { - pr := sql.NewTreePrinter() - _ = pr.WriteNode("TriggerRollback()") - _ = pr.WriteChildren(t.Child.String()) - return pr.String() -} - -func (t *TriggerRollback) DebugString() string { - pr := sql.NewTreePrinter() - _ = pr.WriteNode("TriggerRollback") - _ = pr.WriteChildren(sql.DebugString(t.Child)) - return pr.String() -} - -type NoopTriggerRollback struct { - UnaryNode -} - -var _ sql.Node = (*NoopTriggerRollback)(nil) -var _ sql.CollationCoercible = (*NoopTriggerRollback)(nil) - -func NewNoopTriggerRollback(child sql.Node) *NoopTriggerRollback { - return &NoopTriggerRollback{ - UnaryNode: UnaryNode{Child: child}, - } -} - -func (t *NoopTriggerRollback) WithChildren(children ...sql.Node) (sql.Node, error) { - if len(children) != 1 { - return nil, sql.ErrInvalidChildrenNumber.New(t, len(children), 1) - } - - return NewNoopTriggerRollback(children[0]), nil -} - -// CheckPrivileges implements the interface sql.Node. -func (t *NoopTriggerRollback) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool { - return t.Child.CheckPrivileges(ctx, opChecker) -} - -// CollationCoercibility implements the interface sql.CollationCoercible. -func (t *NoopTriggerRollback) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) { - return sql.GetCoercibility(ctx, t.Child) -} - -func (t *NoopTriggerRollback) IsReadOnly() bool { - return true -} - -func (t *NoopTriggerRollback) String() string { - pr := sql.NewTreePrinter() - _ = pr.WriteNode("TriggerRollback()") - _ = pr.WriteChildren(t.Child.String()) - return pr.String() -} - -func (t *NoopTriggerRollback) DebugString() string { - pr := sql.NewTreePrinter() - _ = pr.WriteNode("TriggerRollback") - _ = pr.WriteChildren(sql.DebugString(t.Child)) - return pr.String() -} +} \ No newline at end of file diff --git a/sql/rowexec/builder.go b/sql/rowexec/builder.go index 1cdaa80b94..3a864b526e 100644 --- a/sql/rowexec/builder.go +++ b/sql/rowexec/builder.go @@ -32,7 +32,6 @@ type ExecBuilderFunc func(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, type BaseBuilder struct { // if override is provided, we try to build executor with this first override sql.NodeExecBuilder - triggerSavePointCounter int // tracks the number of save points that have been created by triggers } func (b *BaseBuilder) Build(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, error) { diff --git a/sql/rowexec/dml.go b/sql/rowexec/dml.go index 4c86bf17b5..c1b4d808b3 100644 --- a/sql/rowexec/dml.go +++ b/sql/rowexec/dml.go @@ -256,32 +256,6 @@ func (b *BaseBuilder) buildDropTable(ctx *sql.Context, n *plan.DropTable, row sq return rowIterWithOkResultWithZeroRowsAffected(), nil } -func (b *BaseBuilder) buildTriggerRollback(ctx *sql.Context, n *plan.TriggerRollback, row sql.Row) (sql.RowIter, error) { - childIter, err := b.buildNodeExec(ctx, n.Child, row) - if err != nil { - return nil, err - } - - savePointCounter := b.triggerSavePointCounter + 1 - savePointName := fmt.Sprintf("%s%v", TriggerSavePointPrefix, savePointCounter) - ctx.GetLogger().Tracef("TriggerRollback creating savepoint: %s", savePointName) - - ts, ok := ctx.Session.(sql.TransactionSession) - if !ok { - return nil, fmt.Errorf("expected a sql.TransactionSession, but got %T", ctx.Session) - } - - if err := ts.CreateSavepoint(ctx, ctx.GetTransaction(), savePointName); err != nil { - ctx.GetLogger().WithError(err).Errorf("CreateSavepoint failed") - } - b.triggerSavePointCounter = savePointCounter - - return &triggerRollbackIter{ - child: childIter, - savePointName: savePointName, - }, nil -} - func (b *BaseBuilder) buildAlterIndex(ctx *sql.Context, n *plan.AlterIndex, row sql.Row) (sql.RowIter, error) { err := b.executeAlterIndex(ctx, n) if err != nil { diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 0c3bbc0b60..a10f932a50 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -33,6 +33,47 @@ type triggerRollbackIter struct { savePointName string } +func containsTrigger(node sql.Node) bool { + // Check if tree contains a TriggerExecutor + hasTrigger := false + transform.Inspect(node, func(n sql.Node) bool { + switch nn := n.(type) { + case *plan.TriggerExecutor: + hasTrigger = true + return false + case *plan.InsertInto: + // Before Triggers on Inserts are inside Source + if _, ok := nn.Source.(*plan.TriggerExecutor); ok { + hasTrigger = true + return false + } + } + return true + }) + return hasTrigger +} + +func AddTriggerRollbackIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) sql.RowIter { + if !containsTrigger(node) { + return iter + } + + transSess, isTransSess := ctx.Session.(sql.TransactionSession) + if !isTransSess { + return iter + } + + ctx.GetLogger().Tracef("TriggerRollback creating savepoint: %s", TriggerSavePointPrefix) + if err := transSess.CreateSavepoint(ctx, ctx.GetTransaction(), TriggerSavePointPrefix); err != nil { + ctx.GetLogger().WithError(err).Errorf("CreateSavepoint failed") + } + + return &triggerRollbackIter{ + child: iter, + savePointName: TriggerSavePointPrefix, + } +} + func (t *triggerRollbackIter) Next(ctx *sql.Context) (row sql.Row, returnErr error) { childRow, err := t.child.Next(ctx) diff --git a/sql/rowexec/node_builder.gen.go b/sql/rowexec/node_builder.gen.go index f21c8a3ec7..4f2597d683 100644 --- a/sql/rowexec/node_builder.gen.go +++ b/sql/rowexec/node_builder.gen.go @@ -150,8 +150,6 @@ func (b *BaseBuilder) buildNodeExecNoAnalyze(ctx *sql.Context, n sql.Node, row s return b.buildHaving(ctx, n, row) case *plan.Signal: return b.buildSignal(ctx, n, row) - case *plan.TriggerRollback: - return b.buildTriggerRollback(ctx, n, row) case *plan.ExternalProcedure: return b.buildExternalProcedure(ctx, n, row) case *plan.Into: @@ -246,8 +244,6 @@ func (b *BaseBuilder) buildNodeExecNoAnalyze(ctx *sql.Context, n sql.Node, row s return b.buildCreateIndex(ctx, n, row) case *plan.Procedure: return b.buildProcedure(ctx, n, row) - case *plan.NoopTriggerRollback: - return b.buildNoopTriggerRollback(ctx, n, row) case *plan.With: return b.buildWith(ctx, n, row) case *plan.Project: diff --git a/sql/rowexec/transaction.go b/sql/rowexec/transaction.go index 6f1a0829cc..42273eaaa2 100644 --- a/sql/rowexec/transaction.go +++ b/sql/rowexec/transaction.go @@ -156,11 +156,6 @@ func (b *BaseBuilder) buildCommit(ctx *sql.Context, n *plan.Commit, row sql.Row) return sql.RowsToRowIter(), nil } -func (b *BaseBuilder) buildNoopTriggerRollback(ctx *sql.Context, n *plan.NoopTriggerRollback, row sql.Row) (sql.RowIter, error) { - return b.buildNodeExec(ctx, n.Child, row) - -} - func (b *BaseBuilder) buildKill(ctx *sql.Context, n *plan.Kill, row sql.Row) (sql.RowIter, error) { return &lazyRowIter{ func(ctx *sql.Context) (sql.Row, error) { From 1ba8eb36b10104ff6030b38bd955ef4b42ff958c Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 25 Oct 2024 15:30:33 -0700 Subject: [PATCH 05/25] regen plans --- enginetest/queries/integration_plans.go | 5471 +++++++++++------------ 1 file changed, 2728 insertions(+), 2743 deletions(-) diff --git a/enginetest/queries/integration_plans.go b/enginetest/queries/integration_plans.go index d1eae0827d..8eb9613bbe 100644 --- a/enginetest/queries/integration_plans.go +++ b/enginetest/queries/integration_plans.go @@ -17864,47 +17864,46 @@ WHERE nd.FGG57 IS NOT NULL AND nd.KNG7T IS NULL`, Query: ` UPDATE S3FQX SET ADWYM = 0, FPUYA = 0`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ Trigger(CREATE TRIGGER S3FQX_on_update BEFORE UPDATE ON S3FQX\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF NEW.ADWYM NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ADWYM field is an int boolean (0/1).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ADWYM field is an int boolean (0/1).';\n" + - " END IF;\n" + - " IF NEW.FPUYA NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The FPUYA field is an int boolean (0/1).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The FPUYA field is an int boolean (0/1).';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ UpdateSource(SET s3fqx.ADWYM:1!null = 0 (tinyint),SET s3fqx.FPUYA:2!null = 0 (tinyint))\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: S3FQX\n" + - " │ └─ columns: [id adwym fpuya]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: new.ADWYM:4!null\n" + - " │ └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ADWYM field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.FPUYA:5!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The FPUYA field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Update\n" + + " └─ Trigger(CREATE TRIGGER S3FQX_on_update BEFORE UPDATE ON S3FQX\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF NEW.ADWYM NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ADWYM field is an int boolean (0/1).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ADWYM field is an int boolean (0/1).';\n" + + " END IF;\n" + + " IF NEW.FPUYA NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The FPUYA field is an int boolean (0/1).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The FPUYA field is an int boolean (0/1).';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ UpdateSource(SET s3fqx.ADWYM:1!null = 0 (tinyint),SET s3fqx.FPUYA:2!null = 0 (tinyint))\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: S3FQX\n" + + " │ └─ columns: [id adwym fpuya]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: new.ADWYM:4!null\n" + + " │ └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ADWYM field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.FPUYA:5!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The FPUYA field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + "", }, { @@ -17921,68 +17920,67 @@ FROM YK2GW WHERE id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, NFRYN, IXUXU, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: THNTS\n" + - " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER THNTS_on_insert BEFORE INSERT ON THNTS\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.IXUXU IS NULL\n" + - " THEN\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The IXUXU field is mandatory.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NFRYN:1!null, IXUXU:2, FHCYT:3]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jmrql.id:34!null]\n" + - " │ │ └─ IndexedTableAccess(JMRQL)\n" + - " │ │ ├─ index: [JMRQL.DZLIM]\n" + - " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + - " │ │ ├─ colSet: (36-38)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JMRQL\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [yk2gw.id:0!null, yk2gw.FTQLQ:1!null, yk2gw.TUXML:2, yk2gw.PAEF5:3, yk2gw.RUCY4:4, yk2gw.TPNJ6:5!null, yk2gw.LBL53:6, yk2gw.NB3QS:7, yk2gw.EO7IV:8, yk2gw.MUHJF:9, yk2gw.FM34L:10, yk2gw.TY5RF:11, yk2gw.ZHTLH:12, yk2gw.NPB7W:13, yk2gw.SX3HH:14, yk2gw.ISBNF:15, yk2gw.YA7YB:16, yk2gw.C5YKB:17, yk2gw.QK7KT:18, yk2gw.FFGE6:19, yk2gw.FIIGJ:20, yk2gw.SH3NC:21, yk2gw.NTENA:22, yk2gw.M4AUB:23, yk2gw.X5AIR:24, yk2gw.SAB6M:25, yk2gw.G5QI5:26, yk2gw.ZVQVD:27, yk2gw.YKSSU:28, yk2gw.FHCYT:29, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jmrql.id:30!null]\n" + - " │ │ └─ IndexedTableAccess(JMRQL)\n" + - " │ │ ├─ index: [JMRQL.DZLIM]\n" + - " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + - " │ │ ├─ colSet: (36-38)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JMRQL\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + - " │ └─ IndexedTableAccess(YK2GW)\n" + - " │ ├─ index: [YK2GW.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (5-34)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: YK2GW\n" + - " │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(new.IXUXU:2 IS NULL)\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The IXUXU field is mandatory., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, NFRYN, IXUXU, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: THNTS\n" + + " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER THNTS_on_insert BEFORE INSERT ON THNTS\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.IXUXU IS NULL\n" + + " THEN\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The IXUXU field is mandatory.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NFRYN:1!null, IXUXU:2, FHCYT:3]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jmrql.id:34!null]\n" + + " │ │ └─ IndexedTableAccess(JMRQL)\n" + + " │ │ ├─ index: [JMRQL.DZLIM]\n" + + " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + + " │ │ ├─ colSet: (36-38)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JMRQL\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [yk2gw.id:0!null, yk2gw.FTQLQ:1!null, yk2gw.TUXML:2, yk2gw.PAEF5:3, yk2gw.RUCY4:4, yk2gw.TPNJ6:5!null, yk2gw.LBL53:6, yk2gw.NB3QS:7, yk2gw.EO7IV:8, yk2gw.MUHJF:9, yk2gw.FM34L:10, yk2gw.TY5RF:11, yk2gw.ZHTLH:12, yk2gw.NPB7W:13, yk2gw.SX3HH:14, yk2gw.ISBNF:15, yk2gw.YA7YB:16, yk2gw.C5YKB:17, yk2gw.QK7KT:18, yk2gw.FFGE6:19, yk2gw.FIIGJ:20, yk2gw.SH3NC:21, yk2gw.NTENA:22, yk2gw.M4AUB:23, yk2gw.X5AIR:24, yk2gw.SAB6M:25, yk2gw.G5QI5:26, yk2gw.ZVQVD:27, yk2gw.YKSSU:28, yk2gw.FHCYT:29, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jmrql.id:30!null]\n" + + " │ │ └─ IndexedTableAccess(JMRQL)\n" + + " │ │ ├─ index: [JMRQL.DZLIM]\n" + + " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + + " │ │ ├─ colSet: (36-38)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JMRQL\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + + " │ └─ IndexedTableAccess(YK2GW)\n" + + " │ ├─ index: [YK2GW.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (5-34)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: YK2GW\n" + + " │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(new.IXUXU:2 IS NULL)\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The IXUXU field is mandatory., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18019,122 +18017,121 @@ FROM AND rn.WNUNU IS NULL AND rn.HHVLX IS NULL -- Keep only where no corresponding is found ) ITWML`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, WNUNU, HHVLX, HVHRZ, YKSSU, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: QYWQD\n" + - " │ └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER QYWQD_on_insert BEFORE INSERT ON QYWQD\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT FFTBJ FROM NOXN3 WHERE id = NEW.WNUNU) <> (SELECT BRQP2 FROM NOXN3 WHERE id = NEW.HHVLX)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, WNUNU:1!null, HHVLX:2!null, HVHRZ:3!null, YKSSU:4, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, itwml.DRIWM:0!null as WNUNU, itwml.JIEVY:1!null as HHVLX, 1 (decimal(2,1)) as HVHRZ, NULL (null) as YKSSU, NULL (null) as FHCYT]\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: itwml\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (36-38)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Project\n" + - " │ ├─ columns: [sn.id:0!null as DRIWM, skpm6.id:4!null as JIEVY, sn.ECDKM:2 as HVHRZ]\n" + - " │ └─ Filter\n" + - " │ ├─ AND\n" + - " │ │ ├─ rn.WNUNU:6!null IS NULL\n" + - " │ │ └─ rn.HHVLX:7!null IS NULL\n" + - " │ └─ LeftOuterLookupJoin\n" + - " │ ├─ Eq\n" + - " │ │ ├─ rn.HHVLX:7!null\n" + - " │ │ └─ skpm6.id:4!null\n" + - " │ ├─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ sn.FFTBJ:1!null\n" + - " │ │ │ └─ skpm6.BRQP2:5!null\n" + - " │ │ ├─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ sn.NUMK2:3!null\n" + - " │ │ │ │ └─ 1 (int)\n" + - " │ │ │ └─ TableAlias(sn)\n" + - " │ │ │ └─ IndexedTableAccess(NOXN3)\n" + - " │ │ │ ├─ index: [NOXN3.FFTBJ]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (7-16)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: NOXN3\n" + - " │ │ │ └─ columns: [id fftbj ecdkm numk2]\n" + - " │ │ └─ TableAlias(skpm6)\n" + - " │ │ └─ IndexedTableAccess(NOXN3)\n" + - " │ │ ├─ index: [NOXN3.BRQP2]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (17-26)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: NOXN3\n" + - " │ │ └─ columns: [id brqp2]\n" + - " │ └─ TableAlias(rn)\n" + - " │ └─ IndexedTableAccess(QYWQD)\n" + - " │ ├─ index: [QYWQD.WNUNU]\n" + - " │ ├─ keys: [sn.id:0!null]\n" + - " │ ├─ colSet: (27-32)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: QYWQD\n" + - " │ └─ columns: [wnunu hhvlx]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ Eq\n" + - " ├─ Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select FFTBJ from NOXN3 where id = NEW.WNUNU\n" + - " │ └─ Project\n" + - " │ ├─ columns: [noxn3.FFTBJ:7!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ noxn3.id:6!null\n" + - " │ │ └─ new.WNUNU:1!null\n" + - " │ └─ IndexedTableAccess(NOXN3)\n" + - " │ ├─ index: [NOXN3.id]\n" + - " │ ├─ keys: [new.WNUNU:1!null]\n" + - " │ ├─ colSet: (13-22)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: NOXN3\n" + - " │ └─ columns: [id fftbj]\n" + - " └─ Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select BRQP2 from NOXN3 where id = NEW.HHVLX\n" + - " └─ Project\n" + - " ├─ columns: [noxn3.BRQP2:7!null]\n" + - " └─ Filter\n" + - " ├─ Eq\n" + - " │ ├─ noxn3.id:6!null\n" + - " │ └─ new.HHVLX:2!null\n" + - " └─ IndexedTableAccess(NOXN3)\n" + - " ├─ index: [NOXN3.id]\n" + - " ├─ keys: [new.HHVLX:2!null]\n" + - " ├─ colSet: (23-32)\n" + - " ├─ tableId: 4\n" + - " └─ Table\n" + - " ├─ name: NOXN3\n" + - " └─ columns: [id brqp2]\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI)., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, WNUNU, HHVLX, HVHRZ, YKSSU, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: QYWQD\n" + + " │ └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER QYWQD_on_insert BEFORE INSERT ON QYWQD\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT FFTBJ FROM NOXN3 WHERE id = NEW.WNUNU) <> (SELECT BRQP2 FROM NOXN3 WHERE id = NEW.HHVLX)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, WNUNU:1!null, HHVLX:2!null, HVHRZ:3!null, YKSSU:4, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, itwml.DRIWM:0!null as WNUNU, itwml.JIEVY:1!null as HHVLX, 1 (decimal(2,1)) as HVHRZ, NULL (null) as YKSSU, NULL (null) as FHCYT]\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: itwml\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (36-38)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Project\n" + + " │ ├─ columns: [sn.id:0!null as DRIWM, skpm6.id:4!null as JIEVY, sn.ECDKM:2 as HVHRZ]\n" + + " │ └─ Filter\n" + + " │ ├─ AND\n" + + " │ │ ├─ rn.WNUNU:6!null IS NULL\n" + + " │ │ └─ rn.HHVLX:7!null IS NULL\n" + + " │ └─ LeftOuterLookupJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ rn.HHVLX:7!null\n" + + " │ │ └─ skpm6.id:4!null\n" + + " │ ├─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ sn.FFTBJ:1!null\n" + + " │ │ │ └─ skpm6.BRQP2:5!null\n" + + " │ │ ├─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ sn.NUMK2:3!null\n" + + " │ │ │ │ └─ 1 (int)\n" + + " │ │ │ └─ TableAlias(sn)\n" + + " │ │ │ └─ IndexedTableAccess(NOXN3)\n" + + " │ │ │ ├─ index: [NOXN3.FFTBJ]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (7-16)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: NOXN3\n" + + " │ │ │ └─ columns: [id fftbj ecdkm numk2]\n" + + " │ │ └─ TableAlias(skpm6)\n" + + " │ │ └─ IndexedTableAccess(NOXN3)\n" + + " │ │ ├─ index: [NOXN3.BRQP2]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (17-26)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: NOXN3\n" + + " │ │ └─ columns: [id brqp2]\n" + + " │ └─ TableAlias(rn)\n" + + " │ └─ IndexedTableAccess(QYWQD)\n" + + " │ ├─ index: [QYWQD.WNUNU]\n" + + " │ ├─ keys: [sn.id:0!null]\n" + + " │ ├─ colSet: (27-32)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: QYWQD\n" + + " │ └─ columns: [wnunu hhvlx]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ Eq\n" + + " ├─ Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select FFTBJ from NOXN3 where id = NEW.WNUNU\n" + + " │ └─ Project\n" + + " │ ├─ columns: [noxn3.FFTBJ:7!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ noxn3.id:6!null\n" + + " │ │ └─ new.WNUNU:1!null\n" + + " │ └─ IndexedTableAccess(NOXN3)\n" + + " │ ├─ index: [NOXN3.id]\n" + + " │ ├─ keys: [new.WNUNU:1!null]\n" + + " │ ├─ colSet: (13-22)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: NOXN3\n" + + " │ └─ columns: [id fftbj]\n" + + " └─ Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select BRQP2 from NOXN3 where id = NEW.HHVLX\n" + + " └─ Project\n" + + " ├─ columns: [noxn3.BRQP2:7!null]\n" + + " └─ Filter\n" + + " ├─ Eq\n" + + " │ ├─ noxn3.id:6!null\n" + + " │ └─ new.HHVLX:2!null\n" + + " └─ IndexedTableAccess(NOXN3)\n" + + " ├─ index: [NOXN3.id]\n" + + " ├─ keys: [new.HHVLX:2!null]\n" + + " ├─ colSet: (23-32)\n" + + " ├─ tableId: 4\n" + + " └─ Table\n" + + " ├─ name: NOXN3\n" + + " └─ columns: [id brqp2]\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI)., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18150,65 +18147,64 @@ FROM TDRVG WHERE id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, QZ7E7, SSHPJ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: WE72E\n" + - " │ └─ columns: [id qz7e7 sshpj fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER WE72E_on_insert BEFORE INSERT ON WE72E\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.QZ7E7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.SSHPJ IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, QZ7E7:1!null, SSHPJ:2!null, FHCYT:3]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tdrvg.id:0!null, tdrvg.SFJ6L:2!null, tdrvg.SSHPJ:1!null, NULL (null) as FHCYT]\n" + - " │ └─ IndexedTableAccess(TDRVG)\n" + - " │ ├─ index: [TDRVG.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (5-9)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: TDRVG\n" + - " │ └─ columns: [id sshpj sfj6l]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(Or\n" + - " ├─ InSubquery\n" + - " │ ├─ left: new.QZ7E7:1!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (9,10)\n" + - " │ └─ tableId: 3\n" + - " └─ InSubquery\n" + - " ├─ left: new.SSHPJ:2!null\n" + - " └─ right: Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " └─ Table\n" + - " ├─ name: TPXHZ\n" + - " ├─ columns: [svaz4]\n" + - " ├─ colSet: (11,12)\n" + - " └─ tableId: 4\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, QZ7E7, SSHPJ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: WE72E\n" + + " │ └─ columns: [id qz7e7 sshpj fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER WE72E_on_insert BEFORE INSERT ON WE72E\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.QZ7E7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.SSHPJ IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, QZ7E7:1!null, SSHPJ:2!null, FHCYT:3]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tdrvg.id:0!null, tdrvg.SFJ6L:2!null, tdrvg.SSHPJ:1!null, NULL (null) as FHCYT]\n" + + " │ └─ IndexedTableAccess(TDRVG)\n" + + " │ ├─ index: [TDRVG.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (5-9)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: TDRVG\n" + + " │ └─ columns: [id sshpj sfj6l]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(Or\n" + + " ├─ InSubquery\n" + + " │ ├─ left: new.QZ7E7:1!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (9,10)\n" + + " │ └─ tableId: 3\n" + + " └─ InSubquery\n" + + " ├─ left: new.SSHPJ:2!null\n" + + " └─ right: Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " └─ Table\n" + + " ├─ name: TPXHZ\n" + + " ├─ columns: [svaz4]\n" + + " ├─ colSet: (11,12)\n" + + " └─ tableId: 4\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18253,202 +18249,201 @@ ON YBBG5.id = nd.XQDYT WHERE ufc.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, LUEVY, XQDYT, AMYXQ, OZTQF, Z35GY, KKGN5)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: AMYXQ\n" + - " │ └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + - " └─ Trigger(CREATE TRIGGER AMYXQ_on_insert BEFORE INSERT ON AMYXQ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT FGG57 FROM E2I7U WHERE id = NEW.LUEVY) IS NULL\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.AMYXQ < 0 OR NEW.OZTQF < 0 OR NEW.Z35GY < 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'All values in AMYXQ must ne non-negative.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'All values in AMYXQ must ne non-negative.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, XQDYT:3!null, AMYXQ:4!null, OZTQF:5!null, Z35GY:6!null, KKGN5:7]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:41!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:40!null\n" + - " │ │ │ └─ ufc.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ cla.id:39!null\n" + - " │ │ │ └─ bs.IXUXU:42\n" + - " │ │ ├─ TableAlias(cla)\n" + - " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ │ ├─ index: [YK2GW.id]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (45-74)\n" + - " │ │ │ ├─ tableId: 6\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: YK2GW\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ └─ TableAlias(bs)\n" + - " │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (41-44)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: THNTS\n" + - " │ │ └─ columns: [id ixuxu]\n" + - " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ KTNZ2 (longtext)\n" + - " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ HIID2 (longtext)\n" + - " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ SH7TP (longtext)\n" + - " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ VVKNB (longtext)\n" + - " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ DN3OQ (longtext)\n" + - " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, LUEVY, XQDYT, AMYXQ, OZTQF, Z35GY, KKGN5)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: AMYXQ\n" + + " │ └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + + " └─ Trigger(CREATE TRIGGER AMYXQ_on_insert BEFORE INSERT ON AMYXQ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT FGG57 FROM E2I7U WHERE id = NEW.LUEVY) IS NULL\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.AMYXQ < 0 OR NEW.OZTQF < 0 OR NEW.Z35GY < 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'All values in AMYXQ must ne non-negative.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'All values in AMYXQ must ne non-negative.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, XQDYT:3!null, AMYXQ:4!null, OZTQF:5!null, Z35GY:6!null, KKGN5:7]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:41!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:40!null\n" + + " │ │ │ └─ ufc.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ cla.id:39!null\n" + + " │ │ │ └─ bs.IXUXU:42\n" + + " │ │ ├─ TableAlias(cla)\n" + + " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ │ ├─ index: [YK2GW.id]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (45-74)\n" + + " │ │ │ ├─ tableId: 6\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: YK2GW\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ └─ TableAlias(bs)\n" + + " │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (41-44)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: THNTS\n" + + " │ │ └─ columns: [id ixuxu]\n" + + " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ KTNZ2 (longtext)\n" + + " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ HIID2 (longtext)\n" + + " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ SH7TP (longtext)\n" + + " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ VVKNB (longtext)\n" + + " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ DN3OQ (longtext)\n" + + " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ufc.id:0!null, ufc.T4IBQ:1, ufc.ZH72S:2, ufc.AMYXQ:3, ufc.KTNZ2:4, ufc.HIID2:5, ufc.DN3OQ:6, ufc.VVKNB:7, ufc.SH7TP:8, ufc.SRZZO:9, ufc.QZ6VT:10, nd.id:11!null, nd.DKCAJ:12!null, nd.KNG7T:13, nd.TW55N:14!null, nd.QRQXW:15!null, nd.ECXAJ:16!null, nd.FGG57:17, nd.ZH72S:18, nd.FSK67:19!null, nd.XQDYT:20!null, nd.TCE7A:21, nd.IWV2H:22, nd.HPCMS:23!null, nd.N5CC2:24, nd.FHCYT:25, nd.ETAQ7:26, nd.A75X7:27, ybbg5.id:28!null, ybbg5.DZLIM:29!null, ybbg5.F3YUE:30, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:33!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:32!null\n" + + " │ │ │ └─ ufc.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ cla.id:31!null\n" + + " │ │ │ └─ bs.IXUXU:34\n" + + " │ │ ├─ TableAlias(cla)\n" + + " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ │ ├─ index: [YK2GW.id]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (45-74)\n" + + " │ │ │ ├─ tableId: 6\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: YK2GW\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ └─ TableAlias(bs)\n" + + " │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (41-44)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: THNTS\n" + + " │ │ └─ columns: [id ixuxu]\n" + + " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ KTNZ2 (longtext)\n" + + " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ HIID2 (longtext)\n" + + " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ SH7TP (longtext)\n" + + " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ VVKNB (longtext)\n" + + " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ DN3OQ (longtext)\n" + + " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + " │ └─ InnerJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ nd.ZH72S:18\n" + + " │ │ └─ ufc.ZH72S:2\n" + + " │ ├─ TableAlias(ufc)\n" + + " │ │ └─ IndexedTableAccess(SISUT)\n" + + " │ │ ├─ index: [SISUT.id]\n" + + " │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ ├─ colSet: (9-19)\n" + + " │ │ ├─ tableId: 2\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SISUT\n" + + " │ │ └─ columns: [id t4ibq zh72s amyxq ktnz2 hiid2 dn3oq vvknb sh7tp srzzo qz6vt]\n" + + " │ └─ MergeJoin\n" + + " │ ├─ cmp: Eq\n" + + " │ │ ├─ nd.XQDYT:20!null\n" + + " │ │ └─ ybbg5.id:28!null\n" + + " │ ├─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.XQDYT]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (20-36)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(ybbg5)\n" + + " │ └─ IndexedTableAccess(XGSJM)\n" + + " │ ├─ index: [XGSJM.id]\n" + + " │ ├─ static: [{[NULL, ∞)}]\n" + + " │ ├─ colSet: (37-39)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: XGSJM\n" + + " │ └─ columns: [id dzlim f3yue]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select FGG57 from E2I7U where id = NEW.LUEVY\n" + " │ └─ Project\n" + - " │ ├─ columns: [ufc.id:0!null, ufc.T4IBQ:1, ufc.ZH72S:2, ufc.AMYXQ:3, ufc.KTNZ2:4, ufc.HIID2:5, ufc.DN3OQ:6, ufc.VVKNB:7, ufc.SH7TP:8, ufc.SRZZO:9, ufc.QZ6VT:10, nd.id:11!null, nd.DKCAJ:12!null, nd.KNG7T:13, nd.TW55N:14!null, nd.QRQXW:15!null, nd.ECXAJ:16!null, nd.FGG57:17, nd.ZH72S:18, nd.FSK67:19!null, nd.XQDYT:20!null, nd.TCE7A:21, nd.IWV2H:22, nd.HPCMS:23!null, nd.N5CC2:24, nd.FHCYT:25, nd.ETAQ7:26, nd.A75X7:27, ybbg5.id:28!null, ybbg5.DZLIM:29!null, ybbg5.F3YUE:30, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:33!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:32!null\n" + - " │ │ │ └─ ufc.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ cla.id:31!null\n" + - " │ │ │ └─ bs.IXUXU:34\n" + - " │ │ ├─ TableAlias(cla)\n" + - " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ │ ├─ index: [YK2GW.id]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (45-74)\n" + - " │ │ │ ├─ tableId: 6\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: YK2GW\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ └─ TableAlias(bs)\n" + - " │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (41-44)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: THNTS\n" + - " │ │ └─ columns: [id ixuxu]\n" + - " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ KTNZ2 (longtext)\n" + - " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ HIID2 (longtext)\n" + - " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ SH7TP (longtext)\n" + - " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ VVKNB (longtext)\n" + - " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ DN3OQ (longtext)\n" + - " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + - " │ └─ InnerJoin\n" + + " │ ├─ columns: [e2i7u.FGG57:9]\n" + + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ nd.ZH72S:18\n" + - " │ │ └─ ufc.ZH72S:2\n" + - " │ ├─ TableAlias(ufc)\n" + - " │ │ └─ IndexedTableAccess(SISUT)\n" + - " │ │ ├─ index: [SISUT.id]\n" + - " │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ ├─ colSet: (9-19)\n" + - " │ │ ├─ tableId: 2\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SISUT\n" + - " │ │ └─ columns: [id t4ibq zh72s amyxq ktnz2 hiid2 dn3oq vvknb sh7tp srzzo qz6vt]\n" + - " │ └─ MergeJoin\n" + - " │ ├─ cmp: Eq\n" + - " │ │ ├─ nd.XQDYT:20!null\n" + - " │ │ └─ ybbg5.id:28!null\n" + - " │ ├─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.XQDYT]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (20-36)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(ybbg5)\n" + - " │ └─ IndexedTableAccess(XGSJM)\n" + - " │ ├─ index: [XGSJM.id]\n" + - " │ ├─ static: [{[NULL, ∞)}]\n" + - " │ ├─ colSet: (37-39)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: XGSJM\n" + - " │ └─ columns: [id dzlim f3yue]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select FGG57 from E2I7U where id = NEW.LUEVY\n" + - " │ └─ Project\n" + - " │ ├─ columns: [e2i7u.FGG57:9]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ e2i7u.id:8!null\n" + - " │ │ └─ new.LUEVY:2!null\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.id]\n" + - " │ ├─ keys: [new.LUEVY:2!null]\n" + - " │ ├─ colSet: (17-33)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id fgg57]\n" + - " │ IS NULL)\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(Or\n" + - " ├─ Or\n" + - " │ ├─ LessThan\n" + - " │ │ ├─ new.AMYXQ:4!null\n" + - " │ │ └─ 0 (tinyint)\n" + - " │ └─ LessThan\n" + - " │ ├─ new.OZTQF:5!null\n" + - " │ └─ 0 (tinyint)\n" + - " └─ LessThan\n" + - " ├─ new.Z35GY:6!null\n" + - " └─ 0 (tinyint)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = All values in AMYXQ must ne non-negative., MYSQL_ERRNO = 1644\n" + + " │ │ ├─ e2i7u.id:8!null\n" + + " │ │ └─ new.LUEVY:2!null\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.id]\n" + + " │ ├─ keys: [new.LUEVY:2!null]\n" + + " │ ├─ colSet: (17-33)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id fgg57]\n" + + " │ IS NULL)\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(Or\n" + + " ├─ Or\n" + + " │ ├─ LessThan\n" + + " │ │ ├─ new.AMYXQ:4!null\n" + + " │ │ └─ 0 (tinyint)\n" + + " │ └─ LessThan\n" + + " │ ├─ new.OZTQF:5!null\n" + + " │ └─ 0 (tinyint)\n" + + " └─ LessThan\n" + + " ├─ new.Z35GY:6!null\n" + + " └─ 0 (tinyint)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = All values in AMYXQ must ne non-negative., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18469,180 +18464,179 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[NER, NER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[NER, NER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[NER, NER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[NER, NER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18663,180 +18657,179 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[BER, BER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[BER, BER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[BER, BER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[BER, BER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18857,180 +18850,179 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[HR, HR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[HR, HR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[HR, HR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[HR, HR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19051,180 +19043,179 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[MMR, MMR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[MMR, MMR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[MMR, MMR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[MMR, MMR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19250,86 +19241,85 @@ WHERE AND umf.id IN ('1','2','3') ) NCVD2`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, BTXC5, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXBU\n" + - " │ └─ columns: [id btxc5 fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER TPXBU_on_insert BEFORE INSERT ON TPXBU\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.BTXC5 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, BTXC5:1, FHCYT:2]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, ncvd2.BTXC5:0 as BTXC5, NULL (null) as FHCYT]\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: ncvd2\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (33)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.SYPKF:8 as BTXC5]\n" + - " │ └─ Filter\n" + - " │ ├─ AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ ├─ left: umf.SYPKF:8\n" + - " │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ ├─ alias-string: select BTXC5 from TPXBU where BTXC5 is not null\n" + - " │ │ │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ │ │ ├─ colSet: (29-31)\n" + - " │ │ │ │ ├─ tableId: 3\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: TPXBU\n" + - " │ │ │ │ └─ columns: [btxc5]\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ umf.SYPKF:8 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ └─ TableAlias(umf)\n" + - " │ └─ IndexedTableAccess(NZKPM)\n" + - " │ ├─ index: [NZKPM.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (4-28)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: NZKPM\n" + - " │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(InSubquery\n" + - " ├─ left: new.BTXC5:1\n" + - " └─ right: Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " └─ Table\n" + - " ├─ name: TPXHZ\n" + - " ├─ columns: [svaz4]\n" + - " ├─ colSet: (7,8)\n" + - " └─ tableId: 3\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, BTXC5, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXBU\n" + + " │ └─ columns: [id btxc5 fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER TPXBU_on_insert BEFORE INSERT ON TPXBU\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.BTXC5 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, BTXC5:1, FHCYT:2]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, ncvd2.BTXC5:0 as BTXC5, NULL (null) as FHCYT]\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: ncvd2\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (33)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.SYPKF:8 as BTXC5]\n" + + " │ └─ Filter\n" + + " │ ├─ AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ ├─ left: umf.SYPKF:8\n" + + " │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ ├─ alias-string: select BTXC5 from TPXBU where BTXC5 is not null\n" + + " │ │ │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ │ │ ├─ colSet: (29-31)\n" + + " │ │ │ │ ├─ tableId: 3\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: TPXBU\n" + + " │ │ │ │ └─ columns: [btxc5]\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ umf.SYPKF:8 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ └─ TableAlias(umf)\n" + + " │ └─ IndexedTableAccess(NZKPM)\n" + + " │ ├─ index: [NZKPM.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (4-28)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: NZKPM\n" + + " │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(InSubquery\n" + + " ├─ left: new.BTXC5:1\n" + + " └─ right: Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " └─ Table\n" + + " ├─ name: TPXHZ\n" + + " ├─ columns: [svaz4]\n" + + " ├─ colSet: (7,8)\n" + + " └─ tableId: 3\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19401,424 +19391,423 @@ ON TJ5D2.SYPKF = umf.SYPKF INNER JOIN YK2GW cla ON umf.T4IBQ = cla.FTQLQ INNER JOIN THNTS bs ON cla.id = bs.IXUXU`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, LUEVY, M22QN, TJPT7, ARN5P, XOSD4, IDE43, HMW4H, ZBT6R, FSDY2, LT7K6, SPPYD, QCGTS, TEUJA, QQV4M, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: HGMQ6\n" + - " │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER HGMQ6_on_insert BEFORE INSERT ON HGMQ6\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.TJPT7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.ARN5P IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.XOSD4 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.IDE43 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.HMW4H IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.FSDY2 NOT IN ('benign', 'VUS', 'SRARY', 'UBQWG')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + - " END IF;\n" + - " IF NEW.LT7K6 IS NOT NULL AND NEW.SPPYD IS NOT NULL\n" + - " THEN\n" + - " -- SET @custom_error_message = 'If LT7K6 has value, SPPYD must be NULL.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 has value, SPPYD must be NULL.';\n" + - " END IF;\n" + - " IF NEW.LT7K6 IS NULL AND (NEW.SPPYD IS NULL OR NEW.SPPYD <> 0.5)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, M22QN:3!null, TJPT7:4!null, ARN5P:5!null, XOSD4:6!null, IDE43:7, HMW4H:8, ZBT6R:9, FSDY2:10!null, LT7K6:11, SPPYD:12, QCGTS:13, TEUJA:14, QQV4M:15, FHCYT:16]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + - " │ │ └─ tj5d2.id:25!null IS NULL\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id_overridden.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id_overridden.TW55N:85!null\n" + - " │ │ │ └─ tj5d2.H4DMT:29!null\n" + - " │ │ └─ TableAlias(nd_for_id_overridden)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + - " │ │ ├─ colSet: (159-175)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id.FGG57:85\n" + - " │ │ │ └─ umf.FGG57:2\n" + - " │ │ └─ TableAlias(nd_for_id)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ ├─ colSet: (176-192)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id fgg57]\n" + - " │ │ END as LUEVY, CASE WHEN Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:84!null]\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ static: [{[NULL, NULL]}]\n" + - " │ │ ├─ colSet: (194-196)\n" + - " │ │ ├─ tableId: 11\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, GXLUB, LUEVY, M22QN, TJPT7, ARN5P, XOSD4, IDE43, HMW4H, ZBT6R, FSDY2, LT7K6, SPPYD, QCGTS, TEUJA, QQV4M, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: HGMQ6\n" + + " │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER HGMQ6_on_insert BEFORE INSERT ON HGMQ6\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.TJPT7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.ARN5P IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.XOSD4 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.IDE43 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.HMW4H IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.FSDY2 NOT IN ('benign', 'VUS', 'SRARY', 'UBQWG')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + + " END IF;\n" + + " IF NEW.LT7K6 IS NOT NULL AND NEW.SPPYD IS NOT NULL\n" + + " THEN\n" + + " -- SET @custom_error_message = 'If LT7K6 has value, SPPYD must be NULL.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 has value, SPPYD must be NULL.';\n" + + " END IF;\n" + + " IF NEW.LT7K6 IS NULL AND (NEW.SPPYD IS NULL OR NEW.SPPYD <> 0.5)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, M22QN:3!null, TJPT7:4!null, ARN5P:5!null, XOSD4:6!null, IDE43:7, HMW4H:8, ZBT6R:9, FSDY2:10!null, LT7K6:11, SPPYD:12, QCGTS:13, TEUJA:14, QQV4M:15, FHCYT:16]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + + " │ │ └─ tj5d2.id:25!null IS NULL\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id_overridden.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id_overridden.TW55N:85!null\n" + + " │ │ │ └─ tj5d2.H4DMT:29!null\n" + + " │ │ └─ TableAlias(nd_for_id_overridden)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + + " │ │ ├─ colSet: (159-175)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id.FGG57:85\n" + + " │ │ │ └─ umf.FGG57:2\n" + + " │ │ └─ TableAlias(nd_for_id)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ ├─ colSet: (176-192)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id fgg57]\n" + + " │ │ END as LUEVY, CASE WHEN Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:84!null]\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ static: [{[NULL, NULL]}]\n" + + " │ │ ├─ colSet: (194-196)\n" + + " │ │ ├─ tableId: 11\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:85\n" + + " │ │ │ └─ umf.SYPKF:8\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [umf.SYPKF:8]\n" + + " │ │ ├─ colSet: (197-199)\n" + + " │ │ ├─ tableId: 12\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.HMW4H:14\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.S76OM:15\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.FSDY2:12\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.vaf:16\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.ZROH6:17\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.QCGTS:18\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.id:0!null, umf.T4IBQ:1, umf.FGG57:2, umf.SSHPJ:3, umf.NLA6O:4, umf.SFJ6L:5, umf.TJPT7:6, umf.ARN5P:7, umf.SYPKF:8, umf.IVFMK:9, umf.IDE43:10, umf.AZ6SP:11, umf.FSDY2:12, umf.XOSD4:13, umf.HMW4H:14, umf.S76OM:15, umf.vaf:16, umf.ZROH6:17, umf.QCGTS:18, umf.LNFM6:19, umf.TVAWL:20, umf.HDLCL:21, umf.BHHW6:22, umf.FHCYT:23, umf.QZ6VT:24, tj5d2.id:25!null, tj5d2.T4IBQ:26!null, tj5d2.V7UFH:27!null, tj5d2.SYPKF:28!null, tj5d2.H4DMT:29!null, tj5d2.SWCQV:30!null, tj5d2.YKSSU:31, tj5d2.FHCYT:32, cla.id:33!null, cla.FTQLQ:34!null, cla.TUXML:35, cla.PAEF5:36, cla.RUCY4:37, cla.TPNJ6:38!null, cla.LBL53:39, cla.NB3QS:40, cla.EO7IV:41, cla.MUHJF:42, cla.FM34L:43, cla.TY5RF:44, cla.ZHTLH:45, cla.NPB7W:46, cla.SX3HH:47, cla.ISBNF:48, cla.YA7YB:49, cla.C5YKB:50, cla.QK7KT:51, cla.FFGE6:52, cla.FIIGJ:53, cla.SH3NC:54, cla.NTENA:55, cla.M4AUB:56, cla.X5AIR:57, cla.SAB6M:58, cla.G5QI5:59, cla.ZVQVD:60, cla.YKSSU:61, cla.FHCYT:62, bs.id:63!null, bs.NFRYN:64!null, bs.IXUXU:65, bs.FHCYT:66, umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + + " │ │ └─ tj5d2.id:25!null IS NULL\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id_overridden.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id_overridden.TW55N:68!null\n" + + " │ │ │ └─ tj5d2.H4DMT:29!null\n" + + " │ │ └─ TableAlias(nd_for_id_overridden)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + + " │ │ ├─ colSet: (159-175)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id.FGG57:68\n" + + " │ │ │ └─ umf.FGG57:2\n" + + " │ │ └─ TableAlias(nd_for_id)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ ├─ colSet: (176-192)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id fgg57]\n" + + " │ │ END as LUEVY, CASE WHEN Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:67!null]\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ static: [{[NULL, NULL]}]\n" + + " │ │ ├─ colSet: (194-196)\n" + + " │ │ ├─ tableId: 11\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:68\n" + + " │ │ │ └─ umf.SYPKF:8\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [umf.SYPKF:8]\n" + + " │ │ ├─ colSet: (197-199)\n" + + " │ │ ├─ tableId: 12\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.HMW4H:14\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.S76OM:15\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.FSDY2:12\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.vaf:16\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.ZROH6:17\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.QCGTS:18\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + + " │ └─ LookupJoin\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ LeftOuterJoin\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ ├─ tj5d2.SWCQV:30!null\n" + + " │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ tj5d2.T4IBQ:26!null\n" + + " │ │ │ │ │ │ └─ umf.T4IBQ:1\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tj5d2.V7UFH:27!null\n" + + " │ │ │ │ │ └─ umf.FGG57:2\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tj5d2.SYPKF:28!null\n" + + " │ │ │ │ └─ umf.SYPKF:8\n" + + " │ │ │ ├─ SubqueryAlias\n" + + " │ │ │ │ ├─ name: umf\n" + + " │ │ │ │ ├─ outerVisibility: false\n" + + " │ │ │ │ ├─ isLateral: false\n" + + " │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ ├─ colSet: (90-114)\n" + + " │ │ │ │ ├─ tableId: 5\n" + + " │ │ │ │ └─ Filter\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ InSubquery\n" + + " │ │ │ │ │ │ │ ├─ left: nzkpm.T4IBQ:1\n" + + " │ │ │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ │ │ │ ├─ alias-string: select FTQLQ from YK2GW\n" + + " │ │ │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ │ │ ├─ name: YK2GW\n" + + " │ │ │ │ │ │ │ ├─ columns: [ftqlq]\n" + + " │ │ │ │ │ │ │ ├─ colSet: (43-72)\n" + + " │ │ │ │ │ │ │ └─ tableId: 3\n" + + " │ │ │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ │ │ ├─ left: nzkpm.FGG57:2\n" + + " │ │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ │ │ ├─ alias-string: select FGG57 from E2I7U where FGG57 is not null\n" + + " │ │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ │ │ │ │ ├─ colSet: (73-89)\n" + + " │ │ │ │ │ │ ├─ tableId: 4\n" + + " │ │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ │ └─ columns: [fgg57]\n" + + " │ │ │ │ │ └─ NOT\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ nzkpm.ARN5P:7\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ IndexedTableAccess(NZKPM)\n" + + " │ │ │ │ ├─ index: [NZKPM.id]\n" + + " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ │ ├─ colSet: (18-42)\n" + + " │ │ │ │ ├─ tableId: 2\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: NZKPM\n" + + " │ │ │ │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + + " │ │ │ └─ TableAlias(tj5d2)\n" + + " │ │ │ └─ ProcessTable\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SZW6V\n" + + " │ │ │ └─ columns: [id t4ibq v7ufh sypkf h4dmt swcqv ykssu fhcyt]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.FTQLQ]\n" + + " │ │ ├─ keys: [umf.T4IBQ:1]\n" + + " │ │ ├─ colSet: (123-152)\n" + + " │ │ ├─ tableId: 7\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + + " │ └─ TableAlias(bs)\n" + + " │ └─ IndexedTableAccess(THNTS)\n" + + " │ ├─ index: [THNTS.IXUXU]\n" + + " │ ├─ keys: [cla.id:33!null]\n" + + " │ ├─ colSet: (153-156)\n" + + " │ ├─ tableId: 8\n" + + " │ └─ Table\n" + + " │ ├─ name: THNTS\n" + + " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ Or\n" + + " │ │ ├─ Or\n" + + " │ │ │ ├─ Or\n" + + " │ │ │ │ ├─ InSubquery\n" + + " │ │ │ │ │ ├─ left: new.TJPT7:4!null\n" + + " │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ │ │ ├─ colSet: (35,36)\n" + + " │ │ │ │ │ └─ tableId: 3\n" + + " │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ ├─ left: new.ARN5P:5!null\n" + + " │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ │ ├─ colSet: (37,38)\n" + + " │ │ │ │ └─ tableId: 4\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: new.XOSD4:6!null\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ ├─ colSet: (39,40)\n" + + " │ │ │ └─ tableId: 5\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: new.IDE43:7\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:85\n" + - " │ │ │ └─ umf.SYPKF:8\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [umf.SYPKF:8]\n" + - " │ │ ├─ colSet: (197-199)\n" + - " │ │ ├─ tableId: 12\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.HMW4H:14\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.S76OM:15\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.FSDY2:12\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.vaf:16\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.ZROH6:17\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.QCGTS:18\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.id:0!null, umf.T4IBQ:1, umf.FGG57:2, umf.SSHPJ:3, umf.NLA6O:4, umf.SFJ6L:5, umf.TJPT7:6, umf.ARN5P:7, umf.SYPKF:8, umf.IVFMK:9, umf.IDE43:10, umf.AZ6SP:11, umf.FSDY2:12, umf.XOSD4:13, umf.HMW4H:14, umf.S76OM:15, umf.vaf:16, umf.ZROH6:17, umf.QCGTS:18, umf.LNFM6:19, umf.TVAWL:20, umf.HDLCL:21, umf.BHHW6:22, umf.FHCYT:23, umf.QZ6VT:24, tj5d2.id:25!null, tj5d2.T4IBQ:26!null, tj5d2.V7UFH:27!null, tj5d2.SYPKF:28!null, tj5d2.H4DMT:29!null, tj5d2.SWCQV:30!null, tj5d2.YKSSU:31, tj5d2.FHCYT:32, cla.id:33!null, cla.FTQLQ:34!null, cla.TUXML:35, cla.PAEF5:36, cla.RUCY4:37, cla.TPNJ6:38!null, cla.LBL53:39, cla.NB3QS:40, cla.EO7IV:41, cla.MUHJF:42, cla.FM34L:43, cla.TY5RF:44, cla.ZHTLH:45, cla.NPB7W:46, cla.SX3HH:47, cla.ISBNF:48, cla.YA7YB:49, cla.C5YKB:50, cla.QK7KT:51, cla.FFGE6:52, cla.FIIGJ:53, cla.SH3NC:54, cla.NTENA:55, cla.M4AUB:56, cla.X5AIR:57, cla.SAB6M:58, cla.G5QI5:59, cla.ZVQVD:60, cla.YKSSU:61, cla.FHCYT:62, bs.id:63!null, bs.NFRYN:64!null, bs.IXUXU:65, bs.FHCYT:66, umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + - " │ │ └─ tj5d2.id:25!null IS NULL\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id_overridden.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id_overridden.TW55N:68!null\n" + - " │ │ │ └─ tj5d2.H4DMT:29!null\n" + - " │ │ └─ TableAlias(nd_for_id_overridden)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + - " │ │ ├─ colSet: (159-175)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id.FGG57:68\n" + - " │ │ │ └─ umf.FGG57:2\n" + - " │ │ └─ TableAlias(nd_for_id)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ ├─ colSet: (176-192)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id fgg57]\n" + - " │ │ END as LUEVY, CASE WHEN Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:67!null]\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ static: [{[NULL, NULL]}]\n" + - " │ │ ├─ colSet: (194-196)\n" + - " │ │ ├─ tableId: 11\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:68\n" + - " │ │ │ └─ umf.SYPKF:8\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [umf.SYPKF:8]\n" + - " │ │ ├─ colSet: (197-199)\n" + - " │ │ ├─ tableId: 12\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.HMW4H:14\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.S76OM:15\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.FSDY2:12\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.vaf:16\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.ZROH6:17\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.QCGTS:18\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + - " │ └─ LookupJoin\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ LeftOuterJoin\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ ├─ tj5d2.SWCQV:30!null\n" + - " │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ tj5d2.T4IBQ:26!null\n" + - " │ │ │ │ │ │ └─ umf.T4IBQ:1\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tj5d2.V7UFH:27!null\n" + - " │ │ │ │ │ └─ umf.FGG57:2\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tj5d2.SYPKF:28!null\n" + - " │ │ │ │ └─ umf.SYPKF:8\n" + - " │ │ │ ├─ SubqueryAlias\n" + - " │ │ │ │ ├─ name: umf\n" + - " │ │ │ │ ├─ outerVisibility: false\n" + - " │ │ │ │ ├─ isLateral: false\n" + - " │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ ├─ colSet: (90-114)\n" + - " │ │ │ │ ├─ tableId: 5\n" + - " │ │ │ │ └─ Filter\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ InSubquery\n" + - " │ │ │ │ │ │ │ ├─ left: nzkpm.T4IBQ:1\n" + - " │ │ │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ │ │ │ ├─ alias-string: select FTQLQ from YK2GW\n" + - " │ │ │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ │ │ ├─ name: YK2GW\n" + - " │ │ │ │ │ │ │ ├─ columns: [ftqlq]\n" + - " │ │ │ │ │ │ │ ├─ colSet: (43-72)\n" + - " │ │ │ │ │ │ │ └─ tableId: 3\n" + - " │ │ │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ │ │ ├─ left: nzkpm.FGG57:2\n" + - " │ │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ │ │ ├─ alias-string: select FGG57 from E2I7U where FGG57 is not null\n" + - " │ │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ │ │ │ │ ├─ colSet: (73-89)\n" + - " │ │ │ │ │ │ ├─ tableId: 4\n" + - " │ │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ │ └─ columns: [fgg57]\n" + - " │ │ │ │ │ └─ NOT\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ nzkpm.ARN5P:7\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ IndexedTableAccess(NZKPM)\n" + - " │ │ │ │ ├─ index: [NZKPM.id]\n" + - " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ │ ├─ colSet: (18-42)\n" + - " │ │ │ │ ├─ tableId: 2\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: NZKPM\n" + - " │ │ │ │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + - " │ │ │ └─ TableAlias(tj5d2)\n" + - " │ │ │ └─ ProcessTable\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SZW6V\n" + - " │ │ │ └─ columns: [id t4ibq v7ufh sypkf h4dmt swcqv ykssu fhcyt]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.FTQLQ]\n" + - " │ │ ├─ keys: [umf.T4IBQ:1]\n" + - " │ │ ├─ colSet: (123-152)\n" + - " │ │ ├─ tableId: 7\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + - " │ └─ TableAlias(bs)\n" + - " │ └─ IndexedTableAccess(THNTS)\n" + - " │ ├─ index: [THNTS.IXUXU]\n" + - " │ ├─ keys: [cla.id:33!null]\n" + - " │ ├─ colSet: (153-156)\n" + - " │ ├─ tableId: 8\n" + - " │ └─ Table\n" + - " │ ├─ name: THNTS\n" + - " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ Or\n" + - " │ │ ├─ Or\n" + - " │ │ │ ├─ Or\n" + - " │ │ │ │ ├─ InSubquery\n" + - " │ │ │ │ │ ├─ left: new.TJPT7:4!null\n" + - " │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ │ │ ├─ colSet: (35,36)\n" + - " │ │ │ │ │ └─ tableId: 3\n" + - " │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ ├─ left: new.ARN5P:5!null\n" + - " │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ │ ├─ colSet: (37,38)\n" + - " │ │ │ │ └─ tableId: 4\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: new.XOSD4:6!null\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ ├─ colSet: (39,40)\n" + - " │ │ │ └─ tableId: 5\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: new.IDE43:7\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (41,42)\n" + - " │ │ └─ tableId: 6\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.HMW4H:8\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (43,44)\n" + - " │ └─ tableId: 7\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: new.FSDY2:10!null\n" + - " │ └─ right: TUPLE(benign (longtext), VUS (longtext), SRARY (longtext), UBQWG (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = FSDY2 must be either 'benign', 'VUS', 'SRARY' or 'UBQWG'., MYSQL_ERRNO = 1644\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(AND\n" + - " │ ├─ NOT\n" + - " │ │ └─ new.LT7K6:11 IS NULL\n" + - " │ └─ NOT\n" + - " │ └─ new.SPPYD:12 IS NULL\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 has value, SPPYD must be NULL., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(AND\n" + - " ├─ new.LT7K6:11 IS NULL\n" + - " └─ Or\n" + - " ├─ new.SPPYD:12 IS NULL\n" + - " └─ NOT\n" + - " └─ Eq\n" + - " ├─ new.SPPYD:12\n" + - " └─ 0.5 (decimal(2,1))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 does not have value, SPPYD must be 0.5., MYSQL_ERRNO = 1644\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (41,42)\n" + + " │ │ └─ tableId: 6\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.HMW4H:8\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (43,44)\n" + + " │ └─ tableId: 7\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: new.FSDY2:10!null\n" + + " │ └─ right: TUPLE(benign (longtext), VUS (longtext), SRARY (longtext), UBQWG (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = FSDY2 must be either 'benign', 'VUS', 'SRARY' or 'UBQWG'., MYSQL_ERRNO = 1644\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(AND\n" + + " │ ├─ NOT\n" + + " │ │ └─ new.LT7K6:11 IS NULL\n" + + " │ └─ NOT\n" + + " │ └─ new.SPPYD:12 IS NULL\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 has value, SPPYD must be NULL., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(AND\n" + + " ├─ new.LT7K6:11 IS NULL\n" + + " └─ Or\n" + + " ├─ new.SPPYD:12 IS NULL\n" + + " └─ NOT\n" + + " └─ Eq\n" + + " ├─ new.SPPYD:12\n" + + " └─ 0.5 (decimal(2,1))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 does not have value, SPPYD must be 0.5., MYSQL_ERRNO = 1644\n" + "", }, { @@ -20450,251 +20439,250 @@ WHERE AND (rs.NO52D, rs.DKCAJ) NOT IN (SELECT DISTINCT NO52D, DKCAJ FROM SFEGG WHERE VYO5E IS NULL) )`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SFEGG\n" + - " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ADURZ <= 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0 as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 3 (tinyint) WHEN Or\n" + - " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + - " │ │ └─ rs.NO52D LIKE 'EC%'\n" + - " │ │ THEN 3 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ THEN 2 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 4 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0\n" + - " │ │ └─ Ki (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0\n" + - " │ │ └─ Kd (longtext)\n" + - " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: TUPLE(rs.NO52D:0, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ ├─ colSet: (60-65)\n" + - " │ │ │ └─ tableId: 8\n" + - " │ │ └─ AND\n" + - " │ │ ├─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: TUPLE(rs.NO52D:0, rs.DKCAJ:2!null)\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + - " │ │ └─ Distinct\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ ├─ colSet: (66-71)\n" + - " │ │ └─ tableId: 9\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: rs\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (56-59)\n" + - " │ ├─ tableId: 7\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [nk7fp.NO52D:0 as NO52D, CASE WHEN Eq\n" + - " │ │ ├─ nk7fp.VYO5E:1\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN NULL (null) ELSE nk7fp.VYO5E:1 END as VYO5E, nt.id:21!null as DKCAJ, nt.DZLIM:22!null as F35MI]\n" + - " │ └─ HashJoin\n" + - " │ ├─ Eq\n" + - " │ │ ├─ nt.id:21!null\n" + - " │ │ └─ nd.DKCAJ:5!null\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ Or\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ nk7fp.FVUCX:3!null IS NULL\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ nd.ZH72S:11\n" + - " │ │ │ │ └─ nk7fp.ZH72S:2\n" + - " │ │ │ └─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ nk7fp.FVUCX:3!null IS NULL\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ nd.TW55N:7!null\n" + - " │ │ │ └─ nk7fp.FVUCX:3!null\n" + - " │ │ ├─ SubqueryAlias\n" + - " │ │ │ ├─ name: nk7fp\n" + - " │ │ │ ├─ outerVisibility: false\n" + - " │ │ │ ├─ isLateral: false\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ colSet: (28-31)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [uct.NO52D:7, uct.VYO5E:9, uct.ZH72S:2, i7hcr.FVUCX:17!null]\n" + - " │ │ │ └─ LeftOuterJoin\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + - " │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + - " │ │ │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + - " │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ i7hcr.BTXC5:16!null\n" + - " │ │ │ │ └─ uct.LJLUM:5\n" + - " │ │ │ ├─ TableAlias(uct)\n" + - " │ │ │ │ └─ IndexedTableAccess(OUBDL)\n" + - " │ │ │ │ ├─ index: [OUBDL.id]\n" + - " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ │ ├─ colSet: (7-19)\n" + - " │ │ │ │ ├─ tableId: 2\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: OUBDL\n" + - " │ │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + - " │ │ │ └─ TableAlias(i7hcr)\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: EPZU6\n" + - " │ │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + - " │ │ │ ├─ colSet: (20-27)\n" + - " │ │ │ └─ tableId: 3\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ Concat\n" + - " │ │ ├─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [nk7fp.FVUCX:3!null]\n" + - " │ │ │ ├─ colSet: (32-48)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ ├─ keys: [nk7fp.ZH72S:2]\n" + - " │ │ ├─ colSet: (32-48)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ HashLookup\n" + - " │ ├─ left-key: TUPLE(nd.DKCAJ:5!null)\n" + - " │ ├─ right-key: TUPLE(nt.id:0!null)\n" + - " │ └─ TableAlias(nt)\n" + - " │ └─ Table\n" + - " │ ├─ name: F35MI\n" + - " │ ├─ columns: [id dzlim f3yue]\n" + - " │ ├─ colSet: (49-51)\n" + - " │ └─ tableId: 6\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ InSubquery\n" + - " │ │ ├─ left: new.NO52D:1!null\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (13,14)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.VYO5E:2\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (15,16)\n" + - " │ └─ tableId: 4\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(LessThanOrEqual\n" + - " ├─ new.ADURZ:4!null\n" + - " └─ 0 (int)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SFEGG\n" + + " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ADURZ <= 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0 as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 3 (tinyint) WHEN Or\n" + + " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + + " │ │ └─ rs.NO52D LIKE 'EC%'\n" + + " │ │ THEN 3 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ THEN 2 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 4 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0\n" + + " │ │ └─ Ki (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0\n" + + " │ │ └─ Kd (longtext)\n" + + " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: TUPLE(rs.NO52D:0, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ ├─ colSet: (60-65)\n" + + " │ │ │ └─ tableId: 8\n" + + " │ │ └─ AND\n" + + " │ │ ├─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: TUPLE(rs.NO52D:0, rs.DKCAJ:2!null)\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + + " │ │ └─ Distinct\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ ├─ colSet: (66-71)\n" + + " │ │ └─ tableId: 9\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: rs\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (56-59)\n" + + " │ ├─ tableId: 7\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [nk7fp.NO52D:0 as NO52D, CASE WHEN Eq\n" + + " │ │ ├─ nk7fp.VYO5E:1\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN NULL (null) ELSE nk7fp.VYO5E:1 END as VYO5E, nt.id:21!null as DKCAJ, nt.DZLIM:22!null as F35MI]\n" + + " │ └─ HashJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ nt.id:21!null\n" + + " │ │ └─ nd.DKCAJ:5!null\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ Or\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ nk7fp.FVUCX:3!null IS NULL\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ nd.ZH72S:11\n" + + " │ │ │ │ └─ nk7fp.ZH72S:2\n" + + " │ │ │ └─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ nk7fp.FVUCX:3!null IS NULL\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ nd.TW55N:7!null\n" + + " │ │ │ └─ nk7fp.FVUCX:3!null\n" + + " │ │ ├─ SubqueryAlias\n" + + " │ │ │ ├─ name: nk7fp\n" + + " │ │ │ ├─ outerVisibility: false\n" + + " │ │ │ ├─ isLateral: false\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ colSet: (28-31)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [uct.NO52D:7, uct.VYO5E:9, uct.ZH72S:2, i7hcr.FVUCX:17!null]\n" + + " │ │ │ └─ LeftOuterJoin\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + + " │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + + " │ │ │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + + " │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ i7hcr.BTXC5:16!null\n" + + " │ │ │ │ └─ uct.LJLUM:5\n" + + " │ │ │ ├─ TableAlias(uct)\n" + + " │ │ │ │ └─ IndexedTableAccess(OUBDL)\n" + + " │ │ │ │ ├─ index: [OUBDL.id]\n" + + " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ │ ├─ colSet: (7-19)\n" + + " │ │ │ │ ├─ tableId: 2\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: OUBDL\n" + + " │ │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + + " │ │ │ └─ TableAlias(i7hcr)\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: EPZU6\n" + + " │ │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + + " │ │ │ ├─ colSet: (20-27)\n" + + " │ │ │ └─ tableId: 3\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ Concat\n" + + " │ │ ├─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [nk7fp.FVUCX:3!null]\n" + + " │ │ │ ├─ colSet: (32-48)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ ├─ keys: [nk7fp.ZH72S:2]\n" + + " │ │ ├─ colSet: (32-48)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ HashLookup\n" + + " │ ├─ left-key: TUPLE(nd.DKCAJ:5!null)\n" + + " │ ├─ right-key: TUPLE(nt.id:0!null)\n" + + " │ └─ TableAlias(nt)\n" + + " │ └─ Table\n" + + " │ ├─ name: F35MI\n" + + " │ ├─ columns: [id dzlim f3yue]\n" + + " │ ├─ colSet: (49-51)\n" + + " │ └─ tableId: 6\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ InSubquery\n" + + " │ │ ├─ left: new.NO52D:1!null\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (13,14)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.VYO5E:2\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (15,16)\n" + + " │ └─ tableId: 4\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(LessThanOrEqual\n" + + " ├─ new.ADURZ:4!null\n" + + " └─ 0 (int)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + "", }, { @@ -20781,397 +20769,396 @@ ON WHERE -- In the case we could not build-in evidence class for some PQSXB.OVE3E IS NOT NULL`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: FLQLP\n" + - " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:41!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:42\n" + - " │ │ │ └─ pqsxb.BTXC5:10\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + - " │ │ ├─ colSet: (123-125)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [pqsxb.FZ2R5:0, pqsxb.OVE3E:1, pqsxb.NRURT:2!null, pqsxb.OCA7E:3!null, pqsxb.XMM6Q:4, pqsxb.V5DPX:5, pqsxb.S3Q3Y:6, pqsxb.ZRV3B:7, pqsxb.FHCYT:8, pqsxb.K3B6V:9, pqsxb.BTXC5:10, pqsxb.H4DMT:11!null, nd.id:12!null, nd.DKCAJ:13!null, nd.KNG7T:14, nd.TW55N:15!null, nd.QRQXW:16!null, nd.ECXAJ:17!null, nd.FGG57:18, nd.ZH72S:19, nd.FSK67:20!null, nd.XQDYT:21!null, nd.TCE7A:22, nd.IWV2H:23, nd.HPCMS:24!null, nd.N5CC2:25, nd.FHCYT:26, nd.ETAQ7:27, nd.A75X7:28, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:29!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:30\n" + - " │ │ │ └─ pqsxb.BTXC5:10\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + - " │ │ ├─ colSet: (123-125)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ NOT\n" + - " │ │ └─ pqsxb.OVE3E:1 IS NULL\n" + - " │ └─ LookupJoin\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ pqsxb.H4DMT:11!null IS NULL\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ nd.TW55N:15!null\n" + - " │ │ │ └─ pqsxb.H4DMT:11!null\n" + - " │ │ └─ AND\n" + - " │ │ ├─ pqsxb.H4DMT:11!null IS NULL\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ nd.ZH72S:19\n" + - " │ │ └─ pqsxb.K3B6V:9\n" + - " │ ├─ SubqueryAlias\n" + - " │ │ ├─ name: pqsxb\n" + - " │ │ ├─ outerVisibility: false\n" + - " │ │ ├─ isLateral: false\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ colSet: (91-102)\n" + - " │ │ ├─ tableId: 8\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [jdlna.id:33!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ jdlna.FTQLQ:34!null\n" + - " │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + - " │ │ │ ├─ colSet: (34-38)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: JDLNA\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ │ as FZ2R5, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.id:33!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.NO52D:34!null\n" + - " │ │ │ │ │ │ └─ uct.NO52D:7\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.VYO5E:35\n" + - " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ AND\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:35 IS NULL\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ sfegg.DKCAJ:36!null\n" + - " │ │ │ │ └─ Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + - " │ │ │ │ │ └─ Limit(1)\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.ZH72S:41\n" + - " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + - " │ │ │ │ │ ├─ colSet: (46-62)\n" + - " │ │ │ │ │ ├─ tableId: 6\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + - " │ │ │ │ │ ELSE Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.TW55N:41!null\n" + - " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + - " │ │ │ │ │ ├─ colSet: (63-79)\n" + - " │ │ │ │ │ ├─ tableId: 7\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ │ │ │ END as CASE\n" + - " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + - " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + - " │ │ │ │ │ ELSE\n" + - " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + - " │ │ │ │ │ END]\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [dual.:39!null]\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: \n" + - " │ │ │ │ ├─ columns: []\n" + - " │ │ │ │ ├─ colSet: ()\n" + - " │ │ │ │ └─ tableId: 0\n" + - " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ │ ├─ keys: [uct.NO52D:7]\n" + - " │ │ │ ├─ colSet: (40-45)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ uct.FHCYT:11\n" + - " │ │ │ └─ N/A (longtext)\n" + - " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [uct.id:0!null, uct.FTQLQ:1, uct.ZH72S:2, uct.SFJ6L:3, uct.V5DPX:4, uct.LJLUM:5, uct.IDPK7:6, uct.NO52D:7, uct.ZRV3B:8, uct.VYO5E:9, uct.YKSSU:10, uct.FHCYT:11, uct.QZ6VT:12, i7hcr.id:13!null, i7hcr.TOFPN:14!null, i7hcr.SJYN2:15!null, i7hcr.BTXC5:16!null, i7hcr.FVUCX:17!null, i7hcr.SWCQV:18!null, i7hcr.YKSSU:19, i7hcr.FHCYT:20, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [jdlna.id:21!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ jdlna.FTQLQ:22!null\n" + - " │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + - " │ │ │ ├─ colSet: (34-38)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: JDLNA\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ │ as FZ2R5, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.id:21!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.NO52D:22!null\n" + - " │ │ │ │ │ │ └─ uct.NO52D:7\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.VYO5E:23\n" + - " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ AND\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:23 IS NULL\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ sfegg.DKCAJ:24!null\n" + - " │ │ │ │ └─ Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + - " │ │ │ │ │ └─ Limit(1)\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.ZH72S:29\n" + - " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + - " │ │ │ │ │ ├─ colSet: (46-62)\n" + - " │ │ │ │ │ ├─ tableId: 6\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + - " │ │ │ │ │ ELSE Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.TW55N:29!null\n" + - " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + - " │ │ │ │ │ ├─ colSet: (63-79)\n" + - " │ │ │ │ │ ├─ tableId: 7\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ │ │ │ END as CASE\n" + - " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + - " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + - " │ │ │ │ │ ELSE\n" + - " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + - " │ │ │ │ │ END]\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [dual.:27!null]\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: \n" + - " │ │ │ │ ├─ columns: []\n" + - " │ │ │ │ ├─ colSet: ()\n" + - " │ │ │ │ └─ tableId: 0\n" + - " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ │ ├─ keys: [uct.NO52D:7]\n" + - " │ │ │ ├─ colSet: (40-45)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ uct.FHCYT:11\n" + - " │ │ │ └─ N/A (longtext)\n" + - " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + - " │ │ └─ LeftOuterJoin\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + - " │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + - " │ │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + - " │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ i7hcr.BTXC5:16!null\n" + - " │ │ │ └─ uct.LJLUM:5\n" + - " │ │ ├─ TableAlias(uct)\n" + - " │ │ │ └─ IndexedTableAccess(OUBDL)\n" + - " │ │ │ ├─ index: [OUBDL.id]\n" + - " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ ├─ colSet: (13-25)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: OUBDL\n" + - " │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + - " │ │ └─ TableAlias(i7hcr)\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: EPZU6\n" + - " │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + - " │ │ ├─ colSet: (26-33)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ TableAlias(nd)\n" + - " │ └─ Concat\n" + - " │ ├─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ ├─ keys: [pqsxb.K3B6V:9]\n" + - " │ │ ├─ colSet: (103-119)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(nd)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.TW55N]\n" + - " │ ├─ keys: [pqsxb.H4DMT:11!null]\n" + - " │ ├─ colSet: (103-119)\n" + - " │ ├─ tableId: 9\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(InSubquery\n" + - " │ ├─ left: new.V5DPX:8!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (25,26)\n" + - " │ └─ tableId: 3\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.ZRV3B:10!null\n" + - " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: FLQLP\n" + + " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:41!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:42\n" + + " │ │ │ └─ pqsxb.BTXC5:10\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + + " │ │ ├─ colSet: (123-125)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [pqsxb.FZ2R5:0, pqsxb.OVE3E:1, pqsxb.NRURT:2!null, pqsxb.OCA7E:3!null, pqsxb.XMM6Q:4, pqsxb.V5DPX:5, pqsxb.S3Q3Y:6, pqsxb.ZRV3B:7, pqsxb.FHCYT:8, pqsxb.K3B6V:9, pqsxb.BTXC5:10, pqsxb.H4DMT:11!null, nd.id:12!null, nd.DKCAJ:13!null, nd.KNG7T:14, nd.TW55N:15!null, nd.QRQXW:16!null, nd.ECXAJ:17!null, nd.FGG57:18, nd.ZH72S:19, nd.FSK67:20!null, nd.XQDYT:21!null, nd.TCE7A:22, nd.IWV2H:23, nd.HPCMS:24!null, nd.N5CC2:25, nd.FHCYT:26, nd.ETAQ7:27, nd.A75X7:28, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:29!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:30\n" + + " │ │ │ └─ pqsxb.BTXC5:10\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + + " │ │ ├─ colSet: (123-125)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ NOT\n" + + " │ │ └─ pqsxb.OVE3E:1 IS NULL\n" + + " │ └─ LookupJoin\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ pqsxb.H4DMT:11!null IS NULL\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ nd.TW55N:15!null\n" + + " │ │ │ └─ pqsxb.H4DMT:11!null\n" + + " │ │ └─ AND\n" + + " │ │ ├─ pqsxb.H4DMT:11!null IS NULL\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ nd.ZH72S:19\n" + + " │ │ └─ pqsxb.K3B6V:9\n" + + " │ ├─ SubqueryAlias\n" + + " │ │ ├─ name: pqsxb\n" + + " │ │ ├─ outerVisibility: false\n" + + " │ │ ├─ isLateral: false\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ colSet: (91-102)\n" + + " │ │ ├─ tableId: 8\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [jdlna.id:33!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ jdlna.FTQLQ:34!null\n" + + " │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + + " │ │ │ ├─ colSet: (34-38)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: JDLNA\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ │ as FZ2R5, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.id:33!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.NO52D:34!null\n" + + " │ │ │ │ │ │ └─ uct.NO52D:7\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.VYO5E:35\n" + + " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ AND\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:35 IS NULL\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ sfegg.DKCAJ:36!null\n" + + " │ │ │ │ └─ Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + + " │ │ │ │ │ └─ Limit(1)\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.ZH72S:41\n" + + " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + + " │ │ │ │ │ ├─ colSet: (46-62)\n" + + " │ │ │ │ │ ├─ tableId: 6\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + + " │ │ │ │ │ ELSE Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.TW55N:41!null\n" + + " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + + " │ │ │ │ │ ├─ colSet: (63-79)\n" + + " │ │ │ │ │ ├─ tableId: 7\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ │ │ │ END as CASE\n" + + " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + + " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + + " │ │ │ │ │ ELSE\n" + + " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + + " │ │ │ │ │ END]\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [dual.:39!null]\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: \n" + + " │ │ │ │ ├─ columns: []\n" + + " │ │ │ │ ├─ colSet: ()\n" + + " │ │ │ │ └─ tableId: 0\n" + + " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ │ ├─ keys: [uct.NO52D:7]\n" + + " │ │ │ ├─ colSet: (40-45)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ uct.FHCYT:11\n" + + " │ │ │ └─ N/A (longtext)\n" + + " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [uct.id:0!null, uct.FTQLQ:1, uct.ZH72S:2, uct.SFJ6L:3, uct.V5DPX:4, uct.LJLUM:5, uct.IDPK7:6, uct.NO52D:7, uct.ZRV3B:8, uct.VYO5E:9, uct.YKSSU:10, uct.FHCYT:11, uct.QZ6VT:12, i7hcr.id:13!null, i7hcr.TOFPN:14!null, i7hcr.SJYN2:15!null, i7hcr.BTXC5:16!null, i7hcr.FVUCX:17!null, i7hcr.SWCQV:18!null, i7hcr.YKSSU:19, i7hcr.FHCYT:20, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [jdlna.id:21!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ jdlna.FTQLQ:22!null\n" + + " │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + + " │ │ │ ├─ colSet: (34-38)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: JDLNA\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ │ as FZ2R5, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.id:21!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.NO52D:22!null\n" + + " │ │ │ │ │ │ └─ uct.NO52D:7\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.VYO5E:23\n" + + " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ AND\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:23 IS NULL\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ sfegg.DKCAJ:24!null\n" + + " │ │ │ │ └─ Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + + " │ │ │ │ │ └─ Limit(1)\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.ZH72S:29\n" + + " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + + " │ │ │ │ │ ├─ colSet: (46-62)\n" + + " │ │ │ │ │ ├─ tableId: 6\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + + " │ │ │ │ │ ELSE Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.TW55N:29!null\n" + + " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + + " │ │ │ │ │ ├─ colSet: (63-79)\n" + + " │ │ │ │ │ ├─ tableId: 7\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ │ │ │ END as CASE\n" + + " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + + " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + + " │ │ │ │ │ ELSE\n" + + " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + + " │ │ │ │ │ END]\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [dual.:27!null]\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: \n" + + " │ │ │ │ ├─ columns: []\n" + + " │ │ │ │ ├─ colSet: ()\n" + + " │ │ │ │ └─ tableId: 0\n" + + " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ │ ├─ keys: [uct.NO52D:7]\n" + + " │ │ │ ├─ colSet: (40-45)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ uct.FHCYT:11\n" + + " │ │ │ └─ N/A (longtext)\n" + + " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + + " │ │ └─ LeftOuterJoin\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + + " │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + + " │ │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + + " │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ i7hcr.BTXC5:16!null\n" + + " │ │ │ └─ uct.LJLUM:5\n" + + " │ │ ├─ TableAlias(uct)\n" + + " │ │ │ └─ IndexedTableAccess(OUBDL)\n" + + " │ │ │ ├─ index: [OUBDL.id]\n" + + " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ ├─ colSet: (13-25)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: OUBDL\n" + + " │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + + " │ │ └─ TableAlias(i7hcr)\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: EPZU6\n" + + " │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + + " │ │ ├─ colSet: (26-33)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ TableAlias(nd)\n" + + " │ └─ Concat\n" + + " │ ├─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ ├─ keys: [pqsxb.K3B6V:9]\n" + + " │ │ ├─ colSet: (103-119)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(nd)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.TW55N]\n" + + " │ ├─ keys: [pqsxb.H4DMT:11!null]\n" + + " │ ├─ colSet: (103-119)\n" + + " │ ├─ tableId: 9\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(InSubquery\n" + + " │ ├─ left: new.V5DPX:8!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (25,26)\n" + + " │ └─ tableId: 3\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.ZRV3B:10!null\n" + + " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + "", }, { @@ -21223,190 +21210,189 @@ WHERE AND (rs.NO52D, rs.DKCAJ) NOT IN (SELECT DISTINCT NO52D, DKCAJ FROM SFEGG WHERE VYO5E IS NULL) )`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SFEGG\n" + - " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ADURZ <= 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0!null as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0!null\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0!null\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 3 (tinyint) WHEN Or\n" + - " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + - " │ │ └─ rs.NO52D LIKE 'EC%'\n" + - " │ │ THEN 3 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ THEN 2 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 4 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0!null\n" + - " │ │ └─ Ki (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0!null\n" + - " │ │ └─ Kd (longtext)\n" + - " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ ├─ colSet: (48-53)\n" + - " │ │ │ └─ tableId: 6\n" + - " │ │ └─ AND\n" + - " │ │ ├─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.DKCAJ:2!null)\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + - " │ │ └─ Distinct\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ ├─ colSet: (54-59)\n" + - " │ │ └─ tableId: 7\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: rs\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (44-47)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tvtjs.NO52D:7!null as NO52D, tvtjs.VYO5E:9 as VYO5E, nt.id:30!null as DKCAJ, nt.DZLIM:31!null as F35MI]\n" + - " │ └─ LookupJoin\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ TableAlias(tvtjs)\n" + - " │ │ │ └─ IndexedTableAccess(HU5A5)\n" + - " │ │ │ ├─ index: [HU5A5.id]\n" + - " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ ├─ colSet: (7-19)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: HU5A5\n" + - " │ │ │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (20-36)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(nt)\n" + - " │ └─ IndexedTableAccess(F35MI)\n" + - " │ ├─ index: [F35MI.id]\n" + - " │ ├─ keys: [nd.DKCAJ:14!null]\n" + - " │ ├─ colSet: (37-39)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: F35MI\n" + - " │ └─ columns: [id dzlim f3yue]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ InSubquery\n" + - " │ │ ├─ left: new.NO52D:1!null\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (13,14)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.VYO5E:2\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (15,16)\n" + - " │ └─ tableId: 4\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(LessThanOrEqual\n" + - " ├─ new.ADURZ:4!null\n" + - " └─ 0 (int)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SFEGG\n" + + " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ADURZ <= 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0!null as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0!null\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0!null\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 3 (tinyint) WHEN Or\n" + + " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + + " │ │ └─ rs.NO52D LIKE 'EC%'\n" + + " │ │ THEN 3 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ THEN 2 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 4 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0!null\n" + + " │ │ └─ Ki (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0!null\n" + + " │ │ └─ Kd (longtext)\n" + + " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ ├─ colSet: (48-53)\n" + + " │ │ │ └─ tableId: 6\n" + + " │ │ └─ AND\n" + + " │ │ ├─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.DKCAJ:2!null)\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + + " │ │ └─ Distinct\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ ├─ colSet: (54-59)\n" + + " │ │ └─ tableId: 7\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: rs\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (44-47)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tvtjs.NO52D:7!null as NO52D, tvtjs.VYO5E:9 as VYO5E, nt.id:30!null as DKCAJ, nt.DZLIM:31!null as F35MI]\n" + + " │ └─ LookupJoin\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ TableAlias(tvtjs)\n" + + " │ │ │ └─ IndexedTableAccess(HU5A5)\n" + + " │ │ │ ├─ index: [HU5A5.id]\n" + + " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ ├─ colSet: (7-19)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: HU5A5\n" + + " │ │ │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (20-36)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(nt)\n" + + " │ └─ IndexedTableAccess(F35MI)\n" + + " │ ├─ index: [F35MI.id]\n" + + " │ ├─ keys: [nd.DKCAJ:14!null]\n" + + " │ ├─ colSet: (37-39)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: F35MI\n" + + " │ └─ columns: [id dzlim f3yue]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ InSubquery\n" + + " │ │ ├─ left: new.NO52D:1!null\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (13,14)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.VYO5E:2\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (15,16)\n" + + " │ └─ tableId: 4\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(LessThanOrEqual\n" + + " ├─ new.ADURZ:4!null\n" + + " └─ 0 (int)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + "", }, { @@ -21439,280 +21425,279 @@ FROM HU5A5 TVTJS WHERE TVTJS.id IN ('1','2','3')`, - ExpectedPlan: "TriggerRollback\n" + - " └─ RowUpdateAccumulator\n" + - " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: FLQLP\n" + - " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jdlna.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ jdlna.FTQLQ:26!null\n" + - " │ │ │ └─ tvtjs.TOFPN:1!null\n" + - " │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + - " │ │ ├─ colSet: (27-31)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JDLNA\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as FZ2R5, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [e2i7u.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ e2i7u.TW55N:26!null\n" + - " │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (33-49)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ tpxbu.BTXC5:26\n" + - " │ │ │ └─ tvtjs.LJLUM:5!null\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + - " │ │ ├─ colSet: (51-53)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.NO52D:26!null\n" + - " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:27\n" + - " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ AND\n" + - " │ │ │ │ ├─ sfegg.VYO5E:27 IS NULL\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ sfegg.DKCAJ:28!null\n" + - " │ │ │ └─ Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [nd.DKCAJ:31!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ nd.TW55N:32!null\n" + - " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ │ ├─ colSet: (61-77)\n" + - " │ │ │ ├─ tableId: 7\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + - " │ │ ├─ colSet: (55-60)\n" + - " │ │ ├─ tableId: 6\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tvtjs.id:0!null, tvtjs.TOFPN:1!null, tvtjs.I3VTA:2!null, tvtjs.SFJ6L:3, tvtjs.V5DPX:4!null, tvtjs.LJLUM:5!null, tvtjs.IDPK7:6!null, tvtjs.NO52D:7!null, tvtjs.ZRV3B:8!null, tvtjs.VYO5E:9, tvtjs.SWCQV:10!null, tvtjs.YKSSU:11, tvtjs.FHCYT:12, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jdlna.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ jdlna.FTQLQ:14!null\n" + - " │ │ │ └─ tvtjs.TOFPN:1!null\n" + - " │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + - " │ │ ├─ colSet: (27-31)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JDLNA\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as FZ2R5, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [e2i7u.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ e2i7u.TW55N:14!null\n" + - " │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (33-49)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ tpxbu.BTXC5:14\n" + - " │ │ │ └─ tvtjs.LJLUM:5!null\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + - " │ │ ├─ colSet: (51-53)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.NO52D:14!null\n" + - " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:15\n" + - " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ AND\n" + - " │ │ │ │ ├─ sfegg.VYO5E:15 IS NULL\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ sfegg.DKCAJ:16!null\n" + - " │ │ │ └─ Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [nd.DKCAJ:19!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ nd.TW55N:20!null\n" + - " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ │ ├─ colSet: (61-77)\n" + - " │ │ │ ├─ tableId: 7\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + - " │ │ ├─ colSet: (55-60)\n" + - " │ │ ├─ tableId: 6\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + - " │ └─ TableAlias(tvtjs)\n" + - " │ └─ IndexedTableAccess(HU5A5)\n" + - " │ ├─ index: [HU5A5.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (13-25)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: HU5A5\n" + - " │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(InSubquery\n" + - " │ ├─ left: new.V5DPX:8!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (25,26)\n" + - " │ └─ tableId: 3\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.ZRV3B:10!null\n" + - " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "RowUpdateAccumulator\n" + + " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: FLQLP\n" + + " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jdlna.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ jdlna.FTQLQ:26!null\n" + + " │ │ │ └─ tvtjs.TOFPN:1!null\n" + + " │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + + " │ │ ├─ colSet: (27-31)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JDLNA\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as FZ2R5, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [e2i7u.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ e2i7u.TW55N:26!null\n" + + " │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (33-49)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ tpxbu.BTXC5:26\n" + + " │ │ │ └─ tvtjs.LJLUM:5!null\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + + " │ │ ├─ colSet: (51-53)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.NO52D:26!null\n" + + " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:27\n" + + " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ AND\n" + + " │ │ │ │ ├─ sfegg.VYO5E:27 IS NULL\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ sfegg.DKCAJ:28!null\n" + + " │ │ │ └─ Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [nd.DKCAJ:31!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ nd.TW55N:32!null\n" + + " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ │ ├─ colSet: (61-77)\n" + + " │ │ │ ├─ tableId: 7\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + + " │ │ ├─ colSet: (55-60)\n" + + " │ │ ├─ tableId: 6\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tvtjs.id:0!null, tvtjs.TOFPN:1!null, tvtjs.I3VTA:2!null, tvtjs.SFJ6L:3, tvtjs.V5DPX:4!null, tvtjs.LJLUM:5!null, tvtjs.IDPK7:6!null, tvtjs.NO52D:7!null, tvtjs.ZRV3B:8!null, tvtjs.VYO5E:9, tvtjs.SWCQV:10!null, tvtjs.YKSSU:11, tvtjs.FHCYT:12, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jdlna.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ jdlna.FTQLQ:14!null\n" + + " │ │ │ └─ tvtjs.TOFPN:1!null\n" + + " │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + + " │ │ ├─ colSet: (27-31)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JDLNA\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as FZ2R5, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [e2i7u.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ e2i7u.TW55N:14!null\n" + + " │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (33-49)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ tpxbu.BTXC5:14\n" + + " │ │ │ └─ tvtjs.LJLUM:5!null\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + + " │ │ ├─ colSet: (51-53)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.NO52D:14!null\n" + + " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:15\n" + + " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ AND\n" + + " │ │ │ │ ├─ sfegg.VYO5E:15 IS NULL\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ sfegg.DKCAJ:16!null\n" + + " │ │ │ └─ Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [nd.DKCAJ:19!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ nd.TW55N:20!null\n" + + " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ │ ├─ colSet: (61-77)\n" + + " │ │ │ ├─ tableId: 7\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + + " │ │ ├─ colSet: (55-60)\n" + + " │ │ ├─ tableId: 6\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + + " │ └─ TableAlias(tvtjs)\n" + + " │ └─ IndexedTableAccess(HU5A5)\n" + + " │ ├─ index: [HU5A5.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (13-25)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: HU5A5\n" + + " │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(InSubquery\n" + + " │ ├─ left: new.V5DPX:8!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (25,26)\n" + + " │ └─ tableId: 3\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.ZRV3B:10!null\n" + + " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + "", }, } From 9814e26930d694896114cabeb39b300c4646ae7a Mon Sep 17 00:00:00 2001 From: jycor Date: Fri, 25 Oct 2024 22:32:20 +0000 Subject: [PATCH 06/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- sql/plan/trigger.go | 2 +- sql/rowexec/builder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/plan/trigger.go b/sql/plan/trigger.go index 47d6973de1..d65bac4b31 100644 --- a/sql/plan/trigger.go +++ b/sql/plan/trigger.go @@ -102,4 +102,4 @@ func (t *TriggerExecutor) CheckPrivileges(ctx *sql.Context, opChecker sql.Privil // CollationCoercibility implements the interface sql.CollationCoercible. func (t *TriggerExecutor) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) { return sql.GetCoercibility(ctx, t.left) -} \ No newline at end of file +} diff --git a/sql/rowexec/builder.go b/sql/rowexec/builder.go index 3a864b526e..62a560b17c 100644 --- a/sql/rowexec/builder.go +++ b/sql/rowexec/builder.go @@ -31,7 +31,7 @@ type ExecBuilderFunc func(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, // sql.ExecSourceRel are also built into the tree. type BaseBuilder struct { // if override is provided, we try to build executor with this first - override sql.NodeExecBuilder + override sql.NodeExecBuilder } func (b *BaseBuilder) Build(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, error) { From 473f5149dbed2939e0b13ad35dbfb5632f95785d Mon Sep 17 00:00:00 2001 From: James Cor Date: Mon, 28 Oct 2024 11:50:44 -0700 Subject: [PATCH 07/25] triggers --- engine.go | 2 +- sql/analyzer/triggers.go | 3 +++ sql/query_flags.go | 4 ++++ sql/rowexec/dml_iters.go | 26 +++----------------------- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/engine.go b/engine.go index c72b2224d1..401d16e2ff 100644 --- a/engine.go +++ b/engine.go @@ -866,7 +866,7 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { // finalizeIters applies the final transformations on sql.RowIter before execution. func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) sql.RowIter { - iter = rowexec.AddTriggerRollbackIter(ctx, analyzed, iter) + iter = rowexec.AddTriggerRollbackIter(ctx, qFlags, iter) iter = rowexec.AddTransactionCommittingIter(qFlags, iter) iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = rowexec.AddExpressionCloser(analyzed, iter) diff --git a/sql/analyzer/triggers.go b/sql/analyzer/triggers.go index 4401db9b40..4aea1ce3c7 100644 --- a/sql/analyzer/triggers.go +++ b/sql/analyzer/triggers.go @@ -346,6 +346,7 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope switch n := c.Node.(type) { case *plan.InsertInto: + qFlags.Set(sql.QFlagTrigger) if trigger.TriggerTime == sqlparser.BeforeStr { triggerExecutor := plan.NewTriggerExecutor(n.Source, triggerLogic, plan.InsertTrigger, plan.TriggerTime(trigger.TriggerTime), sql.TriggerDefinition{ Name: trigger.TriggerName, @@ -359,6 +360,7 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope }), transform.NewTree, nil } case *plan.Update: + qFlags.Set(sql.QFlagTrigger) if trigger.TriggerTime == sqlparser.BeforeStr { triggerExecutor := plan.NewTriggerExecutor(n.Child, triggerLogic, plan.UpdateTrigger, plan.TriggerTime(trigger.TriggerTime), sql.TriggerDefinition{ Name: trigger.TriggerName, @@ -387,6 +389,7 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope "does not support triggers; retry with single table deletes") } + qFlags.Set(sql.QFlagTrigger) if trigger.TriggerTime == sqlparser.BeforeStr { triggerExecutor := plan.NewTriggerExecutor(n.Child, triggerLogic, plan.DeleteTrigger, plan.TriggerTime(trigger.TriggerTime), sql.TriggerDefinition{ Name: trigger.TriggerName, diff --git a/sql/query_flags.go b/sql/query_flags.go index fcdd053c31..25b4035e0a 100644 --- a/sql/query_flags.go +++ b/sql/query_flags.go @@ -48,6 +48,7 @@ const ( QFlagDeferProjections // QFlagUndeferrableExprs indicates that the query has expressions that cannot be deferred QFlagUndeferrableExprs + QFlagTrigger ) type QueryFlags struct { @@ -69,6 +70,9 @@ func (qp *QueryFlags) Unset(flag int) { } func (qp *QueryFlags) IsSet(flag int) bool { + if qp == nil { + return false + } return qp.Flags.Contains(flag) } diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index a10f932a50..77184b9009 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -1,4 +1,4 @@ -// Copyright 2023 Dolthub, Inc. +// Copyright 2023-2024 Dolthub, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,28 +33,8 @@ type triggerRollbackIter struct { savePointName string } -func containsTrigger(node sql.Node) bool { - // Check if tree contains a TriggerExecutor - hasTrigger := false - transform.Inspect(node, func(n sql.Node) bool { - switch nn := n.(type) { - case *plan.TriggerExecutor: - hasTrigger = true - return false - case *plan.InsertInto: - // Before Triggers on Inserts are inside Source - if _, ok := nn.Source.(*plan.TriggerExecutor); ok { - hasTrigger = true - return false - } - } - return true - }) - return hasTrigger -} - -func AddTriggerRollbackIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) sql.RowIter { - if !containsTrigger(node) { +func AddTriggerRollbackIter(ctx *sql.Context, qFlags *sql.QueryFlags, iter sql.RowIter) sql.RowIter { + if !qFlags.IsSet(sql.QFlagTrigger) { return iter } From b9d200a9fb3fe07d1e12cb8f6f6c05c6ba0c7d56 Mon Sep 17 00:00:00 2001 From: James Cor Date: Mon, 28 Oct 2024 12:02:53 -0700 Subject: [PATCH 08/25] qFlags --- engine.go | 6 +++--- server/handler.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engine.go b/engine.go index 401d16e2ff..8d4ceb3fdb 100644 --- a/engine.go +++ b/engine.go @@ -454,7 +454,7 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar // PrepQueryPlanForExecution prepares a query plan for execution and returns the result schema with a row iterator to // begin spooling results -func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql.Node) (sql.Schema, sql.RowIter, *sql.QueryFlags, error) { +func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql.Node, qFlags *sql.QueryFlags) (sql.Schema, sql.RowIter, *sql.QueryFlags, error) { // Give the integrator a chance to reject the session before proceeding // TODO: this check doesn't belong here err := ctx.Session.ValidateSession(ctx) @@ -482,9 +482,9 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. return nil, nil, nil, err } - iter = finalizeIters(ctx, plan, nil, iter) + iter = finalizeIters(ctx, plan, qFlags, iter) - return plan.Schema(), iter, nil, nil + return plan.Schema(), iter, qFlags, nil } // BoundQueryPlan returns query plan for the given statement with the given bindings applied diff --git a/server/handler.go b/server/handler.go index a6e0afd399..3ce0cf204a 100644 --- a/server/handler.go +++ b/server/handler.go @@ -1084,9 +1084,9 @@ func (h *Handler) executeBoundPlan( _ sqlparser.Statement, plan sql.Node, _ map[string]*querypb.BindVariable, - _ *sql.QueryFlags, + qFlags *sql.QueryFlags, ) (sql.Schema, sql.RowIter, *sql.QueryFlags, error) { - return h.e.PrepQueryPlanForExecution(ctx, query, plan) + return h.e.PrepQueryPlanForExecution(ctx, query, plan, qFlags) } func bindingsToExprs(bindings map[string]*querypb.BindVariable) (map[string]sqlparser.Expr, error) { From 62633c32b3d7ecfe7f774b8950c00799231d4563 Mon Sep 17 00:00:00 2001 From: James Cor Date: Mon, 28 Oct 2024 16:37:41 -0700 Subject: [PATCH 09/25] progress --- engine.go | 30 +- enginetest/enginetests.go | 4 +- enginetest/memory_engine_test.go | 14 +- enginetest/queries/generated_column_plans.go | 114 +- enginetest/queries/index_query_plans.go | 160 +- enginetest/queries/integration_plans.go | 6403 +++++++++--------- enginetest/queries/query_plans.go | 330 +- enginetest/queries/tpcc_plans.go | 221 +- sql/rowexec/dml_iters.go | 26 +- 9 files changed, 3630 insertions(+), 3672 deletions(-) diff --git a/engine.go b/engine.go index a6dbdfa8ed..9064574f9b 100644 --- a/engine.go +++ b/engine.go @@ -446,7 +446,8 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar return nil, nil, nil, err } - iter, err = finalizeIters(ctx, analyzed, qFlags, iter) + var schema sql.Schema + iter, schema, err = finalizeIters(ctx, analyzed, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -455,7 +456,11 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar return nil, nil, nil, err } - return analyzed.Schema(), iter, qFlags, nil + if schema == nil { + schema = analyzed.Schema() + } + + return schema, iter, qFlags, nil } // PrepQueryPlanForExecution prepares a query plan for execution and returns the result schema with a row iterator to @@ -487,7 +492,8 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. return nil, nil, nil, err } - iter, err = finalizeIters(ctx, plan, nil, iter) + var schema sql.Schema + iter, schema, err = finalizeIters(ctx, plan, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -496,9 +502,11 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. return nil, nil, nil, err } - iter = finalizeIters(ctx, plan, qFlags, iter) + if schema == nil { + schema = plan.Schema() + } - return plan.Schema(), iter, qFlags, nil + return schema, iter, qFlags, nil } // BoundQueryPlan returns query plan for the given statement with the given bindings applied @@ -844,7 +852,7 @@ func (e *Engine) executeEvent(ctx *sql.Context, dbName, createEventStatement, us return err } - iter, err = finalizeIters(ctx, definitionNode, nil, iter) + iter, _, err = finalizeIters(ctx, definitionNode, nil, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -886,15 +894,17 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { } // finalizeIters applies the final transformations on sql.RowIter before execution. -func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, error) { +func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { var err error - iter, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) + var sch sql.Schema + // TODO: if this is does something we need to overwrite the schema with types.OkResultSchema + //iter, sch, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) if err != nil { - return nil, err + return nil, nil, err } iter = rowexec.AddTriggerRollbackIter(ctx, qFlags, iter) iter = rowexec.AddTransactionCommittingIter(qFlags, iter) iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = rowexec.AddExpressionCloser(analyzed, iter) - return iter, nil + return iter, sch, nil } diff --git a/enginetest/enginetests.go b/enginetest/enginetests.go index 170d9af86a..feaa641a7d 100644 --- a/enginetest/enginetests.go +++ b/enginetest/enginetests.go @@ -1708,12 +1708,12 @@ func TestInsertScriptsPrepared(t *testing.T, harness Harness) { func TestGeneratedColumns(t *testing.T, harness Harness) { harness.Setup(setup.MydbData) for _, script := range queries.GeneratedColumnTests { - TestScriptPrepared(t, harness, script) + TestScript(t, harness, script) } for _, script := range queries.BrokenGeneratedColumnTests { t.Run(script.Name, func(t *testing.T) { t.Skip(script.Name) - TestScriptPrepared(t, harness, script) + TestScript(t, harness, script) }) } } diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index 06a9bb1915..10290b2555 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -197,12 +197,20 @@ func TestSingleQueryPrepared(t *testing.T) { // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleScript(t *testing.T) { - t.Skip() + //t.Skip() var scripts = []queries.ScriptTest{ { Name: "test script", - SetUpScript: []string{}, - Assertions: []queries.ScriptTestAssertion{}, + SetUpScript: []string{ + "create table t (i int);", + "create procedure p() begin insert into t values (1); end;", + }, + Assertions: []queries.ScriptTestAssertion{ + { + Query: "call p();", + Expected: []sql.Row{}, + }, + }, }, } diff --git a/enginetest/queries/generated_column_plans.go b/enginetest/queries/generated_column_plans.go index 9e22737002..38258d7b15 100644 --- a/enginetest/queries/generated_column_plans.go +++ b/enginetest/queries/generated_column_plans.go @@ -69,11 +69,24 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ }, { Query: `delete from generated_stored_2 where b = 3 and c = 4`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(generated_stored_2)\n" + + " ├─ index: [generated_stored_2.b,generated_stored_2.c]\n" + + " ├─ static: [{[3, 3], [4, 4]}]\n" + + " ├─ colSet: (1-3)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: generated_stored_2\n" + + " └─ columns: [a b c]\n" + + "", + }, + { + Query: `update generated_stored_2 set a = 5, c = 10 where b = 2 and c = 3`, + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET generated_stored_2.a:0!null = 5 (tinyint),SET generated_stored_2.c:2 = 10 (tinyint),SET generated_stored_2.b:1 = parenthesized((generated_stored_2.a:0!null + 1 (tinyint))))\n" + " └─ IndexedTableAccess(generated_stored_2)\n" + " ├─ index: [generated_stored_2.b,generated_stored_2.c]\n" + - " ├─ static: [{[3, 3], [4, 4]}]\n" + + " ├─ static: [{[2, 2], [3, 3]}]\n" + " ├─ colSet: (1-3)\n" + " ├─ tableId: 1\n" + " └─ Table\n" + @@ -81,21 +94,6 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ " └─ columns: [a b c]\n" + "", }, - { - Query: `update generated_stored_2 set a = 5, c = 10 where b = 2 and c = 3`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET generated_stored_2.a:0!null = 5 (tinyint),SET generated_stored_2.c:2 = 10 (tinyint),SET generated_stored_2.b:1 = parenthesized((generated_stored_2.a:0!null + 1 (tinyint))))\n" + - " └─ IndexedTableAccess(generated_stored_2)\n" + - " ├─ index: [generated_stored_2.b,generated_stored_2.c]\n" + - " ├─ static: [{[2, 2], [3, 3]}]\n" + - " ├─ colSet: (1-3)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: generated_stored_2\n" + - " └─ columns: [a b c]\n" + - "", - }, { Query: `select * from generated_virtual_1 where c = 7`, ExpectedPlan: "IndexedTableAccess(generated_virtual_1)\n" + @@ -121,29 +119,11 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ }, { Query: `update generated_virtual_1 set b = 5 where c = 3`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET generated_virtual_1.b:1 = 5 (tinyint),SET generated_virtual_1.c:2 = parenthesized((generated_virtual_1.a:0!null + generated_virtual_1.b:1)))\n" + - " └─ IndexedTableAccess(generated_virtual_1)\n" + - " ├─ index: [generated_virtual_1.c]\n" + - " ├─ static: [{[3, 3]}]\n" + - " ├─ colSet: (4-6)\n" + - " ├─ tableId: 2\n" + - " └─ VirtualColumnTable\n" + - " ├─ name: generated_virtual_1\n" + - " ├─ columns: [generated_virtual_1.a:0!null, generated_virtual_1.b:1, parenthesized((generated_virtual_1.a:0!null + generated_virtual_1.b:1))]\n" + - " └─ Table\n" + - " ├─ name: generated_virtual_1\n" + - " └─ columns: [a b c]\n" + - "", - }, - { - Query: `delete from generated_virtual_1 where c = 6`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET generated_virtual_1.b:1 = 5 (tinyint),SET generated_virtual_1.c:2 = parenthesized((generated_virtual_1.a:0!null + generated_virtual_1.b:1)))\n" + " └─ IndexedTableAccess(generated_virtual_1)\n" + " ├─ index: [generated_virtual_1.c]\n" + - " ├─ static: [{[6, 6]}]\n" + + " ├─ static: [{[3, 3]}]\n" + " ├─ colSet: (4-6)\n" + " ├─ tableId: 2\n" + " └─ VirtualColumnTable\n" + @@ -154,6 +134,22 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ " └─ columns: [a b c]\n" + "", }, + { + Query: `delete from generated_virtual_1 where c = 6`, + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(generated_virtual_1)\n" + + " ├─ index: [generated_virtual_1.c]\n" + + " ├─ static: [{[6, 6]}]\n" + + " ├─ colSet: (4-6)\n" + + " ├─ tableId: 2\n" + + " └─ VirtualColumnTable\n" + + " ├─ name: generated_virtual_1\n" + + " ├─ columns: [generated_virtual_1.a:0!null, generated_virtual_1.b:1, parenthesized((generated_virtual_1.a:0!null + generated_virtual_1.b:1))]\n" + + " └─ Table\n" + + " ├─ name: generated_virtual_1\n" + + " └─ columns: [a b c]\n" + + "", + }, { Query: `select * from generated_virtual_keyless where v = 2`, ExpectedPlan: "IndexedTableAccess(generated_virtual_keyless)\n" + @@ -179,29 +175,11 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ }, { Query: `update generated_virtual_keyless set j = '{"a": 5}' where v = 2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET generated_virtual_keyless.j:0 = {\"a\": 5} (longtext),SET generated_virtual_keyless.v:1 = parenthesized(json_unquote(json_extract(generated_virtual_keyless.j, '$.a'))))\n" + - " └─ IndexedTableAccess(generated_virtual_keyless)\n" + - " ├─ index: [generated_virtual_keyless.v]\n" + - " ├─ static: [{[2, 2]}]\n" + - " ├─ colSet: (3,4)\n" + - " ├─ tableId: 2\n" + - " └─ VirtualColumnTable\n" + - " ├─ name: generated_virtual_keyless\n" + - " ├─ columns: [generated_virtual_keyless.j:0, parenthesized(json_unquote(json_extract(generated_virtual_keyless.j, '$.a')))]\n" + - " └─ Table\n" + - " ├─ name: generated_virtual_keyless\n" + - " └─ columns: [j v]\n" + - "", - }, - { - Query: `delete from generated_virtual_keyless where v = 5`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET generated_virtual_keyless.j:0 = {\"a\": 5} (longtext),SET generated_virtual_keyless.v:1 = parenthesized(json_unquote(json_extract(generated_virtual_keyless.j, '$.a'))))\n" + " └─ IndexedTableAccess(generated_virtual_keyless)\n" + " ├─ index: [generated_virtual_keyless.v]\n" + - " ├─ static: [{[5, 5]}]\n" + + " ├─ static: [{[2, 2]}]\n" + " ├─ colSet: (3,4)\n" + " ├─ tableId: 2\n" + " └─ VirtualColumnTable\n" + @@ -212,4 +190,20 @@ var GeneratedColumnPlanTests = []QueryPlanTest{ " └─ columns: [j v]\n" + "", }, + { + Query: `delete from generated_virtual_keyless where v = 5`, + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(generated_virtual_keyless)\n" + + " ├─ index: [generated_virtual_keyless.v]\n" + + " ├─ static: [{[5, 5]}]\n" + + " ├─ colSet: (3,4)\n" + + " ├─ tableId: 2\n" + + " └─ VirtualColumnTable\n" + + " ├─ name: generated_virtual_keyless\n" + + " ├─ columns: [generated_virtual_keyless.j:0, parenthesized(json_unquote(json_extract(generated_virtual_keyless.j, '$.a')))]\n" + + " └─ Table\n" + + " ├─ name: generated_virtual_keyless\n" + + " └─ columns: [j v]\n" + + "", + }, } diff --git a/enginetest/queries/index_query_plans.go b/enginetest/queries/index_query_plans.go index fbc39d63c6..07e472ac1b 100644 --- a/enginetest/queries/index_query_plans.go +++ b/enginetest/queries/index_query_plans.go @@ -177,27 +177,8 @@ var IndexPlanTests = []QueryPlanTest{ }, { Query: `update pref_index_t4 set v1 = concat(v1, 'z') where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET pref_index_t4.v1:1 = concat(pref_index_t4.v1:1,z (longtext)))\n" + - " └─ Filter\n" + - " ├─ GreaterThanOrEqual\n" + - " │ ├─ pref_index_t4.v1:1\n" + - " │ └─ a (longtext)\n" + - " └─ IndexedTableAccess(pref_index_t4)\n" + - " ├─ index: [pref_index_t4.v1,pref_index_t4.v2]\n" + - " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + - " ├─ colSet: (1-3)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: pref_index_t4\n" + - " └─ columns: [i v1 v2]\n" + - "", - }, - { - Query: `delete from pref_index_t4 where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET pref_index_t4.v1:1 = concat(pref_index_t4.v1:1,z (longtext)))\n" + " └─ Filter\n" + " ├─ GreaterThanOrEqual\n" + " │ ├─ pref_index_t4.v1:1\n" + @@ -212,6 +193,23 @@ var IndexPlanTests = []QueryPlanTest{ " └─ columns: [i v1 v2]\n" + "", }, + { + Query: `delete from pref_index_t4 where v1 >= 'a'`, + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ GreaterThanOrEqual\n" + + " │ ├─ pref_index_t4.v1:1\n" + + " │ └─ a (longtext)\n" + + " └─ IndexedTableAccess(pref_index_t4)\n" + + " ├─ index: [pref_index_t4.v1,pref_index_t4.v2]\n" + + " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + + " ├─ colSet: (1-3)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: pref_index_t4\n" + + " └─ columns: [i v1 v2]\n" + + "", + }, { Query: `select * from pref_index_t3 where v1 = 'a'`, ExpectedPlan: "Filter\n" + @@ -372,27 +370,8 @@ var IndexPlanTests = []QueryPlanTest{ }, { Query: `update pref_index_t3 set v1 = concat(v1, 'z') where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET pref_index_t3.v1:0 = concat(pref_index_t3.v1:0,z (longtext)))\n" + - " └─ Filter\n" + - " ├─ GreaterThanOrEqual\n" + - " │ ├─ pref_index_t3.v1:0\n" + - " │ └─ a (longtext)\n" + - " └─ IndexedTableAccess(pref_index_t3)\n" + - " ├─ index: [pref_index_t3.v1,pref_index_t3.v2]\n" + - " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + - " ├─ colSet: (1,2)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: pref_index_t3\n" + - " └─ columns: [v1 v2]\n" + - "", - }, - { - Query: `delete from pref_index_t3 where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET pref_index_t3.v1:0 = concat(pref_index_t3.v1:0,z (longtext)))\n" + " └─ Filter\n" + " ├─ GreaterThanOrEqual\n" + " │ ├─ pref_index_t3.v1:0\n" + @@ -407,6 +386,23 @@ var IndexPlanTests = []QueryPlanTest{ " └─ columns: [v1 v2]\n" + "", }, + { + Query: `delete from pref_index_t3 where v1 >= 'a'`, + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ GreaterThanOrEqual\n" + + " │ ├─ pref_index_t3.v1:0\n" + + " │ └─ a (longtext)\n" + + " └─ IndexedTableAccess(pref_index_t3)\n" + + " ├─ index: [pref_index_t3.v1,pref_index_t3.v2]\n" + + " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + + " ├─ colSet: (1,2)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: pref_index_t3\n" + + " └─ columns: [v1 v2]\n" + + "", + }, { Query: `select * from pref_index_t2 where v1 = 'A'`, ExpectedPlan: "Filter\n" + @@ -567,27 +563,8 @@ var IndexPlanTests = []QueryPlanTest{ }, { Query: `update pref_index_t2 set v1 = concat(v1, 'Z') where v1 >= 'A'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET pref_index_t2.v1:1 = concat(pref_index_t2.v1:1,Z (longtext)))\n" + - " └─ Filter\n" + - " ├─ GreaterThanOrEqual\n" + - " │ ├─ pref_index_t2.v1:1\n" + - " │ └─ A (longtext)\n" + - " └─ IndexedTableAccess(pref_index_t2)\n" + - " ├─ index: [pref_index_t2.v1,pref_index_t2.v2]\n" + - " ├─ static: [{[A, ∞), [NULL, ∞)}]\n" + - " ├─ colSet: (1-3)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: pref_index_t2\n" + - " └─ columns: [i v1 v2]\n" + - "", - }, - { - Query: `delete from pref_index_t2 where v1 >= 'A'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET pref_index_t2.v1:1 = concat(pref_index_t2.v1:1,Z (longtext)))\n" + " └─ Filter\n" + " ├─ GreaterThanOrEqual\n" + " │ ├─ pref_index_t2.v1:1\n" + @@ -602,6 +579,23 @@ var IndexPlanTests = []QueryPlanTest{ " └─ columns: [i v1 v2]\n" + "", }, + { + Query: `delete from pref_index_t2 where v1 >= 'A'`, + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ GreaterThanOrEqual\n" + + " │ ├─ pref_index_t2.v1:1\n" + + " │ └─ A (longtext)\n" + + " └─ IndexedTableAccess(pref_index_t2)\n" + + " ├─ index: [pref_index_t2.v1,pref_index_t2.v2]\n" + + " ├─ static: [{[A, ∞), [NULL, ∞)}]\n" + + " ├─ colSet: (1-3)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: pref_index_t2\n" + + " └─ columns: [i v1 v2]\n" + + "", + }, { Query: `select * from pref_index_t1 where v1 = 'a'`, ExpectedPlan: "Filter\n" + @@ -762,8 +756,25 @@ var IndexPlanTests = []QueryPlanTest{ }, { Query: `delete from pref_index_t1 where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ GreaterThanOrEqual\n" + + " │ ├─ pref_index_t1.v1:1\n" + + " │ └─ a (longtext)\n" + + " └─ IndexedTableAccess(pref_index_t1)\n" + + " ├─ index: [pref_index_t1.v1,pref_index_t1.v2]\n" + + " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + + " ├─ colSet: (1-3)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: pref_index_t1\n" + + " └─ columns: [i v1 v2]\n" + + "", + }, + { + Query: `update pref_index_t1 set v1 = concat(v1, 'z') where v1 >= 'a'`, + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET pref_index_t1.v1:1 = concat(pref_index_t1.v1:1,z (longtext)))\n" + " └─ Filter\n" + " ├─ GreaterThanOrEqual\n" + " │ ├─ pref_index_t1.v1:1\n" + @@ -778,25 +789,6 @@ var IndexPlanTests = []QueryPlanTest{ " └─ columns: [i v1 v2]\n" + "", }, - { - Query: `update pref_index_t1 set v1 = concat(v1, 'z') where v1 >= 'a'`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET pref_index_t1.v1:1 = concat(pref_index_t1.v1:1,z (longtext)))\n" + - " └─ Filter\n" + - " ├─ GreaterThanOrEqual\n" + - " │ ├─ pref_index_t1.v1:1\n" + - " │ └─ a (longtext)\n" + - " └─ IndexedTableAccess(pref_index_t1)\n" + - " ├─ index: [pref_index_t1.v1,pref_index_t1.v2]\n" + - " ├─ static: [{[a, ∞), [NULL, ∞)}]\n" + - " ├─ colSet: (1-3)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: pref_index_t1\n" + - " └─ columns: [i v1 v2]\n" + - "", - }, { Query: `SELECT * FROM comp_index_t0 WHERE ((v1<25) OR (v1>24));`, ExpectedPlan: "IndexedTableAccess(comp_index_t0)\n" + diff --git a/enginetest/queries/integration_plans.go b/enginetest/queries/integration_plans.go index 8eb9613bbe..a098a1d4f7 100644 --- a/enginetest/queries/integration_plans.go +++ b/enginetest/queries/integration_plans.go @@ -17660,16 +17660,15 @@ INNER JOIN XOAOP pa Query: `-- deletes DELETE FROM QYWQD WHERE id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(QYWQD)\n" + - " ├─ index: [QYWQD.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-6)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: QYWQD\n" + - " └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(QYWQD)\n" + + " ├─ index: [QYWQD.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-6)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: QYWQD\n" + + " └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + "", }, { @@ -17678,132 +17677,124 @@ DELETE FROM HDDVB WHERE FV24E IN ('1', '2', '3') OR UJ6XY IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ Filter\n" + - " ├─ Or\n" + - " │ ├─ HashIn\n" + - " │ │ ├─ hddvb.FV24E:1!null\n" + - " │ │ └─ TUPLE(1 (longtext), 2 (longtext), 3 (longtext))\n" + - " │ └─ HashIn\n" + - " │ ├─ hddvb.UJ6XY:2!null\n" + - " │ └─ TUPLE(1 (longtext), 2 (longtext), 3 (longtext))\n" + - " └─ ProcessTable\n" + - " └─ Table\n" + - " ├─ name: HDDVB\n" + - " └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ Or\n" + + " │ ├─ HashIn\n" + + " │ │ ├─ hddvb.FV24E:1!null\n" + + " │ │ └─ TUPLE(1 (longtext), 2 (longtext), 3 (longtext))\n" + + " │ └─ HashIn\n" + + " │ ├─ hddvb.UJ6XY:2!null\n" + + " │ └─ TUPLE(1 (longtext), 2 (longtext), 3 (longtext))\n" + + " └─ ProcessTable\n" + + " └─ Table\n" + + " ├─ name: HDDVB\n" + + " └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + "", }, { Query: ` DELETE FROM QYWQD WHERE id IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(QYWQD)\n" + - " ├─ index: [QYWQD.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-6)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: QYWQD\n" + - " └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(QYWQD)\n" + + " ├─ index: [QYWQD.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-6)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: QYWQD\n" + + " └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + "", }, { Query: ` DELETE FROM AMYXQ WHERE LUEVY IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(AMYXQ)\n" + - " ├─ index: [AMYXQ.GXLUB,AMYXQ.LUEVY]\n" + - " ├─ static: [{[NULL, ∞), [1, 1]}, {[NULL, ∞), [2, 2]}, {[NULL, ∞), [3, 3]}]\n" + - " ├─ colSet: (1-8)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: AMYXQ\n" + - " └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(AMYXQ)\n" + + " ├─ index: [AMYXQ.GXLUB,AMYXQ.LUEVY]\n" + + " ├─ static: [{[NULL, ∞), [1, 1]}, {[NULL, ∞), [2, 2]}, {[NULL, ∞), [3, 3]}]\n" + + " ├─ colSet: (1-8)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: AMYXQ\n" + + " └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + "", }, { Query: ` DELETE FROM HGMQ6 WHERE id IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(HGMQ6)\n" + - " ├─ index: [HGMQ6.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-17)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: HGMQ6\n" + - " └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(HGMQ6)\n" + + " ├─ index: [HGMQ6.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-17)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: HGMQ6\n" + + " └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + "", }, { Query: ` DELETE FROM HDDVB WHERE id IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(HDDVB)\n" + - " ├─ index: [HDDVB.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-9)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: HDDVB\n" + - " └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(HDDVB)\n" + + " ├─ index: [HDDVB.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-9)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: HDDVB\n" + + " └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + "", }, { Query: ` DELETE FROM FLQLP WHERE LUEVY IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(FLQLP)\n" + - " ├─ index: [FLQLP.LUEVY]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-12)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: FLQLP\n" + - " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(FLQLP)\n" + + " ├─ index: [FLQLP.LUEVY]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-12)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: FLQLP\n" + + " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + "", }, { Query: ` DELETE FROM FLQLP WHERE id IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(FLQLP)\n" + - " ├─ index: [FLQLP.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-12)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: FLQLP\n" + - " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(FLQLP)\n" + + " ├─ index: [FLQLP.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-12)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: FLQLP\n" + + " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + "", }, { Query: ` DELETE FROM FLQLP WHERE id IN ('1', '2', '3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + - " └─ IndexedTableAccess(FLQLP)\n" + - " ├─ index: [FLQLP.id]\n" + - " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " ├─ colSet: (1-12)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: FLQLP\n" + - " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(FLQLP)\n" + + " ├─ index: [FLQLP.id]\n" + + " ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " ├─ colSet: (1-12)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: FLQLP\n" + + " └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + "", }, { @@ -17812,98 +17803,96 @@ WHERE id IN ('1', '2', '3')`, UPDATE E2I7U nd SET nd.KNG7T = (SELECT gn.id FROM WE72E gn INNER JOIN TDRVG ltnm ON ltnm.SSHPJ = gn.SSHPJ WHERE ltnm.FGG57 = nd.FGG57) WHERE nd.FGG57 IS NOT NULL AND nd.KNG7T IS NULL`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET nd.KNG7T:2 = Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select gn.id from WE72E as gn join TDRVG as ltnm on ltnm.SSHPJ = gn.SSHPJ where ltnm.FGG57 = nd.FGG57\n" + - " └─ Project\n" + - " ├─ columns: [gn.id:17!null]\n" + - " └─ Filter\n" + - " ├─ Eq\n" + - " │ ├─ ltnm.FGG57:19!null\n" + - " │ └─ nd.FGG57:6\n" + - " └─ MergeJoin\n" + - " ├─ cmp: Eq\n" + - " │ ├─ gn.SSHPJ:18!null\n" + - " │ └─ ltnm.SSHPJ:20!null\n" + - " ├─ TableAlias(gn)\n" + - " │ └─ IndexedTableAccess(WE72E)\n" + - " │ ├─ index: [WE72E.SSHPJ]\n" + - " │ ├─ static: [{[NULL, ∞)}]\n" + - " │ ├─ colSet: (18-21)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: WE72E\n" + - " │ └─ columns: [id sshpj]\n" + - " └─ TableAlias(ltnm)\n" + - " └─ IndexedTableAccess(TDRVG)\n" + - " ├─ index: [TDRVG.SSHPJ]\n" + - " ├─ static: [{[NULL, ∞)}]\n" + - " ├─ colSet: (22-26)\n" + - " ├─ tableId: 3\n" + - " └─ Table\n" + - " ├─ name: TDRVG\n" + - " └─ columns: [fgg57 sshpj]\n" + - " )\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET nd.KNG7T:2 = Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select gn.id from WE72E as gn join TDRVG as ltnm on ltnm.SSHPJ = gn.SSHPJ where ltnm.FGG57 = nd.FGG57\n" + + " └─ Project\n" + + " ├─ columns: [gn.id:17!null]\n" + " └─ Filter\n" + - " ├─ NOT\n" + - " │ └─ nd.FGG57:6 IS NULL\n" + - " └─ TableAlias(nd)\n" + - " └─ IndexedTableAccess(E2I7U)\n" + - " ├─ index: [E2I7U.KNG7T]\n" + - " ├─ static: [{[NULL, NULL]}]\n" + - " ├─ colSet: (1-17)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: E2I7U\n" + - " └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " ├─ Eq\n" + + " │ ├─ ltnm.FGG57:19!null\n" + + " │ └─ nd.FGG57:6\n" + + " └─ MergeJoin\n" + + " ├─ cmp: Eq\n" + + " │ ├─ gn.SSHPJ:18!null\n" + + " │ └─ ltnm.SSHPJ:20!null\n" + + " ├─ TableAlias(gn)\n" + + " │ └─ IndexedTableAccess(WE72E)\n" + + " │ ├─ index: [WE72E.SSHPJ]\n" + + " │ ├─ static: [{[NULL, ∞)}]\n" + + " │ ├─ colSet: (18-21)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: WE72E\n" + + " │ └─ columns: [id sshpj]\n" + + " └─ TableAlias(ltnm)\n" + + " └─ IndexedTableAccess(TDRVG)\n" + + " ├─ index: [TDRVG.SSHPJ]\n" + + " ├─ static: [{[NULL, ∞)}]\n" + + " ├─ colSet: (22-26)\n" + + " ├─ tableId: 3\n" + + " └─ Table\n" + + " ├─ name: TDRVG\n" + + " └─ columns: [fgg57 sshpj]\n" + + " )\n" + + " └─ Filter\n" + + " ├─ NOT\n" + + " │ └─ nd.FGG57:6 IS NULL\n" + + " └─ TableAlias(nd)\n" + + " └─ IndexedTableAccess(E2I7U)\n" + + " ├─ index: [E2I7U.KNG7T]\n" + + " ├─ static: [{[NULL, NULL]}]\n" + + " ├─ colSet: (1-17)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: E2I7U\n" + + " └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + "", }, { Query: ` UPDATE S3FQX SET ADWYM = 0, FPUYA = 0`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ Trigger(CREATE TRIGGER S3FQX_on_update BEFORE UPDATE ON S3FQX\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF NEW.ADWYM NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ADWYM field is an int boolean (0/1).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ADWYM field is an int boolean (0/1).';\n" + - " END IF;\n" + - " IF NEW.FPUYA NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The FPUYA field is an int boolean (0/1).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The FPUYA field is an int boolean (0/1).';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ UpdateSource(SET s3fqx.ADWYM:1!null = 0 (tinyint),SET s3fqx.FPUYA:2!null = 0 (tinyint))\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: S3FQX\n" + - " │ └─ columns: [id adwym fpuya]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: new.ADWYM:4!null\n" + - " │ └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ADWYM field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.FPUYA:5!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The FPUYA field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Update\n" + + " └─ Trigger(CREATE TRIGGER S3FQX_on_update BEFORE UPDATE ON S3FQX\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF NEW.ADWYM NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ADWYM field is an int boolean (0/1).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ADWYM field is an int boolean (0/1).';\n" + + " END IF;\n" + + " IF NEW.FPUYA NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The FPUYA field is an int boolean (0/1).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The FPUYA field is an int boolean (0/1).';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ UpdateSource(SET s3fqx.ADWYM:1!null = 0 (tinyint),SET s3fqx.FPUYA:2!null = 0 (tinyint))\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: S3FQX\n" + + " │ └─ columns: [id adwym fpuya]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: new.ADWYM:4!null\n" + + " │ └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ADWYM field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.FPUYA:5!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The FPUYA field is an int boolean (0/1)., MYSQL_ERRNO = 1644\n" + "", }, { @@ -17920,67 +17909,66 @@ FROM YK2GW WHERE id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, NFRYN, IXUXU, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: THNTS\n" + - " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER THNTS_on_insert BEFORE INSERT ON THNTS\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.IXUXU IS NULL\n" + - " THEN\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The IXUXU field is mandatory.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NFRYN:1!null, IXUXU:2, FHCYT:3]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jmrql.id:34!null]\n" + - " │ │ └─ IndexedTableAccess(JMRQL)\n" + - " │ │ ├─ index: [JMRQL.DZLIM]\n" + - " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + - " │ │ ├─ colSet: (36-38)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JMRQL\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [yk2gw.id:0!null, yk2gw.FTQLQ:1!null, yk2gw.TUXML:2, yk2gw.PAEF5:3, yk2gw.RUCY4:4, yk2gw.TPNJ6:5!null, yk2gw.LBL53:6, yk2gw.NB3QS:7, yk2gw.EO7IV:8, yk2gw.MUHJF:9, yk2gw.FM34L:10, yk2gw.TY5RF:11, yk2gw.ZHTLH:12, yk2gw.NPB7W:13, yk2gw.SX3HH:14, yk2gw.ISBNF:15, yk2gw.YA7YB:16, yk2gw.C5YKB:17, yk2gw.QK7KT:18, yk2gw.FFGE6:19, yk2gw.FIIGJ:20, yk2gw.SH3NC:21, yk2gw.NTENA:22, yk2gw.M4AUB:23, yk2gw.X5AIR:24, yk2gw.SAB6M:25, yk2gw.G5QI5:26, yk2gw.ZVQVD:27, yk2gw.YKSSU:28, yk2gw.FHCYT:29, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jmrql.id:30!null]\n" + - " │ │ └─ IndexedTableAccess(JMRQL)\n" + - " │ │ ├─ index: [JMRQL.DZLIM]\n" + - " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + - " │ │ ├─ colSet: (36-38)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JMRQL\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + - " │ └─ IndexedTableAccess(YK2GW)\n" + - " │ ├─ index: [YK2GW.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (5-34)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: YK2GW\n" + - " │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(new.IXUXU:2 IS NULL)\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The IXUXU field is mandatory., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, NFRYN, IXUXU, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: THNTS\n" + + " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER THNTS_on_insert BEFORE INSERT ON THNTS\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.IXUXU IS NULL\n" + + " THEN\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The IXUXU field is mandatory.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NFRYN:1!null, IXUXU:2, FHCYT:3]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jmrql.id:34!null]\n" + + " │ │ └─ IndexedTableAccess(JMRQL)\n" + + " │ │ ├─ index: [JMRQL.DZLIM]\n" + + " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + + " │ │ ├─ colSet: (36-38)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JMRQL\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [yk2gw.id:0!null, yk2gw.FTQLQ:1!null, yk2gw.TUXML:2, yk2gw.PAEF5:3, yk2gw.RUCY4:4, yk2gw.TPNJ6:5!null, yk2gw.LBL53:6, yk2gw.NB3QS:7, yk2gw.EO7IV:8, yk2gw.MUHJF:9, yk2gw.FM34L:10, yk2gw.TY5RF:11, yk2gw.ZHTLH:12, yk2gw.NPB7W:13, yk2gw.SX3HH:14, yk2gw.ISBNF:15, yk2gw.YA7YB:16, yk2gw.C5YKB:17, yk2gw.QK7KT:18, yk2gw.FFGE6:19, yk2gw.FIIGJ:20, yk2gw.SH3NC:21, yk2gw.NTENA:22, yk2gw.M4AUB:23, yk2gw.X5AIR:24, yk2gw.SAB6M:25, yk2gw.G5QI5:26, yk2gw.ZVQVD:27, yk2gw.YKSSU:28, yk2gw.FHCYT:29, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from JMRQL where DZLIM = 'T4IBQ'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jmrql.id:30!null]\n" + + " │ │ └─ IndexedTableAccess(JMRQL)\n" + + " │ │ ├─ index: [JMRQL.DZLIM]\n" + + " │ │ ├─ static: [{[T4IBQ, T4IBQ]}]\n" + + " │ │ ├─ colSet: (36-38)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JMRQL\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as NFRYN, yk2gw.id:0!null as IXUXU, NULL (null) as FHCYT]\n" + + " │ └─ IndexedTableAccess(YK2GW)\n" + + " │ ├─ index: [YK2GW.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (5-34)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: YK2GW\n" + + " │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(new.IXUXU:2 IS NULL)\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The IXUXU field is mandatory., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18017,121 +18005,120 @@ FROM AND rn.WNUNU IS NULL AND rn.HHVLX IS NULL -- Keep only where no corresponding is found ) ITWML`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, WNUNU, HHVLX, HVHRZ, YKSSU, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: QYWQD\n" + - " │ └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER QYWQD_on_insert BEFORE INSERT ON QYWQD\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT FFTBJ FROM NOXN3 WHERE id = NEW.WNUNU) <> (SELECT BRQP2 FROM NOXN3 WHERE id = NEW.HHVLX)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, WNUNU:1!null, HHVLX:2!null, HVHRZ:3!null, YKSSU:4, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, itwml.DRIWM:0!null as WNUNU, itwml.JIEVY:1!null as HHVLX, 1 (decimal(2,1)) as HVHRZ, NULL (null) as YKSSU, NULL (null) as FHCYT]\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: itwml\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (36-38)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Project\n" + - " │ ├─ columns: [sn.id:0!null as DRIWM, skpm6.id:4!null as JIEVY, sn.ECDKM:2 as HVHRZ]\n" + - " │ └─ Filter\n" + - " │ ├─ AND\n" + - " │ │ ├─ rn.WNUNU:6!null IS NULL\n" + - " │ │ └─ rn.HHVLX:7!null IS NULL\n" + - " │ └─ LeftOuterLookupJoin\n" + - " │ ├─ Eq\n" + - " │ │ ├─ rn.HHVLX:7!null\n" + - " │ │ └─ skpm6.id:4!null\n" + - " │ ├─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ sn.FFTBJ:1!null\n" + - " │ │ │ └─ skpm6.BRQP2:5!null\n" + - " │ │ ├─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ sn.NUMK2:3!null\n" + - " │ │ │ │ └─ 1 (int)\n" + - " │ │ │ └─ TableAlias(sn)\n" + - " │ │ │ └─ IndexedTableAccess(NOXN3)\n" + - " │ │ │ ├─ index: [NOXN3.FFTBJ]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (7-16)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: NOXN3\n" + - " │ │ │ └─ columns: [id fftbj ecdkm numk2]\n" + - " │ │ └─ TableAlias(skpm6)\n" + - " │ │ └─ IndexedTableAccess(NOXN3)\n" + - " │ │ ├─ index: [NOXN3.BRQP2]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (17-26)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: NOXN3\n" + - " │ │ └─ columns: [id brqp2]\n" + - " │ └─ TableAlias(rn)\n" + - " │ └─ IndexedTableAccess(QYWQD)\n" + - " │ ├─ index: [QYWQD.WNUNU]\n" + - " │ ├─ keys: [sn.id:0!null]\n" + - " │ ├─ colSet: (27-32)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: QYWQD\n" + - " │ └─ columns: [wnunu hhvlx]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ Eq\n" + - " ├─ Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select FFTBJ from NOXN3 where id = NEW.WNUNU\n" + - " │ └─ Project\n" + - " │ ├─ columns: [noxn3.FFTBJ:7!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ noxn3.id:6!null\n" + - " │ │ └─ new.WNUNU:1!null\n" + - " │ └─ IndexedTableAccess(NOXN3)\n" + - " │ ├─ index: [NOXN3.id]\n" + - " │ ├─ keys: [new.WNUNU:1!null]\n" + - " │ ├─ colSet: (13-22)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: NOXN3\n" + - " │ └─ columns: [id fftbj]\n" + - " └─ Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select BRQP2 from NOXN3 where id = NEW.HHVLX\n" + - " └─ Project\n" + - " ├─ columns: [noxn3.BRQP2:7!null]\n" + - " └─ Filter\n" + - " ├─ Eq\n" + - " │ ├─ noxn3.id:6!null\n" + - " │ └─ new.HHVLX:2!null\n" + - " └─ IndexedTableAccess(NOXN3)\n" + - " ├─ index: [NOXN3.id]\n" + - " ├─ keys: [new.HHVLX:2!null]\n" + - " ├─ colSet: (23-32)\n" + - " ├─ tableId: 4\n" + - " └─ Table\n" + - " ├─ name: NOXN3\n" + - " └─ columns: [id brqp2]\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI)., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, WNUNU, HHVLX, HVHRZ, YKSSU, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: QYWQD\n" + + " │ └─ columns: [id wnunu hhvlx hvhrz ykssu fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER QYWQD_on_insert BEFORE INSERT ON QYWQD\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT FFTBJ FROM NOXN3 WHERE id = NEW.WNUNU) <> (SELECT BRQP2 FROM NOXN3 WHERE id = NEW.HHVLX)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI).';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, WNUNU:1!null, HHVLX:2!null, HVHRZ:3!null, YKSSU:4, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, itwml.DRIWM:0!null as WNUNU, itwml.JIEVY:1!null as HHVLX, 1 (decimal(2,1)) as HVHRZ, NULL (null) as YKSSU, NULL (null) as FHCYT]\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: itwml\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (36-38)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Project\n" + + " │ ├─ columns: [sn.id:0!null as DRIWM, skpm6.id:4!null as JIEVY, sn.ECDKM:2 as HVHRZ]\n" + + " │ └─ Filter\n" + + " │ ├─ AND\n" + + " │ │ ├─ rn.WNUNU:6!null IS NULL\n" + + " │ │ └─ rn.HHVLX:7!null IS NULL\n" + + " │ └─ LeftOuterLookupJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ rn.HHVLX:7!null\n" + + " │ │ └─ skpm6.id:4!null\n" + + " │ ├─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ sn.FFTBJ:1!null\n" + + " │ │ │ └─ skpm6.BRQP2:5!null\n" + + " │ │ ├─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ sn.NUMK2:3!null\n" + + " │ │ │ │ └─ 1 (int)\n" + + " │ │ │ └─ TableAlias(sn)\n" + + " │ │ │ └─ IndexedTableAccess(NOXN3)\n" + + " │ │ │ ├─ index: [NOXN3.FFTBJ]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (7-16)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: NOXN3\n" + + " │ │ │ └─ columns: [id fftbj ecdkm numk2]\n" + + " │ │ └─ TableAlias(skpm6)\n" + + " │ │ └─ IndexedTableAccess(NOXN3)\n" + + " │ │ ├─ index: [NOXN3.BRQP2]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (17-26)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: NOXN3\n" + + " │ │ └─ columns: [id brqp2]\n" + + " │ └─ TableAlias(rn)\n" + + " │ └─ IndexedTableAccess(QYWQD)\n" + + " │ ├─ index: [QYWQD.WNUNU]\n" + + " │ ├─ keys: [sn.id:0!null]\n" + + " │ ├─ colSet: (27-32)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: QYWQD\n" + + " │ └─ columns: [wnunu hhvlx]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ Eq\n" + + " ├─ Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select FFTBJ from NOXN3 where id = NEW.WNUNU\n" + + " │ └─ Project\n" + + " │ ├─ columns: [noxn3.FFTBJ:7!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ noxn3.id:6!null\n" + + " │ │ └─ new.WNUNU:1!null\n" + + " │ └─ IndexedTableAccess(NOXN3)\n" + + " │ ├─ index: [NOXN3.id]\n" + + " │ ├─ keys: [new.WNUNU:1!null]\n" + + " │ ├─ colSet: (13-22)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: NOXN3\n" + + " │ └─ columns: [id fftbj]\n" + + " └─ Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select BRQP2 from NOXN3 where id = NEW.HHVLX\n" + + " └─ Project\n" + + " ├─ columns: [noxn3.BRQP2:7!null]\n" + + " └─ Filter\n" + + " ├─ Eq\n" + + " │ ├─ noxn3.id:6!null\n" + + " │ └─ new.HHVLX:2!null\n" + + " └─ IndexedTableAccess(NOXN3)\n" + + " ├─ index: [NOXN3.id]\n" + + " ├─ keys: [new.HHVLX:2!null]\n" + + " ├─ colSet: (23-32)\n" + + " ├─ tableId: 4\n" + + " └─ Table\n" + + " ├─ name: NOXN3\n" + + " └─ columns: [id brqp2]\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The target UWBAI of the upstream edge must be the same as the source UWBAI of the downstream edge (the enzyme UWBAI)., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18147,64 +18134,63 @@ FROM TDRVG WHERE id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, QZ7E7, SSHPJ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: WE72E\n" + - " │ └─ columns: [id qz7e7 sshpj fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER WE72E_on_insert BEFORE INSERT ON WE72E\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.QZ7E7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.SSHPJ IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, QZ7E7:1!null, SSHPJ:2!null, FHCYT:3]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tdrvg.id:0!null, tdrvg.SFJ6L:2!null, tdrvg.SSHPJ:1!null, NULL (null) as FHCYT]\n" + - " │ └─ IndexedTableAccess(TDRVG)\n" + - " │ ├─ index: [TDRVG.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (5-9)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: TDRVG\n" + - " │ └─ columns: [id sshpj sfj6l]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(Or\n" + - " ├─ InSubquery\n" + - " │ ├─ left: new.QZ7E7:1!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (9,10)\n" + - " │ └─ tableId: 3\n" + - " └─ InSubquery\n" + - " ├─ left: new.SSHPJ:2!null\n" + - " └─ right: Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " └─ Table\n" + - " ├─ name: TPXHZ\n" + - " ├─ columns: [svaz4]\n" + - " ├─ colSet: (11,12)\n" + - " └─ tableId: 4\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, QZ7E7, SSHPJ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: WE72E\n" + + " │ └─ columns: [id qz7e7 sshpj fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER WE72E_on_insert BEFORE INSERT ON WE72E\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.QZ7E7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.SSHPJ IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, QZ7E7:1!null, SSHPJ:2!null, FHCYT:3]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tdrvg.id:0!null, tdrvg.SFJ6L:2!null, tdrvg.SSHPJ:1!null, NULL (null) as FHCYT]\n" + + " │ └─ IndexedTableAccess(TDRVG)\n" + + " │ ├─ index: [TDRVG.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (5-9)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: TDRVG\n" + + " │ └─ columns: [id sshpj sfj6l]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(Or\n" + + " ├─ InSubquery\n" + + " │ ├─ left: new.QZ7E7:1!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (9,10)\n" + + " │ └─ tableId: 3\n" + + " └─ InSubquery\n" + + " ├─ left: new.SSHPJ:2!null\n" + + " └─ right: Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " └─ Table\n" + + " ├─ name: TPXHZ\n" + + " ├─ columns: [svaz4]\n" + + " ├─ colSet: (11,12)\n" + + " └─ tableId: 4\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18249,201 +18235,200 @@ ON YBBG5.id = nd.XQDYT WHERE ufc.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, LUEVY, XQDYT, AMYXQ, OZTQF, Z35GY, KKGN5)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: AMYXQ\n" + - " │ └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + - " └─ Trigger(CREATE TRIGGER AMYXQ_on_insert BEFORE INSERT ON AMYXQ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT FGG57 FROM E2I7U WHERE id = NEW.LUEVY) IS NULL\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.AMYXQ < 0 OR NEW.OZTQF < 0 OR NEW.Z35GY < 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'All values in AMYXQ must ne non-negative.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'All values in AMYXQ must ne non-negative.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, XQDYT:3!null, AMYXQ:4!null, OZTQF:5!null, Z35GY:6!null, KKGN5:7]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:41!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:40!null\n" + - " │ │ │ └─ ufc.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ cla.id:39!null\n" + - " │ │ │ └─ bs.IXUXU:42\n" + - " │ │ ├─ TableAlias(cla)\n" + - " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ │ ├─ index: [YK2GW.id]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (45-74)\n" + - " │ │ │ ├─ tableId: 6\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: YK2GW\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ └─ TableAlias(bs)\n" + - " │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (41-44)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: THNTS\n" + - " │ │ └─ columns: [id ixuxu]\n" + - " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ KTNZ2 (longtext)\n" + - " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ HIID2 (longtext)\n" + - " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ SH7TP (longtext)\n" + - " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ VVKNB (longtext)\n" + - " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ DN3OQ (longtext)\n" + - " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + ExpectedPlan: "Insert(id, GXLUB, LUEVY, XQDYT, AMYXQ, OZTQF, Z35GY, KKGN5)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: AMYXQ\n" + + " │ └─ columns: [id gxlub luevy xqdyt amyxq oztqf z35gy kkgn5]\n" + + " └─ Trigger(CREATE TRIGGER AMYXQ_on_insert BEFORE INSERT ON AMYXQ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT FGG57 FROM E2I7U WHERE id = NEW.LUEVY) IS NULL\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.AMYXQ < 0 OR NEW.OZTQF < 0 OR NEW.Z35GY < 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'All values in AMYXQ must ne non-negative.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'All values in AMYXQ must ne non-negative.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, XQDYT:3!null, AMYXQ:4!null, OZTQF:5!null, Z35GY:6!null, KKGN5:7]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:41!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:40!null\n" + + " │ │ │ └─ ufc.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ cla.id:39!null\n" + + " │ │ │ └─ bs.IXUXU:42\n" + + " │ │ ├─ TableAlias(cla)\n" + + " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ │ ├─ index: [YK2GW.id]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (45-74)\n" + + " │ │ │ ├─ tableId: 6\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: YK2GW\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ └─ TableAlias(bs)\n" + + " │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (41-44)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: THNTS\n" + + " │ │ └─ columns: [id ixuxu]\n" + + " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ KTNZ2 (longtext)\n" + + " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ HIID2 (longtext)\n" + + " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ SH7TP (longtext)\n" + + " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ VVKNB (longtext)\n" + + " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ DN3OQ (longtext)\n" + + " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ufc.id:0!null, ufc.T4IBQ:1, ufc.ZH72S:2, ufc.AMYXQ:3, ufc.KTNZ2:4, ufc.HIID2:5, ufc.DN3OQ:6, ufc.VVKNB:7, ufc.SH7TP:8, ufc.SRZZO:9, ufc.QZ6VT:10, nd.id:11!null, nd.DKCAJ:12!null, nd.KNG7T:13, nd.TW55N:14!null, nd.QRQXW:15!null, nd.ECXAJ:16!null, nd.FGG57:17, nd.ZH72S:18, nd.FSK67:19!null, nd.XQDYT:20!null, nd.TCE7A:21, nd.IWV2H:22, nd.HPCMS:23!null, nd.N5CC2:24, nd.FHCYT:25, nd.ETAQ7:26, nd.A75X7:27, ybbg5.id:28!null, ybbg5.DZLIM:29!null, ybbg5.F3YUE:30, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:33!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:32!null\n" + + " │ │ │ └─ ufc.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ cla.id:31!null\n" + + " │ │ │ └─ bs.IXUXU:34\n" + + " │ │ ├─ TableAlias(cla)\n" + + " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ │ ├─ index: [YK2GW.id]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (45-74)\n" + + " │ │ │ ├─ tableId: 6\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: YK2GW\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ └─ TableAlias(bs)\n" + + " │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (41-44)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: THNTS\n" + + " │ │ └─ columns: [id ixuxu]\n" + + " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ KTNZ2 (longtext)\n" + + " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ HIID2 (longtext)\n" + + " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ SH7TP (longtext)\n" + + " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ VVKNB (longtext)\n" + + " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + + " │ │ ├─ ybbg5.DZLIM:29!null\n" + + " │ │ └─ DN3OQ (longtext)\n" + + " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + + " │ └─ InnerJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ nd.ZH72S:18\n" + + " │ │ └─ ufc.ZH72S:2\n" + + " │ ├─ TableAlias(ufc)\n" + + " │ │ └─ IndexedTableAccess(SISUT)\n" + + " │ │ ├─ index: [SISUT.id]\n" + + " │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ ├─ colSet: (9-19)\n" + + " │ │ ├─ tableId: 2\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SISUT\n" + + " │ │ └─ columns: [id t4ibq zh72s amyxq ktnz2 hiid2 dn3oq vvknb sh7tp srzzo qz6vt]\n" + + " │ └─ MergeJoin\n" + + " │ ├─ cmp: Eq\n" + + " │ │ ├─ nd.XQDYT:20!null\n" + + " │ │ └─ ybbg5.id:28!null\n" + + " │ ├─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.XQDYT]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (20-36)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(ybbg5)\n" + + " │ └─ IndexedTableAccess(XGSJM)\n" + + " │ ├─ index: [XGSJM.id]\n" + + " │ ├─ static: [{[NULL, ∞)}]\n" + + " │ ├─ colSet: (37-39)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: XGSJM\n" + + " │ └─ columns: [id dzlim f3yue]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select FGG57 from E2I7U where id = NEW.LUEVY\n" + " │ └─ Project\n" + - " │ ├─ columns: [ufc.id:0!null, ufc.T4IBQ:1, ufc.ZH72S:2, ufc.AMYXQ:3, ufc.KTNZ2:4, ufc.HIID2:5, ufc.DN3OQ:6, ufc.VVKNB:7, ufc.SH7TP:8, ufc.SRZZO:9, ufc.QZ6VT:10, nd.id:11!null, nd.DKCAJ:12!null, nd.KNG7T:13, nd.TW55N:14!null, nd.QRQXW:15!null, nd.ECXAJ:16!null, nd.FGG57:17, nd.ZH72S:18, nd.FSK67:19!null, nd.XQDYT:20!null, nd.TCE7A:21, nd.IWV2H:22, nd.HPCMS:23!null, nd.N5CC2:24, nd.FHCYT:25, nd.ETAQ7:26, nd.A75X7:27, ybbg5.id:28!null, ybbg5.DZLIM:29!null, ybbg5.F3YUE:30, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select /*+ JOIN_ORDER(cla, bs) */ bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ufc.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:33!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:32!null\n" + - " │ │ │ └─ ufc.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ cla.id:31!null\n" + - " │ │ │ └─ bs.IXUXU:34\n" + - " │ │ ├─ TableAlias(cla)\n" + - " │ │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ │ ├─ index: [YK2GW.id]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (45-74)\n" + - " │ │ │ ├─ tableId: 6\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: YK2GW\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ └─ TableAlias(bs)\n" + - " │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (41-44)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: THNTS\n" + - " │ │ └─ columns: [id ixuxu]\n" + - " │ │ as GXLUB, nd.id:11!null as LUEVY, nd.XQDYT:20!null as XQDYT, (ufc.AMYXQ:3 + 0 (decimal(2,1))) as AMYXQ, CASE WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ KTNZ2 (longtext)\n" + - " │ │ THEN (ufc.KTNZ2:4 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ HIID2 (longtext)\n" + - " │ │ THEN (ufc.HIID2:5 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ SH7TP (longtext)\n" + - " │ │ THEN (ufc.SH7TP:8 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ VVKNB (longtext)\n" + - " │ │ THEN (ufc.VVKNB:7 + 0 (decimal(2,1))) WHEN Eq\n" + - " │ │ ├─ ybbg5.DZLIM:29!null\n" + - " │ │ └─ DN3OQ (longtext)\n" + - " │ │ THEN (ufc.DN3OQ:6 + 0 (decimal(2,1))) ELSE NULL (null) END as OZTQF, (ufc.SRZZO:9 + 0 (decimal(2,1))) as Z35GY, ufc.id:0!null as KKGN5]\n" + - " │ └─ InnerJoin\n" + + " │ ├─ columns: [e2i7u.FGG57:9]\n" + + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ nd.ZH72S:18\n" + - " │ │ └─ ufc.ZH72S:2\n" + - " │ ├─ TableAlias(ufc)\n" + - " │ │ └─ IndexedTableAccess(SISUT)\n" + - " │ │ ├─ index: [SISUT.id]\n" + - " │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ ├─ colSet: (9-19)\n" + - " │ │ ├─ tableId: 2\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SISUT\n" + - " │ │ └─ columns: [id t4ibq zh72s amyxq ktnz2 hiid2 dn3oq vvknb sh7tp srzzo qz6vt]\n" + - " │ └─ MergeJoin\n" + - " │ ├─ cmp: Eq\n" + - " │ │ ├─ nd.XQDYT:20!null\n" + - " │ │ └─ ybbg5.id:28!null\n" + - " │ ├─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.XQDYT]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (20-36)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(ybbg5)\n" + - " │ └─ IndexedTableAccess(XGSJM)\n" + - " │ ├─ index: [XGSJM.id]\n" + - " │ ├─ static: [{[NULL, ∞)}]\n" + - " │ ├─ colSet: (37-39)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: XGSJM\n" + - " │ └─ columns: [id dzlim f3yue]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select FGG57 from E2I7U where id = NEW.LUEVY\n" + - " │ └─ Project\n" + - " │ ├─ columns: [e2i7u.FGG57:9]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ e2i7u.id:8!null\n" + - " │ │ └─ new.LUEVY:2!null\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.id]\n" + - " │ ├─ keys: [new.LUEVY:2!null]\n" + - " │ ├─ colSet: (17-33)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id fgg57]\n" + - " │ IS NULL)\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(Or\n" + - " ├─ Or\n" + - " │ ├─ LessThan\n" + - " │ │ ├─ new.AMYXQ:4!null\n" + - " │ │ └─ 0 (tinyint)\n" + - " │ └─ LessThan\n" + - " │ ├─ new.OZTQF:5!null\n" + - " │ └─ 0 (tinyint)\n" + - " └─ LessThan\n" + - " ├─ new.Z35GY:6!null\n" + - " └─ 0 (tinyint)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = All values in AMYXQ must ne non-negative., MYSQL_ERRNO = 1644\n" + + " │ │ ├─ e2i7u.id:8!null\n" + + " │ │ └─ new.LUEVY:2!null\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.id]\n" + + " │ ├─ keys: [new.LUEVY:2!null]\n" + + " │ ├─ colSet: (17-33)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id fgg57]\n" + + " │ IS NULL)\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The given UWBAI can not be connected to a AMYXQ record as it does not have IYDZV., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(Or\n" + + " ├─ Or\n" + + " │ ├─ LessThan\n" + + " │ │ ├─ new.AMYXQ:4!null\n" + + " │ │ └─ 0 (tinyint)\n" + + " │ └─ LessThan\n" + + " │ ├─ new.OZTQF:5!null\n" + + " │ └─ 0 (tinyint)\n" + + " └─ LessThan\n" + + " ├─ new.Z35GY:6!null\n" + + " └─ 0 (tinyint)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = All values in AMYXQ must ne non-negative., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18464,179 +18449,178 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[NER, NER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[NER, NER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[NER, NER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ner:2\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'NER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[NER, NER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ner:2\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18657,179 +18641,178 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[BER, BER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[BER, BER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[BER, BER]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.ber:3\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'BER'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[BER, BER]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.ber:3\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -18850,179 +18833,178 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[HR, HR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[HR, HR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[HR, HR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.hr:4\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'HR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[HR, HR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.hr:4\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19043,179 +19025,178 @@ FROM FG26Y ums WHERE ums.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SZQWJ\n" + - " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + - " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.D237E NOT IN (0, 1)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:12!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:15!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:13\n" + - " │ │ │ └─ cla.id:14!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:12!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[MMR, MMR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + ExpectedPlan: "Insert(id, GXLUB, CH3FR, D237E, JOGI6)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SZQWJ\n" + + " │ └─ columns: [id gxlub ch3fr d237e jogi6]\n" + + " └─ Trigger(CREATE TRIGGER SZQWJ_on_insert BEFORE INSERT ON SZQWJ\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " (SELECT DZLIM FROM XOAOP WHERE id = NEW.CH3FR) NOT IN ('NER', 'BER', 'HR', 'MMR')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ECUWU must be one of the following: ''NER'', ''BER'', ''HR'', ''MMR''.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.D237E NOT IN (0, 1)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The D237E field must be either 0 or 1.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The D237E field must be either 0 or 1.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, CH3FR:2!null, D237E:3!null, JOGI6:4]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:12!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:15!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:13\n" + + " │ │ │ └─ cla.id:14!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:12!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[MMR, MMR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [ums.id:0!null, ums.T4IBQ:1, ums.ner:2, ums.ber:3, ums.hr:4, ums.mmr:5, ums.QZ6VT:6, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ cla.FTQLQ:10!null\n" + + " │ │ │ └─ ums.T4IBQ:1\n" + + " │ │ └─ MergeJoin\n" + + " │ │ ├─ cmp: Eq\n" + + " │ │ │ ├─ bs.IXUXU:8\n" + + " │ │ │ └─ cla.id:9!null\n" + + " │ │ ├─ TableAlias(bs)\n" + + " │ │ │ └─ IndexedTableAccess(THNTS)\n" + + " │ │ │ ├─ index: [THNTS.IXUXU]\n" + + " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ │ ├─ colSet: (14-17)\n" + + " │ │ │ ├─ tableId: 3\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: THNTS\n" + + " │ │ │ └─ columns: [id ixuxu]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.id]\n" + + " │ │ ├─ static: [{[NULL, ∞)}]\n" + + " │ │ ├─ colSet: (18-47)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as GXLUB, Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [xoaop.id:7!null]\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.DZLIM]\n" + + " │ │ ├─ static: [{[MMR, MMR]}]\n" + + " │ │ ├─ colSet: (49-51)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ │ as CH3FR, CASE WHEN GreaterThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 1 (tinyint) WHEN LessThan\n" + + " │ │ ├─ ums.mmr:5\n" + + " │ │ └─ 0.5 (decimal(2,1))\n" + + " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + + " │ └─ TableAlias(ums)\n" + + " │ └─ IndexedTableAccess(FG26Y)\n" + + " │ ├─ index: [FG26Y.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (6-12)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: FG26Y\n" + + " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: Subquery\n" + " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select bs.id from THNTS as bs join YK2GW as cla on cla.id = bs.IXUXU where cla.FTQLQ = ums.T4IBQ\n" + + " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + " │ │ └─ Project\n" + - " │ │ ├─ columns: [bs.id:7!null]\n" + + " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + " │ │ └─ Filter\n" + " │ │ ├─ Eq\n" + - " │ │ │ ├─ cla.FTQLQ:10!null\n" + - " │ │ │ └─ ums.T4IBQ:1\n" + - " │ │ └─ MergeJoin\n" + - " │ │ ├─ cmp: Eq\n" + - " │ │ │ ├─ bs.IXUXU:8\n" + - " │ │ │ └─ cla.id:9!null\n" + - " │ │ ├─ TableAlias(bs)\n" + - " │ │ │ └─ IndexedTableAccess(THNTS)\n" + - " │ │ │ ├─ index: [THNTS.IXUXU]\n" + - " │ │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ │ ├─ colSet: (14-17)\n" + - " │ │ │ ├─ tableId: 3\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: THNTS\n" + - " │ │ │ └─ columns: [id ixuxu]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.id]\n" + - " │ │ ├─ static: [{[NULL, ∞)}]\n" + - " │ │ ├─ colSet: (18-47)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as GXLUB, Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from XOAOP where DZLIM = 'MMR'\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.id:7!null]\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.DZLIM]\n" + - " │ │ ├─ static: [{[MMR, MMR]}]\n" + - " │ │ ├─ colSet: (49-51)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ │ as CH3FR, CASE WHEN GreaterThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 1 (tinyint) WHEN LessThan\n" + - " │ │ ├─ ums.mmr:5\n" + - " │ │ └─ 0.5 (decimal(2,1))\n" + - " │ │ THEN 0 (tinyint) ELSE NULL (null) END as D237E, ums.id:0!null as JOGI6]\n" + - " │ └─ TableAlias(ums)\n" + - " │ └─ IndexedTableAccess(FG26Y)\n" + - " │ ├─ index: [FG26Y.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (6-12)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: FG26Y\n" + - " │ └─ columns: [id t4ibq ner ber hr mmr qz6vt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select DZLIM from XOAOP where id = NEW.CH3FR\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [xoaop.DZLIM:6!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ xoaop.id:5!null\n" + - " │ │ │ └─ new.CH3FR:2!null\n" + - " │ │ └─ IndexedTableAccess(XOAOP)\n" + - " │ │ ├─ index: [XOAOP.id]\n" + - " │ │ ├─ keys: [new.CH3FR:2!null]\n" + - " │ │ ├─ colSet: (11-13)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: XOAOP\n" + - " │ │ └─ columns: [id dzlim]\n" + - " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.D237E:3!null\n" + - " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + + " │ │ │ ├─ xoaop.id:5!null\n" + + " │ │ │ └─ new.CH3FR:2!null\n" + + " │ │ └─ IndexedTableAccess(XOAOP)\n" + + " │ │ ├─ index: [XOAOP.id]\n" + + " │ │ ├─ keys: [new.CH3FR:2!null]\n" + + " │ │ ├─ colSet: (11-13)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: XOAOP\n" + + " │ │ └─ columns: [id dzlim]\n" + + " │ └─ right: TUPLE(NER (longtext), BER (longtext), HR (longtext), MMR (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ECUWU must be one of the following: 'NER', 'BER', 'HR', 'MMR'., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.D237E:3!null\n" + + " └─ right: TUPLE(0 (tinyint), 1 (tinyint))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The D237E field must be either 0 or 1., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19241,85 +19222,84 @@ WHERE AND umf.id IN ('1','2','3') ) NCVD2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, BTXC5, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXBU\n" + - " │ └─ columns: [id btxc5 fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER TPXBU_on_insert BEFORE INSERT ON TPXBU\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.BTXC5 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, BTXC5:1, FHCYT:2]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, ncvd2.BTXC5:0 as BTXC5, NULL (null) as FHCYT]\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: ncvd2\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (33)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.SYPKF:8 as BTXC5]\n" + - " │ └─ Filter\n" + - " │ ├─ AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ ├─ left: umf.SYPKF:8\n" + - " │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ ├─ alias-string: select BTXC5 from TPXBU where BTXC5 is not null\n" + - " │ │ │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ │ │ ├─ colSet: (29-31)\n" + - " │ │ │ │ ├─ tableId: 3\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: TPXBU\n" + - " │ │ │ │ └─ columns: [btxc5]\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ umf.SYPKF:8 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ └─ TableAlias(umf)\n" + - " │ └─ IndexedTableAccess(NZKPM)\n" + - " │ ├─ index: [NZKPM.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (4-28)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: NZKPM\n" + - " │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + - " └─ BEGIN .. END\n" + - " └─ IF BLOCK\n" + - " └─ IF(InSubquery\n" + - " ├─ left: new.BTXC5:1\n" + - " └─ right: Subquery\n" + - " ├─ cacheable: false\n" + - " ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " └─ Table\n" + - " ├─ name: TPXHZ\n" + - " ├─ columns: [svaz4]\n" + - " ├─ colSet: (7,8)\n" + - " └─ tableId: 3\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, BTXC5, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXBU\n" + + " │ └─ columns: [id btxc5 fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER TPXBU_on_insert BEFORE INSERT ON TPXBU\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.BTXC5 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, BTXC5:1, FHCYT:2]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, ncvd2.BTXC5:0 as BTXC5, NULL (null) as FHCYT]\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: ncvd2\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (33)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.SYPKF:8 as BTXC5]\n" + + " │ └─ Filter\n" + + " │ ├─ AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ ├─ left: umf.SYPKF:8\n" + + " │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ ├─ alias-string: select BTXC5 from TPXBU where BTXC5 is not null\n" + + " │ │ │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ │ │ ├─ colSet: (29-31)\n" + + " │ │ │ │ ├─ tableId: 3\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: TPXBU\n" + + " │ │ │ │ └─ columns: [btxc5]\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ umf.SYPKF:8 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ └─ TableAlias(umf)\n" + + " │ └─ IndexedTableAccess(NZKPM)\n" + + " │ ├─ index: [NZKPM.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (4-28)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: NZKPM\n" + + " │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + + " └─ BEGIN .. END\n" + + " └─ IF BLOCK\n" + + " └─ IF(InSubquery\n" + + " ├─ left: new.BTXC5:1\n" + + " └─ right: Subquery\n" + + " ├─ cacheable: false\n" + + " ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " └─ Table\n" + + " ├─ name: TPXHZ\n" + + " ├─ columns: [svaz4]\n" + + " ├─ colSet: (7,8)\n" + + " └─ tableId: 3\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19391,423 +19371,422 @@ ON TJ5D2.SYPKF = umf.SYPKF INNER JOIN YK2GW cla ON umf.T4IBQ = cla.FTQLQ INNER JOIN THNTS bs ON cla.id = bs.IXUXU`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, GXLUB, LUEVY, M22QN, TJPT7, ARN5P, XOSD4, IDE43, HMW4H, ZBT6R, FSDY2, LT7K6, SPPYD, QCGTS, TEUJA, QQV4M, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: HGMQ6\n" + - " │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER HGMQ6_on_insert BEFORE INSERT ON HGMQ6\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.TJPT7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.ARN5P IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.XOSD4 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.IDE43 IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR\n" + - " NEW.HMW4H IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.FSDY2 NOT IN ('benign', 'VUS', 'SRARY', 'UBQWG')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + - " END IF;\n" + - " IF NEW.LT7K6 IS NOT NULL AND NEW.SPPYD IS NOT NULL\n" + - " THEN\n" + - " -- SET @custom_error_message = 'If LT7K6 has value, SPPYD must be NULL.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 has value, SPPYD must be NULL.';\n" + - " END IF;\n" + - " IF NEW.LT7K6 IS NULL AND (NEW.SPPYD IS NULL OR NEW.SPPYD <> 0.5)\n" + - " THEN\n" + - " -- SET @custom_error_message = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, M22QN:3!null, TJPT7:4!null, ARN5P:5!null, XOSD4:6!null, IDE43:7, HMW4H:8, ZBT6R:9, FSDY2:10!null, LT7K6:11, SPPYD:12, QCGTS:13, TEUJA:14, QQV4M:15, FHCYT:16]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + - " │ │ └─ tj5d2.id:25!null IS NULL\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id_overridden.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id_overridden.TW55N:85!null\n" + - " │ │ │ └─ tj5d2.H4DMT:29!null\n" + - " │ │ └─ TableAlias(nd_for_id_overridden)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + - " │ │ ├─ colSet: (159-175)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id.FGG57:85\n" + - " │ │ │ └─ umf.FGG57:2\n" + - " │ │ └─ TableAlias(nd_for_id)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ ├─ colSet: (176-192)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id fgg57]\n" + - " │ │ END as LUEVY, CASE WHEN Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:84!null]\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ static: [{[NULL, NULL]}]\n" + - " │ │ ├─ colSet: (194-196)\n" + - " │ │ ├─ tableId: 11\n" + + ExpectedPlan: "Insert(id, GXLUB, LUEVY, M22QN, TJPT7, ARN5P, XOSD4, IDE43, HMW4H, ZBT6R, FSDY2, LT7K6, SPPYD, QCGTS, TEUJA, QQV4M, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: HGMQ6\n" + + " │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER HGMQ6_on_insert BEFORE INSERT ON HGMQ6\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.TJPT7 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.ARN5P IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.XOSD4 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.IDE43 IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR\n" + + " NEW.HMW4H IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.FSDY2 NOT IN ('benign', 'VUS', 'SRARY', 'UBQWG')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'FSDY2 must be either ''benign'', ''VUS'', ''SRARY'' or ''UBQWG''.';\n" + + " END IF;\n" + + " IF NEW.LT7K6 IS NOT NULL AND NEW.SPPYD IS NOT NULL\n" + + " THEN\n" + + " -- SET @custom_error_message = 'If LT7K6 has value, SPPYD must be NULL.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 has value, SPPYD must be NULL.';\n" + + " END IF;\n" + + " IF NEW.LT7K6 IS NULL AND (NEW.SPPYD IS NULL OR NEW.SPPYD <> 0.5)\n" + + " THEN\n" + + " -- SET @custom_error_message = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'If LT7K6 does not have value, SPPYD must be 0.5.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, GXLUB:1!null, LUEVY:2!null, M22QN:3!null, TJPT7:4!null, ARN5P:5!null, XOSD4:6!null, IDE43:7, HMW4H:8, ZBT6R:9, FSDY2:10!null, LT7K6:11, SPPYD:12, QCGTS:13, TEUJA:14, QQV4M:15, FHCYT:16]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + + " │ │ └─ tj5d2.id:25!null IS NULL\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id_overridden.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id_overridden.TW55N:85!null\n" + + " │ │ │ └─ tj5d2.H4DMT:29!null\n" + + " │ │ └─ TableAlias(nd_for_id_overridden)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + + " │ │ ├─ colSet: (159-175)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id.FGG57:85\n" + + " │ │ │ └─ umf.FGG57:2\n" + + " │ │ └─ TableAlias(nd_for_id)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ ├─ colSet: (176-192)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id fgg57]\n" + + " │ │ END as LUEVY, CASE WHEN Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:84!null]\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ static: [{[NULL, NULL]}]\n" + + " │ │ ├─ colSet: (194-196)\n" + + " │ │ ├─ tableId: 11\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:84!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:85\n" + + " │ │ │ └─ umf.SYPKF:8\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [umf.SYPKF:8]\n" + + " │ │ ├─ colSet: (197-199)\n" + + " │ │ ├─ tableId: 12\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.HMW4H:14\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.S76OM:15\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.FSDY2:12\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.vaf:16\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.ZROH6:17\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.QCGTS:18\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [umf.id:0!null, umf.T4IBQ:1, umf.FGG57:2, umf.SSHPJ:3, umf.NLA6O:4, umf.SFJ6L:5, umf.TJPT7:6, umf.ARN5P:7, umf.SYPKF:8, umf.IVFMK:9, umf.IDE43:10, umf.AZ6SP:11, umf.FSDY2:12, umf.XOSD4:13, umf.HMW4H:14, umf.S76OM:15, umf.vaf:16, umf.ZROH6:17, umf.QCGTS:18, umf.LNFM6:19, umf.TVAWL:20, umf.HDLCL:21, umf.BHHW6:22, umf.FHCYT:23, umf.QZ6VT:24, tj5d2.id:25!null, tj5d2.T4IBQ:26!null, tj5d2.V7UFH:27!null, tj5d2.SYPKF:28!null, tj5d2.H4DMT:29!null, tj5d2.SWCQV:30!null, tj5d2.YKSSU:31, tj5d2.FHCYT:32, cla.id:33!null, cla.FTQLQ:34!null, cla.TUXML:35, cla.PAEF5:36, cla.RUCY4:37, cla.TPNJ6:38!null, cla.LBL53:39, cla.NB3QS:40, cla.EO7IV:41, cla.MUHJF:42, cla.FM34L:43, cla.TY5RF:44, cla.ZHTLH:45, cla.NPB7W:46, cla.SX3HH:47, cla.ISBNF:48, cla.YA7YB:49, cla.C5YKB:50, cla.QK7KT:51, cla.FFGE6:52, cla.FIIGJ:53, cla.SH3NC:54, cla.NTENA:55, cla.M4AUB:56, cla.X5AIR:57, cla.SAB6M:58, cla.G5QI5:59, cla.ZVQVD:60, cla.YKSSU:61, cla.FHCYT:62, bs.id:63!null, bs.NFRYN:64!null, bs.IXUXU:65, bs.FHCYT:66, umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + + " │ │ └─ tj5d2.id:25!null IS NULL\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id_overridden.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id_overridden.TW55N:68!null\n" + + " │ │ │ └─ tj5d2.H4DMT:29!null\n" + + " │ │ └─ TableAlias(nd_for_id_overridden)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + + " │ │ ├─ colSet: (159-175)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [nd_for_id.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ nd_for_id.FGG57:68\n" + + " │ │ │ └─ umf.FGG57:2\n" + + " │ │ └─ TableAlias(nd_for_id)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ ├─ colSet: (176-192)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id fgg57]\n" + + " │ │ END as LUEVY, CASE WHEN Eq\n" + + " │ │ ├─ umf.SYPKF:8\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:67!null]\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ static: [{[NULL, NULL]}]\n" + + " │ │ ├─ colSet: (194-196)\n" + + " │ │ ├─ tableId: 11\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ ELSE Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:67!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:68\n" + + " │ │ │ └─ umf.SYPKF:8\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [umf.SYPKF:8]\n" + + " │ │ ├─ colSet: (197-199)\n" + + " │ │ ├─ tableId: 12\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.HMW4H:14\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.S76OM:15\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.FSDY2:12\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.vaf:16\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.ZROH6:17\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ umf.QCGTS:18\n" + + " │ │ └─ (longtext)\n" + + " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + + " │ └─ LookupJoin\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ LeftOuterJoin\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ ├─ tj5d2.SWCQV:30!null\n" + + " │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ tj5d2.T4IBQ:26!null\n" + + " │ │ │ │ │ │ └─ umf.T4IBQ:1\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tj5d2.V7UFH:27!null\n" + + " │ │ │ │ │ └─ umf.FGG57:2\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tj5d2.SYPKF:28!null\n" + + " │ │ │ │ └─ umf.SYPKF:8\n" + + " │ │ │ ├─ SubqueryAlias\n" + + " │ │ │ │ ├─ name: umf\n" + + " │ │ │ │ ├─ outerVisibility: false\n" + + " │ │ │ │ ├─ isLateral: false\n" + + " │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ ├─ colSet: (90-114)\n" + + " │ │ │ │ ├─ tableId: 5\n" + + " │ │ │ │ └─ Filter\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ InSubquery\n" + + " │ │ │ │ │ │ │ ├─ left: nzkpm.T4IBQ:1\n" + + " │ │ │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ │ │ │ ├─ alias-string: select FTQLQ from YK2GW\n" + + " │ │ │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ │ │ ├─ name: YK2GW\n" + + " │ │ │ │ │ │ │ ├─ columns: [ftqlq]\n" + + " │ │ │ │ │ │ │ ├─ colSet: (43-72)\n" + + " │ │ │ │ │ │ │ └─ tableId: 3\n" + + " │ │ │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ │ │ ├─ left: nzkpm.FGG57:2\n" + + " │ │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ │ ├─ cacheable: true\n" + + " │ │ │ │ │ │ ├─ alias-string: select FGG57 from E2I7U where FGG57 is not null\n" + + " │ │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ │ ├─ index: [E2I7U.FGG57]\n" + + " │ │ │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + + " │ │ │ │ │ │ ├─ colSet: (73-89)\n" + + " │ │ │ │ │ │ ├─ tableId: 4\n" + + " │ │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ │ └─ columns: [fgg57]\n" + + " │ │ │ │ │ └─ NOT\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ nzkpm.ARN5P:7\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ IndexedTableAccess(NZKPM)\n" + + " │ │ │ │ ├─ index: [NZKPM.id]\n" + + " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ │ ├─ colSet: (18-42)\n" + + " │ │ │ │ ├─ tableId: 2\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: NZKPM\n" + + " │ │ │ │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + + " │ │ │ └─ TableAlias(tj5d2)\n" + + " │ │ │ └─ ProcessTable\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SZW6V\n" + + " │ │ │ └─ columns: [id t4ibq v7ufh sypkf h4dmt swcqv ykssu fhcyt]\n" + + " │ │ └─ TableAlias(cla)\n" + + " │ │ └─ IndexedTableAccess(YK2GW)\n" + + " │ │ ├─ index: [YK2GW.FTQLQ]\n" + + " │ │ ├─ keys: [umf.T4IBQ:1]\n" + + " │ │ ├─ colSet: (123-152)\n" + + " │ │ ├─ tableId: 7\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YK2GW\n" + + " │ │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + + " │ └─ TableAlias(bs)\n" + + " │ └─ IndexedTableAccess(THNTS)\n" + + " │ ├─ index: [THNTS.IXUXU]\n" + + " │ ├─ keys: [cla.id:33!null]\n" + + " │ ├─ colSet: (153-156)\n" + + " │ ├─ tableId: 8\n" + + " │ └─ Table\n" + + " │ ├─ name: THNTS\n" + + " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ Or\n" + + " │ │ ├─ Or\n" + + " │ │ │ ├─ Or\n" + + " │ │ │ │ ├─ InSubquery\n" + + " │ │ │ │ │ ├─ left: new.TJPT7:4!null\n" + + " │ │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ │ │ ├─ colSet: (35,36)\n" + + " │ │ │ │ │ └─ tableId: 3\n" + + " │ │ │ │ └─ InSubquery\n" + + " │ │ │ │ ├─ left: new.ARN5P:5!null\n" + + " │ │ │ │ └─ right: Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ │ ├─ colSet: (37,38)\n" + + " │ │ │ │ └─ tableId: 4\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: new.XOSD4:6!null\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: TPXHZ\n" + + " │ │ │ ├─ columns: [svaz4]\n" + + " │ │ │ ├─ colSet: (39,40)\n" + + " │ │ │ └─ tableId: 5\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: new.IDE43:7\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:84!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:85\n" + - " │ │ │ └─ umf.SYPKF:8\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [umf.SYPKF:8]\n" + - " │ │ ├─ colSet: (197-199)\n" + - " │ │ ├─ tableId: 12\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.HMW4H:14\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.S76OM:15\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.FSDY2:12\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.vaf:16\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.ZROH6:17\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.QCGTS:18\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [umf.id:0!null, umf.T4IBQ:1, umf.FGG57:2, umf.SSHPJ:3, umf.NLA6O:4, umf.SFJ6L:5, umf.TJPT7:6, umf.ARN5P:7, umf.SYPKF:8, umf.IVFMK:9, umf.IDE43:10, umf.AZ6SP:11, umf.FSDY2:12, umf.XOSD4:13, umf.HMW4H:14, umf.S76OM:15, umf.vaf:16, umf.ZROH6:17, umf.QCGTS:18, umf.LNFM6:19, umf.TVAWL:20, umf.HDLCL:21, umf.BHHW6:22, umf.FHCYT:23, umf.QZ6VT:24, tj5d2.id:25!null, tj5d2.T4IBQ:26!null, tj5d2.V7UFH:27!null, tj5d2.SYPKF:28!null, tj5d2.H4DMT:29!null, tj5d2.SWCQV:30!null, tj5d2.YKSSU:31, tj5d2.FHCYT:32, cla.id:33!null, cla.FTQLQ:34!null, cla.TUXML:35, cla.PAEF5:36, cla.RUCY4:37, cla.TPNJ6:38!null, cla.LBL53:39, cla.NB3QS:40, cla.EO7IV:41, cla.MUHJF:42, cla.FM34L:43, cla.TY5RF:44, cla.ZHTLH:45, cla.NPB7W:46, cla.SX3HH:47, cla.ISBNF:48, cla.YA7YB:49, cla.C5YKB:50, cla.QK7KT:51, cla.FFGE6:52, cla.FIIGJ:53, cla.SH3NC:54, cla.NTENA:55, cla.M4AUB:56, cla.X5AIR:57, cla.SAB6M:58, cla.G5QI5:59, cla.ZVQVD:60, cla.YKSSU:61, cla.FHCYT:62, bs.id:63!null, bs.NFRYN:64!null, bs.IXUXU:65, bs.FHCYT:66, umf.id:0!null as id, bs.id:63!null as GXLUB, CASE WHEN NOT\n" + - " │ │ └─ tj5d2.id:25!null IS NULL\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id_overridden.id from E2I7U as nd_for_id_overridden where nd_for_id_overridden.TW55N = TJ5D2.H4DMT\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id_overridden.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id_overridden.TW55N:68!null\n" + - " │ │ │ └─ tj5d2.H4DMT:29!null\n" + - " │ │ └─ TableAlias(nd_for_id_overridden)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tj5d2.H4DMT:29!null]\n" + - " │ │ ├─ colSet: (159-175)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select nd_for_id.id from E2I7U as nd_for_id where nd_for_id.FGG57 is not null and nd_for_id.FGG57 = umf.FGG57\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [nd_for_id.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ nd_for_id.FGG57:68\n" + - " │ │ │ └─ umf.FGG57:2\n" + - " │ │ └─ TableAlias(nd_for_id)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ ├─ colSet: (176-192)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id fgg57]\n" + - " │ │ END as LUEVY, CASE WHEN Eq\n" + - " │ │ ├─ umf.SYPKF:8\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 is null\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:67!null]\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ static: [{[NULL, NULL]}]\n" + - " │ │ ├─ colSet: (194-196)\n" + - " │ │ ├─ tableId: 11\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ ELSE Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = umf.SYPKF\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:67!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:68\n" + - " │ │ │ └─ umf.SYPKF:8\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [umf.SYPKF:8]\n" + - " │ │ ├─ colSet: (197-199)\n" + - " │ │ ├─ tableId: 12\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ END as M22QN, umf.TJPT7:6 as TJPT7, umf.ARN5P:7 as ARN5P, umf.XOSD4:13 as XOSD4, umf.IDE43:10 as IDE43, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.HMW4H:14\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.HMW4H:14 ELSE NULL (null) END as HMW4H, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.S76OM:15\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN (umf.S76OM:15 + 0 (tinyint)) ELSE NULL (null) END as ZBT6R, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.FSDY2:12\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN umf.FSDY2:12 ELSE VUS (longtext) END as FSDY2, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.vaf:16\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.vaf:16 + 0 (decimal(2,1))) ELSE NULL (null) END as LT7K6, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.ZROH6:17\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.ZROH6:17 + 0 (decimal(2,1))) ELSE NULL (null) END as SPPYD, CASE WHEN NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ umf.QCGTS:18\n" + - " │ │ └─ (longtext)\n" + - " │ │ THEN (umf.QCGTS:18 + 0 (decimal(2,1))) ELSE NULL (null) END as QCGTS, umf.id:0!null as TEUJA, tj5d2.id:25!null as QQV4M, umf.FHCYT:23 as FHCYT]\n" + - " │ └─ LookupJoin\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ LeftOuterJoin\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ ├─ tj5d2.SWCQV:30!null\n" + - " │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ tj5d2.T4IBQ:26!null\n" + - " │ │ │ │ │ │ └─ umf.T4IBQ:1\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tj5d2.V7UFH:27!null\n" + - " │ │ │ │ │ └─ umf.FGG57:2\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tj5d2.SYPKF:28!null\n" + - " │ │ │ │ └─ umf.SYPKF:8\n" + - " │ │ │ ├─ SubqueryAlias\n" + - " │ │ │ │ ├─ name: umf\n" + - " │ │ │ │ ├─ outerVisibility: false\n" + - " │ │ │ │ ├─ isLateral: false\n" + - " │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ ├─ colSet: (90-114)\n" + - " │ │ │ │ ├─ tableId: 5\n" + - " │ │ │ │ └─ Filter\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ InSubquery\n" + - " │ │ │ │ │ │ │ ├─ left: nzkpm.T4IBQ:1\n" + - " │ │ │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ │ │ │ ├─ alias-string: select FTQLQ from YK2GW\n" + - " │ │ │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ │ │ ├─ name: YK2GW\n" + - " │ │ │ │ │ │ │ ├─ columns: [ftqlq]\n" + - " │ │ │ │ │ │ │ ├─ colSet: (43-72)\n" + - " │ │ │ │ │ │ │ └─ tableId: 3\n" + - " │ │ │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ │ │ ├─ left: nzkpm.FGG57:2\n" + - " │ │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ │ ├─ cacheable: true\n" + - " │ │ │ │ │ │ ├─ alias-string: select FGG57 from E2I7U where FGG57 is not null\n" + - " │ │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ │ ├─ index: [E2I7U.FGG57]\n" + - " │ │ │ │ │ │ ├─ static: [{(NULL, ∞)}]\n" + - " │ │ │ │ │ │ ├─ colSet: (73-89)\n" + - " │ │ │ │ │ │ ├─ tableId: 4\n" + - " │ │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ │ └─ columns: [fgg57]\n" + - " │ │ │ │ │ └─ NOT\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ nzkpm.ARN5P:7\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ IndexedTableAccess(NZKPM)\n" + - " │ │ │ │ ├─ index: [NZKPM.id]\n" + - " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ │ ├─ colSet: (18-42)\n" + - " │ │ │ │ ├─ tableId: 2\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: NZKPM\n" + - " │ │ │ │ └─ columns: [id t4ibq fgg57 sshpj nla6o sfj6l tjpt7 arn5p sypkf ivfmk ide43 az6sp fsdy2 xosd4 hmw4h s76om vaf zroh6 qcgts lnfm6 tvawl hdlcl bhhw6 fhcyt qz6vt]\n" + - " │ │ │ └─ TableAlias(tj5d2)\n" + - " │ │ │ └─ ProcessTable\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SZW6V\n" + - " │ │ │ └─ columns: [id t4ibq v7ufh sypkf h4dmt swcqv ykssu fhcyt]\n" + - " │ │ └─ TableAlias(cla)\n" + - " │ │ └─ IndexedTableAccess(YK2GW)\n" + - " │ │ ├─ index: [YK2GW.FTQLQ]\n" + - " │ │ ├─ keys: [umf.T4IBQ:1]\n" + - " │ │ ├─ colSet: (123-152)\n" + - " │ │ ├─ tableId: 7\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YK2GW\n" + - " │ │ └─ columns: [id ftqlq tuxml paef5 rucy4 tpnj6 lbl53 nb3qs eo7iv muhjf fm34l ty5rf zhtlh npb7w sx3hh isbnf ya7yb c5ykb qk7kt ffge6 fiigj sh3nc ntena m4aub x5air sab6m g5qi5 zvqvd ykssu fhcyt]\n" + - " │ └─ TableAlias(bs)\n" + - " │ └─ IndexedTableAccess(THNTS)\n" + - " │ ├─ index: [THNTS.IXUXU]\n" + - " │ ├─ keys: [cla.id:33!null]\n" + - " │ ├─ colSet: (153-156)\n" + - " │ ├─ tableId: 8\n" + - " │ └─ Table\n" + - " │ ├─ name: THNTS\n" + - " │ └─ columns: [id nfryn ixuxu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ Or\n" + - " │ │ ├─ Or\n" + - " │ │ │ ├─ Or\n" + - " │ │ │ │ ├─ InSubquery\n" + - " │ │ │ │ │ ├─ left: new.TJPT7:4!null\n" + - " │ │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ │ │ ├─ colSet: (35,36)\n" + - " │ │ │ │ │ └─ tableId: 3\n" + - " │ │ │ │ └─ InSubquery\n" + - " │ │ │ │ ├─ left: new.ARN5P:5!null\n" + - " │ │ │ │ └─ right: Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ │ ├─ colSet: (37,38)\n" + - " │ │ │ │ └─ tableId: 4\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: new.XOSD4:6!null\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: TPXHZ\n" + - " │ │ │ ├─ columns: [svaz4]\n" + - " │ │ │ ├─ colSet: (39,40)\n" + - " │ │ │ └─ tableId: 5\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: new.IDE43:7\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (41,42)\n" + - " │ │ └─ tableId: 6\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.HMW4H:8\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (43,44)\n" + - " │ └─ tableId: 7\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(NOT\n" + - " │ └─ IN\n" + - " │ ├─ left: new.FSDY2:10!null\n" + - " │ └─ right: TUPLE(benign (longtext), VUS (longtext), SRARY (longtext), UBQWG (longtext))\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = FSDY2 must be either 'benign', 'VUS', 'SRARY' or 'UBQWG'., MYSQL_ERRNO = 1644\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(AND\n" + - " │ ├─ NOT\n" + - " │ │ └─ new.LT7K6:11 IS NULL\n" + - " │ └─ NOT\n" + - " │ └─ new.SPPYD:12 IS NULL\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 has value, SPPYD must be NULL., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(AND\n" + - " ├─ new.LT7K6:11 IS NULL\n" + - " └─ Or\n" + - " ├─ new.SPPYD:12 IS NULL\n" + - " └─ NOT\n" + - " └─ Eq\n" + - " ├─ new.SPPYD:12\n" + - " └─ 0.5 (decimal(2,1))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 does not have value, SPPYD must be 0.5., MYSQL_ERRNO = 1644\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (41,42)\n" + + " │ │ └─ tableId: 6\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.HMW4H:8\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (43,44)\n" + + " │ └─ tableId: 7\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(NOT\n" + + " │ └─ IN\n" + + " │ ├─ left: new.FSDY2:10!null\n" + + " │ └─ right: TUPLE(benign (longtext), VUS (longtext), SRARY (longtext), UBQWG (longtext))\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = FSDY2 must be either 'benign', 'VUS', 'SRARY' or 'UBQWG'., MYSQL_ERRNO = 1644\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(AND\n" + + " │ ├─ NOT\n" + + " │ │ └─ new.LT7K6:11 IS NULL\n" + + " │ └─ NOT\n" + + " │ └─ new.SPPYD:12 IS NULL\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 has value, SPPYD must be NULL., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(AND\n" + + " ├─ new.LT7K6:11 IS NULL\n" + + " └─ Or\n" + + " ├─ new.SPPYD:12 IS NULL\n" + + " └─ NOT\n" + + " └─ Eq\n" + + " ├─ new.SPPYD:12\n" + + " └─ 0.5 (decimal(2,1))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = If LT7K6 does not have value, SPPYD must be 0.5., MYSQL_ERRNO = 1644\n" + "", }, { @@ -19829,52 +19808,51 @@ FROM ( umf.id IN ('1','2','3') ) C6PUD INNER JOIN D34QP vc ON C6PUD.AZ6SP LIKE CONCAT(CONCAT('%', vc.TWMSR), '%')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, Z7CP5, YH4XB)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SEQS3\n" + - " │ └─ columns: [id z7cp5 yh4xb]\n" + + ExpectedPlan: "Insert(id, Z7CP5, YH4XB)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SEQS3\n" + + " │ └─ columns: [id z7cp5 yh4xb]\n" + + " └─ Project\n" + + " ├─ columns: [id:0!null, Z7CP5:1!null, YH4XB:2!null]\n" + " └─ Project\n" + - " ├─ columns: [id:0!null, Z7CP5:1!null, YH4XB:2!null]\n" + - " └─ Project\n" + - " ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, c6pud.id:2!null as Z7CP5, vc.id:0!null as YH4XB]\n" + - " └─ InnerJoin\n" + - " ├─ c6pud.AZ6SP LIKE concat(concat('%',vc.TWMSR),'%')\n" + - " ├─ TableAlias(vc)\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: D34QP\n" + - " │ └─ columns: [id twmsr]\n" + - " └─ SubqueryAlias\n" + - " ├─ name: c6pud\n" + - " ├─ outerVisibility: false\n" + - " ├─ isLateral: false\n" + - " ├─ cacheable: true\n" + - " ├─ colSet: (48,49)\n" + - " ├─ tableId: 4\n" + - " └─ Project\n" + - " ├─ columns: [mf.id:2!null as id, umf.AZ6SP:1 as AZ6SP]\n" + - " └─ InnerJoin\n" + - " ├─ Eq\n" + - " │ ├─ umf.id:0!null\n" + - " │ └─ mf.TEUJA:3\n" + - " ├─ TableAlias(umf)\n" + - " │ └─ IndexedTableAccess(NZKPM)\n" + - " │ ├─ index: [NZKPM.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (21-45)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: NZKPM\n" + - " │ └─ columns: [id az6sp]\n" + - " └─ TableAlias(mf)\n" + - " └─ Table\n" + - " ├─ name: HGMQ6\n" + - " ├─ columns: [id teuja]\n" + - " ├─ colSet: (4-20)\n" + - " └─ tableId: 2\n" + + " ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, c6pud.id:2!null as Z7CP5, vc.id:0!null as YH4XB]\n" + + " └─ InnerJoin\n" + + " ├─ c6pud.AZ6SP LIKE concat(concat('%',vc.TWMSR),'%')\n" + + " ├─ TableAlias(vc)\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: D34QP\n" + + " │ └─ columns: [id twmsr]\n" + + " └─ SubqueryAlias\n" + + " ├─ name: c6pud\n" + + " ├─ outerVisibility: false\n" + + " ├─ isLateral: false\n" + + " ├─ cacheable: true\n" + + " ├─ colSet: (48,49)\n" + + " ├─ tableId: 4\n" + + " └─ Project\n" + + " ├─ columns: [mf.id:2!null as id, umf.AZ6SP:1 as AZ6SP]\n" + + " └─ InnerJoin\n" + + " ├─ Eq\n" + + " │ ├─ umf.id:0!null\n" + + " │ └─ mf.TEUJA:3\n" + + " ├─ TableAlias(umf)\n" + + " │ └─ IndexedTableAccess(NZKPM)\n" + + " │ ├─ index: [NZKPM.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (21-45)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: NZKPM\n" + + " │ └─ columns: [id az6sp]\n" + + " └─ TableAlias(mf)\n" + + " └─ Table\n" + + " ├─ name: HGMQ6\n" + + " ├─ columns: [id teuja]\n" + + " ├─ colSet: (4-20)\n" + + " └─ tableId: 2\n" + "", }, { @@ -19984,166 +19962,185 @@ FROM AND NHMXW.id IS NOT NULL -- Only overrides here ) BPNW2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, FV24E, UJ6XY, M22QN, NZ4MQ, ETPQV, PRUV2, YKSSU, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: HDDVB\n" + - " │ └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + - " └─ Project\n" + - " ├─ columns: [id:0!null, FV24E:1!null, UJ6XY:2!null, M22QN:3!null, NZ4MQ:4!null, ETPQV:5, PRUV2:6, YKSSU:7, FHCYT:8]\n" + - " └─ Union distinct\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, convert\n" + - " │ │ ├─ type: char\n" + - " │ │ └─ FV24E:1!null\n" + - " │ │ as FV24E, convert\n" + - " │ │ ├─ type: char\n" + - " │ │ └─ UJ6XY:2!null\n" + - " │ │ as UJ6XY, M22QN:3!null, NZ4MQ:4, ETPQV:5!null, convert\n" + - " │ │ ├─ type: char\n" + - " │ │ └─ PRUV2:6\n" + - " │ │ as PRUV2, YKSSU:7, FHCYT:8]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1!null as FV24E, bpnw2.UJ6XY:2!null as UJ6XY, bpnw2.M22QN:3!null as M22QN, bpnw2.NZ4MQ:4 as NZ4MQ, bpnw2.MU3KG:0!null as ETPQV, NULL (null) as PRUV2, bpnw2.YKSSU:6 as YKSSU, bpnw2.FHCYT:5 as FHCYT]\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: bpnw2\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (99-105)\n" + - " │ ├─ tableId: 9\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tizhk.id:0!null as MU3KG, j4jyp.id:20!null as FV24E, rhuzn.id:37!null as UJ6XY, aac.id:71!null as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [g3yxs.id:81!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ concat(g3yxs.ESFVY:82!null,(MI: (longtext),g3yxs.SL76B:83!null,) (longtext))\n" + - " │ │ │ └─ tizhk.IDUT2:4\n" + - " │ │ └─ TableAlias(g3yxs)\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YYBCX\n" + - " │ │ ├─ columns: [id esfvy sl76b]\n" + - " │ │ ├─ colSet: (88-95)\n" + - " │ │ └─ tableId: 8\n" + - " │ │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tizhk.id:0!null, tizhk.TVNW2:1, tizhk.ZHITY:2, tizhk.SYPKF:3, tizhk.IDUT2:4, tizhk.O6QJ3:5, tizhk.NO2JA:6, tizhk.YKSSU:7, tizhk.FHCYT:8, tizhk.QZ6VT:9, nhmxw.id:10!null, nhmxw.NOHHR:11!null, nhmxw.AVPYF:12!null, nhmxw.SYPKF:13!null, nhmxw.IDUT2:14!null, nhmxw.FZXV5:15, nhmxw.DQYGV:16, nhmxw.SWCQV:17!null, nhmxw.YKSSU:18, nhmxw.FHCYT:19, j4jyp.id:20!null, j4jyp.DKCAJ:21!null, j4jyp.KNG7T:22, j4jyp.TW55N:23!null, j4jyp.QRQXW:24!null, j4jyp.ECXAJ:25!null, j4jyp.FGG57:26, j4jyp.ZH72S:27, j4jyp.FSK67:28!null, j4jyp.XQDYT:29!null, j4jyp.TCE7A:30, j4jyp.IWV2H:31, j4jyp.HPCMS:32!null, j4jyp.N5CC2:33, j4jyp.FHCYT:34, j4jyp.ETAQ7:35, j4jyp.A75X7:36, rhuzn.id:57!null, rhuzn.DKCAJ:58!null, rhuzn.KNG7T:59, rhuzn.TW55N:60!null, rhuzn.QRQXW:61!null, rhuzn.ECXAJ:62!null, rhuzn.FGG57:63, rhuzn.ZH72S:64, rhuzn.FSK67:65!null, rhuzn.XQDYT:66!null, rhuzn.TCE7A:67, rhuzn.IWV2H:68, rhuzn.HPCMS:69!null, rhuzn.N5CC2:70, rhuzn.FHCYT:71, rhuzn.ETAQ7:72, rhuzn.A75X7:73, mf.id:37!null, mf.GXLUB:38!null, mf.LUEVY:39!null, mf.M22QN:40!null, mf.TJPT7:41!null, mf.ARN5P:42!null, mf.XOSD4:43!null, mf.IDE43:44, mf.HMW4H:45, mf.ZBT6R:46, mf.FSDY2:47!null, mf.LT7K6:48, mf.SPPYD:49, mf.QCGTS:50, mf.TEUJA:51, mf.QQV4M:52, mf.FHCYT:53, aac.id:54!null, aac.BTXC5:55, aac.FHCYT:56, tizhk.id:0!null as MU3KG, j4jyp.id:20!null as FV24E, rhuzn.id:57!null as UJ6XY, aac.id:54!null as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [g3yxs.id:74!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ concat(g3yxs.ESFVY:75!null,(MI: (longtext),g3yxs.SL76B:76!null,) (longtext))\n" + - " │ │ │ └─ tizhk.IDUT2:4\n" + - " │ │ └─ TableAlias(g3yxs)\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: YYBCX\n" + - " │ │ ├─ columns: [id esfvy sl76b]\n" + - " │ │ ├─ colSet: (88-95)\n" + - " │ │ └─ tableId: 8\n" + - " │ │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU]\n" + - " │ └─ Filter\n" + - " │ ├─ AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:55\n" + - " │ │ │ └─ tizhk.SYPKF:3\n" + - " │ │ └─ nhmxw.id:10!null IS NULL\n" + - " │ └─ LookupJoin\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ LookupJoin\n" + - " │ │ │ ├─ LookupJoin\n" + - " │ │ │ │ ├─ LeftOuterJoin\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ │ │ │ ├─ nhmxw.SWCQV:17!null\n" + - " │ │ │ │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ │ │ │ ├─ nhmxw.NOHHR:11!null\n" + - " │ │ │ │ │ │ │ │ │ └─ tizhk.TVNW2:1\n" + - " │ │ │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ │ │ ├─ nhmxw.AVPYF:12!null\n" + - " │ │ │ │ │ │ │ │ └─ tizhk.ZHITY:2\n" + - " │ │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ │ ├─ nhmxw.SYPKF:13!null\n" + - " │ │ │ │ │ │ │ └─ tizhk.SYPKF:3\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ nhmxw.IDUT2:14!null\n" + - " │ │ │ │ │ │ └─ tizhk.IDUT2:4\n" + - " │ │ │ │ │ ├─ TableAlias(tizhk)\n" + - " │ │ │ │ │ │ └─ IndexedTableAccess(WRZVO)\n" + - " │ │ │ │ │ │ ├─ index: [WRZVO.id]\n" + - " │ │ │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ │ │ │ ├─ colSet: (10-19)\n" + - " │ │ │ │ │ │ ├─ tableId: 2\n" + - " │ │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ │ ├─ name: WRZVO\n" + - " │ │ │ │ │ │ └─ columns: [id tvnw2 zhity sypkf idut2 o6qj3 no2ja ykssu fhcyt qz6vt]\n" + - " │ │ │ │ │ └─ TableAlias(nhmxw)\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: WGSDC\n" + - " │ │ │ │ │ ├─ columns: [id nohhr avpyf sypkf idut2 fzxv5 dqygv swcqv ykssu fhcyt]\n" + - " │ │ │ │ │ ├─ colSet: (20-29)\n" + - " │ │ │ │ │ └─ tableId: 3\n" + - " │ │ │ │ └─ TableAlias(j4jyp)\n" + - " │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ │ │ ├─ keys: [tizhk.TVNW2:1]\n" + - " │ │ │ │ ├─ colSet: (30-46)\n" + - " │ │ │ │ ├─ tableId: 4\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ │ │ └─ TableAlias(mf)\n" + - " │ │ │ └─ IndexedTableAccess(HGMQ6)\n" + - " │ │ │ ├─ index: [HGMQ6.LUEVY]\n" + - " │ │ │ ├─ keys: [j4jyp.id:20!null]\n" + - " │ │ │ ├─ colSet: (64-80)\n" + - " │ │ │ ├─ tableId: 6\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: HGMQ6\n" + - " │ │ │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.id]\n" + - " │ │ ├─ keys: [mf.M22QN:40!null]\n" + - " │ │ ├─ colSet: (81-83)\n" + - " │ │ ├─ tableId: 7\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5 fhcyt]\n" + - " │ └─ TableAlias(rhuzn)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.ZH72S]\n" + - " │ ├─ keys: [tizhk.ZHITY:2]\n" + - " │ ├─ colSet: (47-63)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + ExpectedPlan: "Insert(id, FV24E, UJ6XY, M22QN, NZ4MQ, ETPQV, PRUV2, YKSSU, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: HDDVB\n" + + " │ └─ columns: [id fv24e uj6xy m22qn nz4mq etpqv pruv2 ykssu fhcyt]\n" + + " └─ Project\n" + + " ├─ columns: [id:0!null, FV24E:1!null, UJ6XY:2!null, M22QN:3!null, NZ4MQ:4!null, ETPQV:5, PRUV2:6, YKSSU:7, FHCYT:8]\n" + + " └─ Union distinct\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, convert\n" + + " │ │ ├─ type: char\n" + + " │ │ └─ FV24E:1!null\n" + + " │ │ as FV24E, convert\n" + + " │ │ ├─ type: char\n" + + " │ │ └─ UJ6XY:2!null\n" + + " │ │ as UJ6XY, M22QN:3!null, NZ4MQ:4, ETPQV:5!null, convert\n" + + " │ │ ├─ type: char\n" + + " │ │ └─ PRUV2:6\n" + + " │ │ as PRUV2, YKSSU:7, FHCYT:8]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1!null as FV24E, bpnw2.UJ6XY:2!null as UJ6XY, bpnw2.M22QN:3!null as M22QN, bpnw2.NZ4MQ:4 as NZ4MQ, bpnw2.MU3KG:0!null as ETPQV, NULL (null) as PRUV2, bpnw2.YKSSU:6 as YKSSU, bpnw2.FHCYT:5 as FHCYT]\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: bpnw2\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (99-105)\n" + + " │ ├─ tableId: 9\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tizhk.id:0!null as MU3KG, j4jyp.id:20!null as FV24E, rhuzn.id:37!null as UJ6XY, aac.id:71!null as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [g3yxs.id:81!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ concat(g3yxs.ESFVY:82!null,(MI: (longtext),g3yxs.SL76B:83!null,) (longtext))\n" + + " │ │ │ └─ tizhk.IDUT2:4\n" + + " │ │ └─ TableAlias(g3yxs)\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YYBCX\n" + + " │ │ ├─ columns: [id esfvy sl76b]\n" + + " │ │ ├─ colSet: (88-95)\n" + + " │ │ └─ tableId: 8\n" + + " │ │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tizhk.id:0!null, tizhk.TVNW2:1, tizhk.ZHITY:2, tizhk.SYPKF:3, tizhk.IDUT2:4, tizhk.O6QJ3:5, tizhk.NO2JA:6, tizhk.YKSSU:7, tizhk.FHCYT:8, tizhk.QZ6VT:9, nhmxw.id:10!null, nhmxw.NOHHR:11!null, nhmxw.AVPYF:12!null, nhmxw.SYPKF:13!null, nhmxw.IDUT2:14!null, nhmxw.FZXV5:15, nhmxw.DQYGV:16, nhmxw.SWCQV:17!null, nhmxw.YKSSU:18, nhmxw.FHCYT:19, j4jyp.id:20!null, j4jyp.DKCAJ:21!null, j4jyp.KNG7T:22, j4jyp.TW55N:23!null, j4jyp.QRQXW:24!null, j4jyp.ECXAJ:25!null, j4jyp.FGG57:26, j4jyp.ZH72S:27, j4jyp.FSK67:28!null, j4jyp.XQDYT:29!null, j4jyp.TCE7A:30, j4jyp.IWV2H:31, j4jyp.HPCMS:32!null, j4jyp.N5CC2:33, j4jyp.FHCYT:34, j4jyp.ETAQ7:35, j4jyp.A75X7:36, rhuzn.id:57!null, rhuzn.DKCAJ:58!null, rhuzn.KNG7T:59, rhuzn.TW55N:60!null, rhuzn.QRQXW:61!null, rhuzn.ECXAJ:62!null, rhuzn.FGG57:63, rhuzn.ZH72S:64, rhuzn.FSK67:65!null, rhuzn.XQDYT:66!null, rhuzn.TCE7A:67, rhuzn.IWV2H:68, rhuzn.HPCMS:69!null, rhuzn.N5CC2:70, rhuzn.FHCYT:71, rhuzn.ETAQ7:72, rhuzn.A75X7:73, mf.id:37!null, mf.GXLUB:38!null, mf.LUEVY:39!null, mf.M22QN:40!null, mf.TJPT7:41!null, mf.ARN5P:42!null, mf.XOSD4:43!null, mf.IDE43:44, mf.HMW4H:45, mf.ZBT6R:46, mf.FSDY2:47!null, mf.LT7K6:48, mf.SPPYD:49, mf.QCGTS:50, mf.TEUJA:51, mf.QQV4M:52, mf.FHCYT:53, aac.id:54!null, aac.BTXC5:55, aac.FHCYT:56, tizhk.id:0!null as MU3KG, j4jyp.id:20!null as FV24E, rhuzn.id:57!null as UJ6XY, aac.id:54!null as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [g3yxs.id:74!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ concat(g3yxs.ESFVY:75!null,(MI: (longtext),g3yxs.SL76B:76!null,) (longtext))\n" + + " │ │ │ └─ tizhk.IDUT2:4\n" + + " │ │ └─ TableAlias(g3yxs)\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: YYBCX\n" + + " │ │ ├─ columns: [id esfvy sl76b]\n" + + " │ │ ├─ colSet: (88-95)\n" + + " │ │ └─ tableId: 8\n" + + " │ │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU]\n" + + " │ └─ Filter\n" + + " │ ├─ AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:55\n" + + " │ │ │ └─ tizhk.SYPKF:3\n" + + " │ │ └─ nhmxw.id:10!null IS NULL\n" + + " │ └─ LookupJoin\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ LookupJoin\n" + + " │ │ │ ├─ LookupJoin\n" + + " │ │ │ │ ├─ LeftOuterJoin\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ │ │ │ ├─ nhmxw.SWCQV:17!null\n" + + " │ │ │ │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ │ │ │ ├─ nhmxw.NOHHR:11!null\n" + + " │ │ │ │ │ │ │ │ │ └─ tizhk.TVNW2:1\n" + + " │ │ │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ │ │ ├─ nhmxw.AVPYF:12!null\n" + + " │ │ │ │ │ │ │ │ └─ tizhk.ZHITY:2\n" + + " │ │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ │ ├─ nhmxw.SYPKF:13!null\n" + + " │ │ │ │ │ │ │ └─ tizhk.SYPKF:3\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ nhmxw.IDUT2:14!null\n" + + " │ │ │ │ │ │ └─ tizhk.IDUT2:4\n" + + " │ │ │ │ │ ├─ TableAlias(tizhk)\n" + + " │ │ │ │ │ │ └─ IndexedTableAccess(WRZVO)\n" + + " │ │ │ │ │ │ ├─ index: [WRZVO.id]\n" + + " │ │ │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ │ │ │ ├─ colSet: (10-19)\n" + + " │ │ │ │ │ │ ├─ tableId: 2\n" + + " │ │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ │ ├─ name: WRZVO\n" + + " │ │ │ │ │ │ └─ columns: [id tvnw2 zhity sypkf idut2 o6qj3 no2ja ykssu fhcyt qz6vt]\n" + + " │ │ │ │ │ └─ TableAlias(nhmxw)\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: WGSDC\n" + + " │ │ │ │ │ ├─ columns: [id nohhr avpyf sypkf idut2 fzxv5 dqygv swcqv ykssu fhcyt]\n" + + " │ │ │ │ │ ├─ colSet: (20-29)\n" + + " │ │ │ │ │ └─ tableId: 3\n" + + " │ │ │ │ └─ TableAlias(j4jyp)\n" + + " │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ │ │ ├─ keys: [tizhk.TVNW2:1]\n" + + " │ │ │ │ ├─ colSet: (30-46)\n" + + " │ │ │ │ ├─ tableId: 4\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ │ │ └─ TableAlias(mf)\n" + + " │ │ │ └─ IndexedTableAccess(HGMQ6)\n" + + " │ │ │ ├─ index: [HGMQ6.LUEVY]\n" + + " │ │ │ ├─ keys: [j4jyp.id:20!null]\n" + + " │ │ │ ├─ colSet: (64-80)\n" + + " │ │ │ ├─ tableId: 6\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: HGMQ6\n" + + " │ │ │ └─ columns: [id gxlub luevy m22qn tjpt7 arn5p xosd4 ide43 hmw4h zbt6r fsdy2 lt7k6 sppyd qcgts teuja qqv4m fhcyt]\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.id]\n" + + " │ │ ├─ keys: [mf.M22QN:40!null]\n" + + " │ │ ├─ colSet: (81-83)\n" + + " │ │ ├─ tableId: 7\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5 fhcyt]\n" + + " │ └─ TableAlias(rhuzn)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.ZH72S]\n" + + " │ ├─ keys: [tizhk.ZHITY:2]\n" + + " │ ├─ colSet: (47-63)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " └─ Project\n" + + " ├─ columns: [id:0!null, FV24E:1 as FV24E, UJ6XY:2 as UJ6XY, M22QN:3, NZ4MQ:4, ETPQV:5!null, convert\n" + + " │ ├─ type: char\n" + + " │ └─ PRUV2:6!null\n" + + " │ as PRUV2, YKSSU:7, FHCYT:8]\n" + " └─ Project\n" + - " ├─ columns: [id:0!null, FV24E:1 as FV24E, UJ6XY:2 as UJ6XY, M22QN:3, NZ4MQ:4, ETPQV:5!null, convert\n" + - " │ ├─ type: char\n" + - " │ └─ PRUV2:6!null\n" + - " │ as PRUV2, YKSSU:7, FHCYT:8]\n" + + " ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1 as FV24E, bpnw2.UJ6XY:2 as UJ6XY, Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = BPNW2.SYPKF\n" + + " │ └─ Project\n" + + " │ ├─ columns: [aac.id:17!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ aac.BTXC5:18\n" + + " │ │ └─ bpnw2.SYPKF:3\n" + + " │ └─ TableAlias(aac)\n" + + " │ └─ IndexedTableAccess(TPXBU)\n" + + " │ ├─ index: [TPXBU.BTXC5]\n" + + " │ ├─ keys: [bpnw2.SYPKF:3]\n" + + " │ ├─ colSet: (230-232)\n" + + " │ ├─ tableId: 18\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXBU\n" + + " │ └─ columns: [id btxc5]\n" + + " │ as M22QN, bpnw2.NZ4MQ:4 as NZ4MQ, bpnw2.MU3KG:0!null as ETPQV, bpnw2.I4NDZ:7!null as PRUV2, bpnw2.YKSSU:6 as YKSSU, bpnw2.FHCYT:5 as FHCYT]\n" + " └─ Project\n" + - " ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1 as FV24E, bpnw2.UJ6XY:2 as UJ6XY, Subquery\n" + + " ├─ columns: [bpnw2.MU3KG:0!null, bpnw2.FV24E:1, bpnw2.UJ6XY:2, bpnw2.SYPKF:3, bpnw2.NZ4MQ:4, bpnw2.FHCYT:5, bpnw2.YKSSU:6, bpnw2.I4NDZ:7!null, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1 as FV24E, bpnw2.UJ6XY:2 as UJ6XY, Subquery\n" + " │ ├─ cacheable: false\n" + " │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = BPNW2.SYPKF\n" + " │ └─ Project\n" + - " │ ├─ columns: [aac.id:17!null]\n" + + " │ ├─ columns: [aac.id:8!null]\n" + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ aac.BTXC5:18\n" + + " │ │ ├─ aac.BTXC5:9\n" + " │ │ └─ bpnw2.SYPKF:3\n" + " │ └─ TableAlias(aac)\n" + " │ └─ IndexedTableAccess(TPXBU)\n" + @@ -20155,45 +20152,82 @@ FROM " │ ├─ name: TPXBU\n" + " │ └─ columns: [id btxc5]\n" + " │ as M22QN, bpnw2.NZ4MQ:4 as NZ4MQ, bpnw2.MU3KG:0!null as ETPQV, bpnw2.I4NDZ:7!null as PRUV2, bpnw2.YKSSU:6 as YKSSU, bpnw2.FHCYT:5 as FHCYT]\n" + - " └─ Project\n" + - " ├─ columns: [bpnw2.MU3KG:0!null, bpnw2.FV24E:1, bpnw2.UJ6XY:2, bpnw2.SYPKF:3, bpnw2.NZ4MQ:4, bpnw2.FHCYT:5, bpnw2.YKSSU:6, bpnw2.I4NDZ:7!null, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, bpnw2.FV24E:1 as FV24E, bpnw2.UJ6XY:2 as UJ6XY, Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = BPNW2.SYPKF\n" + - " │ └─ Project\n" + - " │ ├─ columns: [aac.id:8!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ aac.BTXC5:9\n" + - " │ │ └─ bpnw2.SYPKF:3\n" + - " │ └─ TableAlias(aac)\n" + - " │ └─ IndexedTableAccess(TPXBU)\n" + - " │ ├─ index: [TPXBU.BTXC5]\n" + - " │ ├─ keys: [bpnw2.SYPKF:3]\n" + - " │ ├─ colSet: (230-232)\n" + - " │ ├─ tableId: 18\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXBU\n" + - " │ └─ columns: [id btxc5]\n" + - " │ as M22QN, bpnw2.NZ4MQ:4 as NZ4MQ, bpnw2.MU3KG:0!null as ETPQV, bpnw2.I4NDZ:7!null as PRUV2, bpnw2.YKSSU:6 as YKSSU, bpnw2.FHCYT:5 as FHCYT]\n" + - " └─ SubqueryAlias\n" + - " ├─ name: bpnw2\n" + - " ├─ outerVisibility: false\n" + - " ├─ isLateral: false\n" + - " ├─ cacheable: true\n" + - " ├─ colSet: (219-226)\n" + - " ├─ tableId: 17\n" + - " └─ Distinct\n" + + " └─ SubqueryAlias\n" + + " ├─ name: bpnw2\n" + + " ├─ outerVisibility: false\n" + + " ├─ isLateral: false\n" + + " ├─ cacheable: true\n" + + " ├─ colSet: (219-226)\n" + + " ├─ tableId: 17\n" + + " └─ Distinct\n" + + " └─ Project\n" + + " ├─ columns: [tizhk.id:0!null as MU3KG, CASE WHEN NOT\n" + + " │ └─ nhmxw.FZXV5:15 IS NULL\n" + + " │ THEN Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select overridden_nd_mutant.id from E2I7U as overridden_nd_mutant where overridden_nd_mutant.TW55N = NHMXW.FZXV5\n" + + " │ └─ Project\n" + + " │ ├─ columns: [overridden_nd_mutant.id:62!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ overridden_nd_mutant.TW55N:63!null\n" + + " │ │ └─ nhmxw.FZXV5:15\n" + + " │ └─ TableAlias(overridden_nd_mutant)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.TW55N]\n" + + " │ ├─ keys: [nhmxw.FZXV5:15]\n" + + " │ ├─ colSet: (170-186)\n" + + " │ ├─ tableId: 14\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id tw55n]\n" + + " │ ELSE j4jyp.id:20!null END as FV24E, CASE WHEN NOT\n" + + " │ └─ nhmxw.DQYGV:16 IS NULL\n" + + " │ THEN Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select overridden_QI2IEner.id from E2I7U as overridden_QI2IEner where overridden_QI2IEner.TW55N = NHMXW.DQYGV\n" + + " │ └─ Project\n" + + " │ ├─ columns: [overridden_qi2iener.id:62!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ overridden_qi2iener.TW55N:63!null\n" + + " │ │ └─ nhmxw.DQYGV:16\n" + + " │ └─ TableAlias(overridden_qi2iener)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.TW55N]\n" + + " │ ├─ keys: [nhmxw.DQYGV:16]\n" + + " │ ├─ colSet: (188-204)\n" + + " │ ├─ tableId: 15\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id tw55n]\n" + + " │ ELSE rhuzn.id:37!null END as UJ6XY, tizhk.SYPKF:3 as SYPKF, Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + + " │ └─ Project\n" + + " │ ├─ columns: [g3yxs.id:62!null]\n" + + " │ └─ Filter\n" + + " │ ├─ Eq\n" + + " │ │ ├─ concat(g3yxs.ESFVY:63!null,(MI: (longtext),g3yxs.SL76B:64!null,) (longtext))\n" + + " │ │ └─ tizhk.IDUT2:4\n" + + " │ └─ TableAlias(g3yxs)\n" + + " │ └─ Table\n" + + " │ ├─ name: YYBCX\n" + + " │ ├─ columns: [id esfvy sl76b]\n" + + " │ ├─ colSet: (207-214)\n" + + " │ └─ tableId: 16\n" + + " │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU, nhmxw.id:10!null as I4NDZ]\n" + " └─ Project\n" + - " ├─ columns: [tizhk.id:0!null as MU3KG, CASE WHEN NOT\n" + + " ├─ columns: [tizhk.id:0!null, tizhk.TVNW2:1, tizhk.ZHITY:2, tizhk.SYPKF:3, tizhk.IDUT2:4, tizhk.O6QJ3:5, tizhk.NO2JA:6, tizhk.YKSSU:7, tizhk.FHCYT:8, tizhk.QZ6VT:9, nhmxw.id:10!null, nhmxw.NOHHR:11!null, nhmxw.AVPYF:12!null, nhmxw.SYPKF:13!null, nhmxw.IDUT2:14!null, nhmxw.FZXV5:15, nhmxw.DQYGV:16, nhmxw.SWCQV:17!null, nhmxw.YKSSU:18, nhmxw.FHCYT:19, j4jyp.id:20!null, j4jyp.DKCAJ:21!null, j4jyp.KNG7T:22, j4jyp.TW55N:23!null, j4jyp.QRQXW:24!null, j4jyp.ECXAJ:25!null, j4jyp.FGG57:26, j4jyp.ZH72S:27, j4jyp.FSK67:28!null, j4jyp.XQDYT:29!null, j4jyp.TCE7A:30, j4jyp.IWV2H:31, j4jyp.HPCMS:32!null, j4jyp.N5CC2:33, j4jyp.FHCYT:34, j4jyp.ETAQ7:35, j4jyp.A75X7:36, rhuzn.id:37!null, rhuzn.DKCAJ:38!null, rhuzn.KNG7T:39, rhuzn.TW55N:40!null, rhuzn.QRQXW:41!null, rhuzn.ECXAJ:42!null, rhuzn.FGG57:43, rhuzn.ZH72S:44, rhuzn.FSK67:45!null, rhuzn.XQDYT:46!null, rhuzn.TCE7A:47, rhuzn.IWV2H:48, rhuzn.HPCMS:49!null, rhuzn.N5CC2:50, rhuzn.FHCYT:51, rhuzn.ETAQ7:52, rhuzn.A75X7:53, tizhk.id:0!null as MU3KG, CASE WHEN NOT\n" + " │ └─ nhmxw.FZXV5:15 IS NULL\n" + " │ THEN Subquery\n" + " │ ├─ cacheable: false\n" + " │ ├─ alias-string: select overridden_nd_mutant.id from E2I7U as overridden_nd_mutant where overridden_nd_mutant.TW55N = NHMXW.FZXV5\n" + " │ └─ Project\n" + - " │ ├─ columns: [overridden_nd_mutant.id:62!null]\n" + + " │ ├─ columns: [overridden_nd_mutant.id:54!null]\n" + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ overridden_nd_mutant.TW55N:63!null\n" + + " │ │ ├─ overridden_nd_mutant.TW55N:55!null\n" + " │ │ └─ nhmxw.FZXV5:15\n" + " │ └─ TableAlias(overridden_nd_mutant)\n" + " │ └─ IndexedTableAccess(E2I7U)\n" + @@ -20210,10 +20244,10 @@ FROM " │ ├─ cacheable: false\n" + " │ ├─ alias-string: select overridden_QI2IEner.id from E2I7U as overridden_QI2IEner where overridden_QI2IEner.TW55N = NHMXW.DQYGV\n" + " │ └─ Project\n" + - " │ ├─ columns: [overridden_qi2iener.id:62!null]\n" + + " │ ├─ columns: [overridden_qi2iener.id:54!null]\n" + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ overridden_qi2iener.TW55N:63!null\n" + + " │ │ ├─ overridden_qi2iener.TW55N:55!null\n" + " │ │ └─ nhmxw.DQYGV:16\n" + " │ └─ TableAlias(overridden_qi2iener)\n" + " │ └─ IndexedTableAccess(E2I7U)\n" + @@ -20228,10 +20262,10 @@ FROM " │ ├─ cacheable: false\n" + " │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + " │ └─ Project\n" + - " │ ├─ columns: [g3yxs.id:62!null]\n" + + " │ ├─ columns: [g3yxs.id:54!null]\n" + " │ └─ Filter\n" + " │ ├─ Eq\n" + - " │ │ ├─ concat(g3yxs.ESFVY:63!null,(MI: (longtext),g3yxs.SL76B:64!null,) (longtext))\n" + + " │ │ ├─ concat(g3yxs.ESFVY:55!null,(MI: (longtext),g3yxs.SL76B:56!null,) (longtext))\n" + " │ │ └─ tizhk.IDUT2:4\n" + " │ └─ TableAlias(g3yxs)\n" + " │ └─ Table\n" + @@ -20240,121 +20274,64 @@ FROM " │ ├─ colSet: (207-214)\n" + " │ └─ tableId: 16\n" + " │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU, nhmxw.id:10!null as I4NDZ]\n" + - " └─ Project\n" + - " ├─ columns: [tizhk.id:0!null, tizhk.TVNW2:1, tizhk.ZHITY:2, tizhk.SYPKF:3, tizhk.IDUT2:4, tizhk.O6QJ3:5, tizhk.NO2JA:6, tizhk.YKSSU:7, tizhk.FHCYT:8, tizhk.QZ6VT:9, nhmxw.id:10!null, nhmxw.NOHHR:11!null, nhmxw.AVPYF:12!null, nhmxw.SYPKF:13!null, nhmxw.IDUT2:14!null, nhmxw.FZXV5:15, nhmxw.DQYGV:16, nhmxw.SWCQV:17!null, nhmxw.YKSSU:18, nhmxw.FHCYT:19, j4jyp.id:20!null, j4jyp.DKCAJ:21!null, j4jyp.KNG7T:22, j4jyp.TW55N:23!null, j4jyp.QRQXW:24!null, j4jyp.ECXAJ:25!null, j4jyp.FGG57:26, j4jyp.ZH72S:27, j4jyp.FSK67:28!null, j4jyp.XQDYT:29!null, j4jyp.TCE7A:30, j4jyp.IWV2H:31, j4jyp.HPCMS:32!null, j4jyp.N5CC2:33, j4jyp.FHCYT:34, j4jyp.ETAQ7:35, j4jyp.A75X7:36, rhuzn.id:37!null, rhuzn.DKCAJ:38!null, rhuzn.KNG7T:39, rhuzn.TW55N:40!null, rhuzn.QRQXW:41!null, rhuzn.ECXAJ:42!null, rhuzn.FGG57:43, rhuzn.ZH72S:44, rhuzn.FSK67:45!null, rhuzn.XQDYT:46!null, rhuzn.TCE7A:47, rhuzn.IWV2H:48, rhuzn.HPCMS:49!null, rhuzn.N5CC2:50, rhuzn.FHCYT:51, rhuzn.ETAQ7:52, rhuzn.A75X7:53, tizhk.id:0!null as MU3KG, CASE WHEN NOT\n" + - " │ └─ nhmxw.FZXV5:15 IS NULL\n" + - " │ THEN Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select overridden_nd_mutant.id from E2I7U as overridden_nd_mutant where overridden_nd_mutant.TW55N = NHMXW.FZXV5\n" + - " │ └─ Project\n" + - " │ ├─ columns: [overridden_nd_mutant.id:54!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ overridden_nd_mutant.TW55N:55!null\n" + - " │ │ └─ nhmxw.FZXV5:15\n" + - " │ └─ TableAlias(overridden_nd_mutant)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.TW55N]\n" + - " │ ├─ keys: [nhmxw.FZXV5:15]\n" + - " │ ├─ colSet: (170-186)\n" + - " │ ├─ tableId: 14\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id tw55n]\n" + - " │ ELSE j4jyp.id:20!null END as FV24E, CASE WHEN NOT\n" + - " │ └─ nhmxw.DQYGV:16 IS NULL\n" + - " │ THEN Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select overridden_QI2IEner.id from E2I7U as overridden_QI2IEner where overridden_QI2IEner.TW55N = NHMXW.DQYGV\n" + - " │ └─ Project\n" + - " │ ├─ columns: [overridden_qi2iener.id:54!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ overridden_qi2iener.TW55N:55!null\n" + - " │ │ └─ nhmxw.DQYGV:16\n" + - " │ └─ TableAlias(overridden_qi2iener)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.TW55N]\n" + - " │ ├─ keys: [nhmxw.DQYGV:16]\n" + - " │ ├─ colSet: (188-204)\n" + - " │ ├─ tableId: 15\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id tw55n]\n" + - " │ ELSE rhuzn.id:37!null END as UJ6XY, tizhk.SYPKF:3 as SYPKF, Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select G3YXS.id from YYBCX as G3YXS where CONCAT(G3YXS.ESFVY, '(MI:', G3YXS.SL76B, ')') = TIZHK.IDUT2\n" + - " │ └─ Project\n" + - " │ ├─ columns: [g3yxs.id:54!null]\n" + - " │ └─ Filter\n" + - " │ ├─ Eq\n" + - " │ │ ├─ concat(g3yxs.ESFVY:55!null,(MI: (longtext),g3yxs.SL76B:56!null,) (longtext))\n" + - " │ │ └─ tizhk.IDUT2:4\n" + - " │ └─ TableAlias(g3yxs)\n" + - " │ └─ Table\n" + - " │ ├─ name: YYBCX\n" + - " │ ├─ columns: [id esfvy sl76b]\n" + - " │ ├─ colSet: (207-214)\n" + - " │ └─ tableId: 16\n" + - " │ as NZ4MQ, NULL (null) as FHCYT, NULL (null) as YKSSU, nhmxw.id:10!null as I4NDZ]\n" + - " └─ Filter\n" + - " ├─ NOT\n" + - " │ └─ nhmxw.id:10!null IS NULL\n" + - " └─ LeftOuterLookupJoin\n" + - " ├─ LeftOuterLookupJoin\n" + - " │ ├─ LeftOuterJoin\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ ├─ nhmxw.SWCQV:17!null\n" + - " │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ nhmxw.NOHHR:11!null\n" + - " │ │ │ │ │ │ └─ tizhk.TVNW2:1\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ nhmxw.AVPYF:12!null\n" + - " │ │ │ │ │ └─ tizhk.ZHITY:2\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ nhmxw.SYPKF:13!null\n" + - " │ │ │ │ └─ tizhk.SYPKF:3\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ nhmxw.IDUT2:14!null\n" + - " │ │ │ └─ tizhk.IDUT2:4\n" + - " │ │ ├─ TableAlias(tizhk)\n" + - " │ │ │ └─ IndexedTableAccess(WRZVO)\n" + - " │ │ │ ├─ index: [WRZVO.id]\n" + - " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ ├─ colSet: (115-124)\n" + - " │ │ │ ├─ tableId: 10\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: WRZVO\n" + - " │ │ │ └─ columns: [id tvnw2 zhity sypkf idut2 o6qj3 no2ja ykssu fhcyt qz6vt]\n" + - " │ │ └─ TableAlias(nhmxw)\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: WGSDC\n" + - " │ │ ├─ columns: [id nohhr avpyf sypkf idut2 fzxv5 dqygv swcqv ykssu fhcyt]\n" + - " │ │ ├─ colSet: (125-134)\n" + - " │ │ └─ tableId: 11\n" + - " │ └─ TableAlias(j4jyp)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.ZH72S]\n" + - " │ ├─ keys: [tizhk.TVNW2:1]\n" + - " │ ├─ colSet: (135-151)\n" + - " │ ├─ tableId: 12\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " └─ TableAlias(rhuzn)\n" + - " └─ IndexedTableAccess(E2I7U)\n" + - " ├─ index: [E2I7U.ZH72S]\n" + - " ├─ keys: [tizhk.ZHITY:2]\n" + - " ├─ colSet: (152-168)\n" + - " ├─ tableId: 13\n" + - " └─ Table\n" + - " ├─ name: E2I7U\n" + - " └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " └─ Filter\n" + + " ├─ NOT\n" + + " │ └─ nhmxw.id:10!null IS NULL\n" + + " └─ LeftOuterLookupJoin\n" + + " ├─ LeftOuterLookupJoin\n" + + " │ ├─ LeftOuterJoin\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ ├─ nhmxw.SWCQV:17!null\n" + + " │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ nhmxw.NOHHR:11!null\n" + + " │ │ │ │ │ │ └─ tizhk.TVNW2:1\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ nhmxw.AVPYF:12!null\n" + + " │ │ │ │ │ └─ tizhk.ZHITY:2\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ nhmxw.SYPKF:13!null\n" + + " │ │ │ │ └─ tizhk.SYPKF:3\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ nhmxw.IDUT2:14!null\n" + + " │ │ │ └─ tizhk.IDUT2:4\n" + + " │ │ ├─ TableAlias(tizhk)\n" + + " │ │ │ └─ IndexedTableAccess(WRZVO)\n" + + " │ │ │ ├─ index: [WRZVO.id]\n" + + " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ ├─ colSet: (115-124)\n" + + " │ │ │ ├─ tableId: 10\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: WRZVO\n" + + " │ │ │ └─ columns: [id tvnw2 zhity sypkf idut2 o6qj3 no2ja ykssu fhcyt qz6vt]\n" + + " │ │ └─ TableAlias(nhmxw)\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: WGSDC\n" + + " │ │ ├─ columns: [id nohhr avpyf sypkf idut2 fzxv5 dqygv swcqv ykssu fhcyt]\n" + + " │ │ ├─ colSet: (125-134)\n" + + " │ │ └─ tableId: 11\n" + + " │ └─ TableAlias(j4jyp)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.ZH72S]\n" + + " │ ├─ keys: [tizhk.TVNW2:1]\n" + + " │ ├─ colSet: (135-151)\n" + + " │ ├─ tableId: 12\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " └─ TableAlias(rhuzn)\n" + + " └─ IndexedTableAccess(E2I7U)\n" + + " ├─ index: [E2I7U.ZH72S]\n" + + " ├─ keys: [tizhk.ZHITY:2]\n" + + " ├─ colSet: (152-168)\n" + + " ├─ tableId: 13\n" + + " └─ Table\n" + + " ├─ name: E2I7U\n" + + " └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + "", }, { @@ -20439,250 +20416,249 @@ WHERE AND (rs.NO52D, rs.DKCAJ) NOT IN (SELECT DISTINCT NO52D, DKCAJ FROM SFEGG WHERE VYO5E IS NULL) )`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SFEGG\n" + - " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ADURZ <= 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0 as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 3 (tinyint) WHEN Or\n" + - " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + - " │ │ └─ rs.NO52D LIKE 'EC%'\n" + - " │ │ THEN 3 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ THEN 2 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 4 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0\n" + - " │ │ └─ Ki (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0\n" + - " │ │ └─ Kd (longtext)\n" + - " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: TUPLE(rs.NO52D:0, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ ├─ colSet: (60-65)\n" + - " │ │ │ └─ tableId: 8\n" + - " │ │ └─ AND\n" + - " │ │ ├─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: TUPLE(rs.NO52D:0, rs.DKCAJ:2!null)\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + - " │ │ └─ Distinct\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ ├─ colSet: (66-71)\n" + - " │ │ └─ tableId: 9\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: rs\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (56-59)\n" + - " │ ├─ tableId: 7\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [nk7fp.NO52D:0 as NO52D, CASE WHEN Eq\n" + - " │ │ ├─ nk7fp.VYO5E:1\n" + - " │ │ └─ N/A (longtext)\n" + - " │ │ THEN NULL (null) ELSE nk7fp.VYO5E:1 END as VYO5E, nt.id:21!null as DKCAJ, nt.DZLIM:22!null as F35MI]\n" + - " │ └─ HashJoin\n" + - " │ ├─ Eq\n" + - " │ │ ├─ nt.id:21!null\n" + - " │ │ └─ nd.DKCAJ:5!null\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ Or\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ nk7fp.FVUCX:3!null IS NULL\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ nd.ZH72S:11\n" + - " │ │ │ │ └─ nk7fp.ZH72S:2\n" + - " │ │ │ └─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ nk7fp.FVUCX:3!null IS NULL\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ nd.TW55N:7!null\n" + - " │ │ │ └─ nk7fp.FVUCX:3!null\n" + - " │ │ ├─ SubqueryAlias\n" + - " │ │ │ ├─ name: nk7fp\n" + - " │ │ │ ├─ outerVisibility: false\n" + - " │ │ │ ├─ isLateral: false\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ colSet: (28-31)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [uct.NO52D:7, uct.VYO5E:9, uct.ZH72S:2, i7hcr.FVUCX:17!null]\n" + - " │ │ │ └─ LeftOuterJoin\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + - " │ │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + - " │ │ │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + - " │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ i7hcr.BTXC5:16!null\n" + - " │ │ │ │ └─ uct.LJLUM:5\n" + - " │ │ │ ├─ TableAlias(uct)\n" + - " │ │ │ │ └─ IndexedTableAccess(OUBDL)\n" + - " │ │ │ │ ├─ index: [OUBDL.id]\n" + - " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ │ ├─ colSet: (7-19)\n" + - " │ │ │ │ ├─ tableId: 2\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: OUBDL\n" + - " │ │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + - " │ │ │ └─ TableAlias(i7hcr)\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: EPZU6\n" + - " │ │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + - " │ │ │ ├─ colSet: (20-27)\n" + - " │ │ │ └─ tableId: 3\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ Concat\n" + - " │ │ ├─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [nk7fp.FVUCX:3!null]\n" + - " │ │ │ ├─ colSet: (32-48)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ ├─ keys: [nk7fp.ZH72S:2]\n" + - " │ │ ├─ colSet: (32-48)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ HashLookup\n" + - " │ ├─ left-key: TUPLE(nd.DKCAJ:5!null)\n" + - " │ ├─ right-key: TUPLE(nt.id:0!null)\n" + - " │ └─ TableAlias(nt)\n" + - " │ └─ Table\n" + - " │ ├─ name: F35MI\n" + - " │ ├─ columns: [id dzlim f3yue]\n" + - " │ ├─ colSet: (49-51)\n" + - " │ └─ tableId: 6\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ InSubquery\n" + - " │ │ ├─ left: new.NO52D:1!null\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (13,14)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.VYO5E:2\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (15,16)\n" + - " │ └─ tableId: 4\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(LessThanOrEqual\n" + - " ├─ new.ADURZ:4!null\n" + - " └─ 0 (int)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SFEGG\n" + + " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ADURZ <= 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0 as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 3 (tinyint) WHEN Or\n" + + " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + + " │ │ └─ rs.NO52D LIKE 'EC%'\n" + + " │ │ THEN 3 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ THEN 2 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 4 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0\n" + + " │ │ └─ Ki (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0\n" + + " │ │ └─ Kd (longtext)\n" + + " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: TUPLE(rs.NO52D:0, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ ├─ colSet: (60-65)\n" + + " │ │ │ └─ tableId: 8\n" + + " │ │ └─ AND\n" + + " │ │ ├─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: TUPLE(rs.NO52D:0, rs.DKCAJ:2!null)\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + + " │ │ └─ Distinct\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ ├─ colSet: (66-71)\n" + + " │ │ └─ tableId: 9\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: rs\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (56-59)\n" + + " │ ├─ tableId: 7\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [nk7fp.NO52D:0 as NO52D, CASE WHEN Eq\n" + + " │ │ ├─ nk7fp.VYO5E:1\n" + + " │ │ └─ N/A (longtext)\n" + + " │ │ THEN NULL (null) ELSE nk7fp.VYO5E:1 END as VYO5E, nt.id:21!null as DKCAJ, nt.DZLIM:22!null as F35MI]\n" + + " │ └─ HashJoin\n" + + " │ ├─ Eq\n" + + " │ │ ├─ nt.id:21!null\n" + + " │ │ └─ nd.DKCAJ:5!null\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ Or\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ nk7fp.FVUCX:3!null IS NULL\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ nd.ZH72S:11\n" + + " │ │ │ │ └─ nk7fp.ZH72S:2\n" + + " │ │ │ └─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ nk7fp.FVUCX:3!null IS NULL\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ nd.TW55N:7!null\n" + + " │ │ │ └─ nk7fp.FVUCX:3!null\n" + + " │ │ ├─ SubqueryAlias\n" + + " │ │ │ ├─ name: nk7fp\n" + + " │ │ │ ├─ outerVisibility: false\n" + + " │ │ │ ├─ isLateral: false\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ colSet: (28-31)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [uct.NO52D:7, uct.VYO5E:9, uct.ZH72S:2, i7hcr.FVUCX:17!null]\n" + + " │ │ │ └─ LeftOuterJoin\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + + " │ │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + + " │ │ │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + + " │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ i7hcr.BTXC5:16!null\n" + + " │ │ │ │ └─ uct.LJLUM:5\n" + + " │ │ │ ├─ TableAlias(uct)\n" + + " │ │ │ │ └─ IndexedTableAccess(OUBDL)\n" + + " │ │ │ │ ├─ index: [OUBDL.id]\n" + + " │ │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ │ ├─ colSet: (7-19)\n" + + " │ │ │ │ ├─ tableId: 2\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: OUBDL\n" + + " │ │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + + " │ │ │ └─ TableAlias(i7hcr)\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: EPZU6\n" + + " │ │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + + " │ │ │ ├─ colSet: (20-27)\n" + + " │ │ │ └─ tableId: 3\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ Concat\n" + + " │ │ ├─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [nk7fp.FVUCX:3!null]\n" + + " │ │ │ ├─ colSet: (32-48)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ ├─ keys: [nk7fp.ZH72S:2]\n" + + " │ │ ├─ colSet: (32-48)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ HashLookup\n" + + " │ ├─ left-key: TUPLE(nd.DKCAJ:5!null)\n" + + " │ ├─ right-key: TUPLE(nt.id:0!null)\n" + + " │ └─ TableAlias(nt)\n" + + " │ └─ Table\n" + + " │ ├─ name: F35MI\n" + + " │ ├─ columns: [id dzlim f3yue]\n" + + " │ ├─ colSet: (49-51)\n" + + " │ └─ tableId: 6\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ InSubquery\n" + + " │ │ ├─ left: new.NO52D:1!null\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (13,14)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.VYO5E:2\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (15,16)\n" + + " │ └─ tableId: 4\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(LessThanOrEqual\n" + + " ├─ new.ADURZ:4!null\n" + + " └─ 0 (int)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + "", }, { @@ -20769,396 +20745,395 @@ ON WHERE -- In the case we could not build-in evidence class for some PQSXB.OVE3E IS NOT NULL`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: FLQLP\n" + - " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:41!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:42\n" + - " │ │ │ └─ pqsxb.BTXC5:10\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + - " │ │ ├─ colSet: (123-125)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [pqsxb.FZ2R5:0, pqsxb.OVE3E:1, pqsxb.NRURT:2!null, pqsxb.OCA7E:3!null, pqsxb.XMM6Q:4, pqsxb.V5DPX:5, pqsxb.S3Q3Y:6, pqsxb.ZRV3B:7, pqsxb.FHCYT:8, pqsxb.K3B6V:9, pqsxb.BTXC5:10, pqsxb.H4DMT:11!null, nd.id:12!null, nd.DKCAJ:13!null, nd.KNG7T:14, nd.TW55N:15!null, nd.QRQXW:16!null, nd.ECXAJ:17!null, nd.FGG57:18, nd.ZH72S:19, nd.FSK67:20!null, nd.XQDYT:21!null, nd.TCE7A:22, nd.IWV2H:23, nd.HPCMS:24!null, nd.N5CC2:25, nd.FHCYT:26, nd.ETAQ7:27, nd.A75X7:28, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [aac.id:29!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ aac.BTXC5:30\n" + - " │ │ │ └─ pqsxb.BTXC5:10\n" + - " │ │ └─ TableAlias(aac)\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + - " │ │ ├─ colSet: (123-125)\n" + - " │ │ ├─ tableId: 10\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ NOT\n" + - " │ │ └─ pqsxb.OVE3E:1 IS NULL\n" + - " │ └─ LookupJoin\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ pqsxb.H4DMT:11!null IS NULL\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ nd.TW55N:15!null\n" + - " │ │ │ └─ pqsxb.H4DMT:11!null\n" + - " │ │ └─ AND\n" + - " │ │ ├─ pqsxb.H4DMT:11!null IS NULL\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ nd.ZH72S:19\n" + - " │ │ └─ pqsxb.K3B6V:9\n" + - " │ ├─ SubqueryAlias\n" + - " │ │ ├─ name: pqsxb\n" + - " │ │ ├─ outerVisibility: false\n" + - " │ │ ├─ isLateral: false\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ colSet: (91-102)\n" + - " │ │ ├─ tableId: 8\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [jdlna.id:33!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ jdlna.FTQLQ:34!null\n" + - " │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + - " │ │ │ ├─ colSet: (34-38)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: JDLNA\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ │ as FZ2R5, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.id:33!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.NO52D:34!null\n" + - " │ │ │ │ │ │ └─ uct.NO52D:7\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.VYO5E:35\n" + - " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ AND\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:35 IS NULL\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ sfegg.DKCAJ:36!null\n" + - " │ │ │ │ └─ Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + - " │ │ │ │ │ └─ Limit(1)\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.ZH72S:41\n" + - " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + - " │ │ │ │ │ ├─ colSet: (46-62)\n" + - " │ │ │ │ │ ├─ tableId: 6\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + - " │ │ │ │ │ ELSE Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.TW55N:41!null\n" + - " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + - " │ │ │ │ │ ├─ colSet: (63-79)\n" + - " │ │ │ │ │ ├─ tableId: 7\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ │ │ │ END as CASE\n" + - " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + - " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + - " │ │ │ │ │ ELSE\n" + - " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + - " │ │ │ │ │ END]\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [dual.:39!null]\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: \n" + - " │ │ │ │ ├─ columns: []\n" + - " │ │ │ │ ├─ colSet: ()\n" + - " │ │ │ │ └─ tableId: 0\n" + - " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ │ ├─ keys: [uct.NO52D:7]\n" + - " │ │ │ ├─ colSet: (40-45)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ uct.FHCYT:11\n" + - " │ │ │ └─ N/A (longtext)\n" + - " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [uct.id:0!null, uct.FTQLQ:1, uct.ZH72S:2, uct.SFJ6L:3, uct.V5DPX:4, uct.LJLUM:5, uct.IDPK7:6, uct.NO52D:7, uct.ZRV3B:8, uct.VYO5E:9, uct.YKSSU:10, uct.FHCYT:11, uct.QZ6VT:12, i7hcr.id:13!null, i7hcr.TOFPN:14!null, i7hcr.SJYN2:15!null, i7hcr.BTXC5:16!null, i7hcr.FVUCX:17!null, i7hcr.SWCQV:18!null, i7hcr.YKSSU:19, i7hcr.FHCYT:20, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [jdlna.id:21!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ jdlna.FTQLQ:22!null\n" + - " │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + - " │ │ │ ├─ colSet: (34-38)\n" + - " │ │ │ ├─ tableId: 4\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: JDLNA\n" + - " │ │ │ └─ columns: [id ftqlq]\n" + - " │ │ │ as FZ2R5, Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.id:21!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.NO52D:22!null\n" + - " │ │ │ │ │ │ └─ uct.NO52D:7\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ sfegg.VYO5E:23\n" + - " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ AND\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:23 IS NULL\n" + - " │ │ │ │ │ └─ Or\n" + - " │ │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ uct.VYO5E:9\n" + - " │ │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ sfegg.DKCAJ:24!null\n" + - " │ │ │ │ └─ Subquery\n" + - " │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + - " │ │ │ │ │ └─ Limit(1)\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.ZH72S:29\n" + - " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + - " │ │ │ │ │ ├─ colSet: (46-62)\n" + - " │ │ │ │ │ ├─ tableId: 6\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + - " │ │ │ │ │ ELSE Subquery\n" + - " │ │ │ │ │ ├─ cacheable: false\n" + - " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + - " │ │ │ │ │ └─ Project\n" + - " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + - " │ │ │ │ │ └─ Filter\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ nd.TW55N:29!null\n" + - " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + - " │ │ │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + - " │ │ │ │ │ ├─ colSet: (63-79)\n" + - " │ │ │ │ │ ├─ tableId: 7\n" + - " │ │ │ │ │ └─ Table\n" + - " │ │ │ │ │ ├─ name: E2I7U\n" + - " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ │ │ │ END as CASE\n" + - " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + - " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + - " │ │ │ │ │ ELSE\n" + - " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + - " │ │ │ │ │ END]\n" + - " │ │ │ │ └─ Project\n" + - " │ │ │ │ ├─ columns: [dual.:27!null]\n" + - " │ │ │ │ └─ Table\n" + - " │ │ │ │ ├─ name: \n" + - " │ │ │ │ ├─ columns: []\n" + - " │ │ │ │ ├─ colSet: ()\n" + - " │ │ │ │ └─ tableId: 0\n" + - " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ │ ├─ keys: [uct.NO52D:7]\n" + - " │ │ │ ├─ colSet: (40-45)\n" + - " │ │ │ ├─ tableId: 5\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ uct.FHCYT:11\n" + - " │ │ │ └─ N/A (longtext)\n" + - " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + - " │ │ └─ LeftOuterJoin\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ AND\n" + - " │ │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + - " │ │ │ │ │ │ └─ 0 (int)\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + - " │ │ │ │ │ └─ uct.FTQLQ:1\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + - " │ │ │ │ └─ uct.ZH72S:2\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ i7hcr.BTXC5:16!null\n" + - " │ │ │ └─ uct.LJLUM:5\n" + - " │ │ ├─ TableAlias(uct)\n" + - " │ │ │ └─ IndexedTableAccess(OUBDL)\n" + - " │ │ │ ├─ index: [OUBDL.id]\n" + - " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ ├─ colSet: (13-25)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: OUBDL\n" + - " │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + - " │ │ └─ TableAlias(i7hcr)\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: EPZU6\n" + - " │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + - " │ │ ├─ colSet: (26-33)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ TableAlias(nd)\n" + - " │ └─ Concat\n" + - " │ ├─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.ZH72S]\n" + - " │ │ ├─ keys: [pqsxb.K3B6V:9]\n" + - " │ │ ├─ colSet: (103-119)\n" + - " │ │ ├─ tableId: 9\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(nd)\n" + - " │ └─ IndexedTableAccess(E2I7U)\n" + - " │ ├─ index: [E2I7U.TW55N]\n" + - " │ ├─ keys: [pqsxb.H4DMT:11!null]\n" + - " │ ├─ colSet: (103-119)\n" + - " │ ├─ tableId: 9\n" + - " │ └─ Table\n" + - " │ ├─ name: E2I7U\n" + - " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(InSubquery\n" + - " │ ├─ left: new.V5DPX:8!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (25,26)\n" + - " │ └─ tableId: 3\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.ZRV3B:10!null\n" + - " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: FLQLP\n" + + " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:41!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:42\n" + + " │ │ │ └─ pqsxb.BTXC5:10\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + + " │ │ ├─ colSet: (123-125)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [pqsxb.FZ2R5:0, pqsxb.OVE3E:1, pqsxb.NRURT:2!null, pqsxb.OCA7E:3!null, pqsxb.XMM6Q:4, pqsxb.V5DPX:5, pqsxb.S3Q3Y:6, pqsxb.ZRV3B:7, pqsxb.FHCYT:8, pqsxb.K3B6V:9, pqsxb.BTXC5:10, pqsxb.H4DMT:11!null, nd.id:12!null, nd.DKCAJ:13!null, nd.KNG7T:14, nd.TW55N:15!null, nd.QRQXW:16!null, nd.ECXAJ:17!null, nd.FGG57:18, nd.ZH72S:19, nd.FSK67:20!null, nd.XQDYT:21!null, nd.TCE7A:22, nd.IWV2H:23, nd.HPCMS:24!null, nd.N5CC2:25, nd.FHCYT:26, nd.ETAQ7:27, nd.A75X7:28, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, pqsxb.FZ2R5:0 as FZ2R5, nd.id:12!null as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select aac.id from TPXBU as aac where aac.BTXC5 = PQSXB.BTXC5\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [aac.id:29!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ aac.BTXC5:30\n" + + " │ │ │ └─ pqsxb.BTXC5:10\n" + + " │ │ └─ TableAlias(aac)\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [pqsxb.BTXC5:10]\n" + + " │ │ ├─ colSet: (123-125)\n" + + " │ │ ├─ tableId: 10\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, pqsxb.OVE3E:1 as OVE3E, pqsxb.NRURT:2!null as NRURT, pqsxb.OCA7E:3!null as OCA7E, pqsxb.XMM6Q:4 as XMM6Q, pqsxb.V5DPX:5 as V5DPX, pqsxb.S3Q3Y:6 as S3Q3Y, pqsxb.ZRV3B:7 as ZRV3B, pqsxb.FHCYT:8 as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ NOT\n" + + " │ │ └─ pqsxb.OVE3E:1 IS NULL\n" + + " │ └─ LookupJoin\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ pqsxb.H4DMT:11!null IS NULL\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ nd.TW55N:15!null\n" + + " │ │ │ └─ pqsxb.H4DMT:11!null\n" + + " │ │ └─ AND\n" + + " │ │ ├─ pqsxb.H4DMT:11!null IS NULL\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ nd.ZH72S:19\n" + + " │ │ └─ pqsxb.K3B6V:9\n" + + " │ ├─ SubqueryAlias\n" + + " │ │ ├─ name: pqsxb\n" + + " │ │ ├─ outerVisibility: false\n" + + " │ │ ├─ isLateral: false\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ colSet: (91-102)\n" + + " │ │ ├─ tableId: 8\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [jdlna.id:33!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ jdlna.FTQLQ:34!null\n" + + " │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + + " │ │ │ ├─ colSet: (34-38)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: JDLNA\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ │ as FZ2R5, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.id:33!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.NO52D:34!null\n" + + " │ │ │ │ │ │ └─ uct.NO52D:7\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.VYO5E:35\n" + + " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ AND\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:35 IS NULL\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ sfegg.DKCAJ:36!null\n" + + " │ │ │ │ └─ Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + + " │ │ │ │ │ └─ Limit(1)\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.ZH72S:41\n" + + " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + + " │ │ │ │ │ ├─ colSet: (46-62)\n" + + " │ │ │ │ │ ├─ tableId: 6\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + + " │ │ │ │ │ ELSE Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:40!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.TW55N:41!null\n" + + " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + + " │ │ │ │ │ ├─ colSet: (63-79)\n" + + " │ │ │ │ │ ├─ tableId: 7\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ │ │ │ END as CASE\n" + + " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + + " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + + " │ │ │ │ │ ELSE\n" + + " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + + " │ │ │ │ │ END]\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [dual.:39!null]\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: \n" + + " │ │ │ │ ├─ columns: []\n" + + " │ │ │ │ ├─ colSet: ()\n" + + " │ │ │ │ └─ tableId: 0\n" + + " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ │ ├─ keys: [uct.NO52D:7]\n" + + " │ │ │ ├─ colSet: (40-45)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ uct.FHCYT:11\n" + + " │ │ │ └─ N/A (longtext)\n" + + " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [uct.id:0!null, uct.FTQLQ:1, uct.ZH72S:2, uct.SFJ6L:3, uct.V5DPX:4, uct.LJLUM:5, uct.IDPK7:6, uct.NO52D:7, uct.ZRV3B:8, uct.VYO5E:9, uct.YKSSU:10, uct.FHCYT:11, uct.QZ6VT:12, i7hcr.id:13!null, i7hcr.TOFPN:14!null, i7hcr.SJYN2:15!null, i7hcr.BTXC5:16!null, i7hcr.FVUCX:17!null, i7hcr.SWCQV:18!null, i7hcr.YKSSU:19, i7hcr.FHCYT:20, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = uct.FTQLQ\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [jdlna.id:21!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ jdlna.FTQLQ:22!null\n" + + " │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ │ ├─ keys: [uct.FTQLQ:1]\n" + + " │ │ │ ├─ colSet: (34-38)\n" + + " │ │ │ ├─ tableId: 4\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: JDLNA\n" + + " │ │ │ └─ columns: [id ftqlq]\n" + + " │ │ │ as FZ2R5, Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = uct.NO52D and (SFEGG.VYO5E = uct.VYO5E or (SFEGG.VYO5E is null and (uct.VYO5E is null or uct.VYO5E = 'N/A' or uct.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end)\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.id:21!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.NO52D:22!null\n" + + " │ │ │ │ │ │ └─ uct.NO52D:7\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ sfegg.VYO5E:23\n" + + " │ │ │ │ │ │ └─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ AND\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:23 IS NULL\n" + + " │ │ │ │ │ └─ Or\n" + + " │ │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ uct.VYO5E:9\n" + + " │ │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ sfegg.DKCAJ:24!null\n" + + " │ │ │ │ └─ Subquery\n" + + " │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ ├─ alias-string: select case when I7HCR.FVUCX is null then (select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1) else (select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX) end\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [CASE WHEN i7hcr.FVUCX:17!null IS NULL THEN Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.ZH72S = uct.ZH72S limit 1\n" + + " │ │ │ │ │ └─ Limit(1)\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.ZH72S:29\n" + + " │ │ │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ │ │ │ ├─ keys: [uct.ZH72S:2]\n" + + " │ │ │ │ │ ├─ colSet: (46-62)\n" + + " │ │ │ │ │ ├─ tableId: 6\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj zh72s]\n" + + " │ │ │ │ │ ELSE Subquery\n" + + " │ │ │ │ │ ├─ cacheable: false\n" + + " │ │ │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = I7HCR.FVUCX\n" + + " │ │ │ │ │ └─ Project\n" + + " │ │ │ │ │ ├─ columns: [nd.DKCAJ:28!null]\n" + + " │ │ │ │ │ └─ Filter\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ nd.TW55N:29!null\n" + + " │ │ │ │ │ │ └─ i7hcr.FVUCX:17!null\n" + + " │ │ │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ │ │ ├─ keys: [i7hcr.FVUCX:17!null]\n" + + " │ │ │ │ │ ├─ colSet: (63-79)\n" + + " │ │ │ │ │ ├─ tableId: 7\n" + + " │ │ │ │ │ └─ Table\n" + + " │ │ │ │ │ ├─ name: E2I7U\n" + + " │ │ │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ │ │ │ END as CASE\n" + + " │ │ │ │ │ WHEN I7HCR.FVUCX IS NULL\n" + + " │ │ │ │ │ THEN (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.ZH72S = uct.ZH72S LIMIT 1)\n" + + " │ │ │ │ │ ELSE\n" + + " │ │ │ │ │ (SELECT nd.DKCAJ FROM E2I7U nd WHERE nd.TW55N = I7HCR.FVUCX)\n" + + " │ │ │ │ │ END]\n" + + " │ │ │ │ └─ Project\n" + + " │ │ │ │ ├─ columns: [dual.:27!null]\n" + + " │ │ │ │ └─ Table\n" + + " │ │ │ │ ├─ name: \n" + + " │ │ │ │ ├─ columns: []\n" + + " │ │ │ │ ├─ colSet: ()\n" + + " │ │ │ │ └─ tableId: 0\n" + + " │ │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ │ ├─ keys: [uct.NO52D:7]\n" + + " │ │ │ ├─ colSet: (40-45)\n" + + " │ │ │ ├─ tableId: 5\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ as OVE3E, uct.id:0!null as NRURT, i7hcr.id:13!null as OCA7E, NULL (null) as XMM6Q, uct.V5DPX:4 as V5DPX, (uct.IDPK7:6 + 0 (decimal(2,1))) as S3Q3Y, uct.ZRV3B:8 as ZRV3B, CASE WHEN NOT\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ uct.FHCYT:11\n" + + " │ │ │ └─ N/A (longtext)\n" + + " │ │ │ THEN uct.FHCYT:11 ELSE NULL (null) END as FHCYT, uct.ZH72S:2 as K3B6V, uct.LJLUM:5 as BTXC5, i7hcr.FVUCX:17!null as H4DMT]\n" + + " │ │ └─ LeftOuterJoin\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ AND\n" + + " │ │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ │ ├─ i7hcr.SWCQV:18!null\n" + + " │ │ │ │ │ │ └─ 0 (int)\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ i7hcr.TOFPN:14!null\n" + + " │ │ │ │ │ └─ uct.FTQLQ:1\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ i7hcr.SJYN2:15!null\n" + + " │ │ │ │ └─ uct.ZH72S:2\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ i7hcr.BTXC5:16!null\n" + + " │ │ │ └─ uct.LJLUM:5\n" + + " │ │ ├─ TableAlias(uct)\n" + + " │ │ │ └─ IndexedTableAccess(OUBDL)\n" + + " │ │ │ ├─ index: [OUBDL.id]\n" + + " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ ├─ colSet: (13-25)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: OUBDL\n" + + " │ │ │ └─ columns: [id ftqlq zh72s sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e ykssu fhcyt qz6vt]\n" + + " │ │ └─ TableAlias(i7hcr)\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: EPZU6\n" + + " │ │ ├─ columns: [id tofpn sjyn2 btxc5 fvucx swcqv ykssu fhcyt]\n" + + " │ │ ├─ colSet: (26-33)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ TableAlias(nd)\n" + + " │ └─ Concat\n" + + " │ ├─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.ZH72S]\n" + + " │ │ ├─ keys: [pqsxb.K3B6V:9]\n" + + " │ │ ├─ colSet: (103-119)\n" + + " │ │ ├─ tableId: 9\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(nd)\n" + + " │ └─ IndexedTableAccess(E2I7U)\n" + + " │ ├─ index: [E2I7U.TW55N]\n" + + " │ ├─ keys: [pqsxb.H4DMT:11!null]\n" + + " │ ├─ colSet: (103-119)\n" + + " │ ├─ tableId: 9\n" + + " │ └─ Table\n" + + " │ ├─ name: E2I7U\n" + + " │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(InSubquery\n" + + " │ ├─ left: new.V5DPX:8!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (25,26)\n" + + " │ └─ tableId: 3\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.ZRV3B:10!null\n" + + " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + "", }, { @@ -21210,189 +21185,188 @@ WHERE AND (rs.NO52D, rs.DKCAJ) NOT IN (SELECT DISTINCT NO52D, DKCAJ FROM SFEGG WHERE VYO5E IS NULL) )`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: SFEGG\n" + - " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ADURZ <= 0\n" + - " THEN\n" + - " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0!null as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0!null\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ rs.NO52D:0!null\n" + - " │ │ │ └─ FZB3D (longtext)\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.F35MI:3!null\n" + - " │ │ └─ SUZTA (longtext)\n" + - " │ │ THEN 3 (tinyint) WHEN Or\n" + - " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + - " │ │ └─ rs.NO52D LIKE 'EC%'\n" + - " │ │ THEN 3 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ THEN 2 (tinyint) WHEN AND\n" + - " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN AND\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ Eq\n" + - " │ │ ├─ rs.VYO5E:1\n" + - " │ │ └─ CF (longtext)\n" + - " │ │ THEN 4 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0!null\n" + - " │ │ └─ Ki (longtext)\n" + - " │ │ THEN 1 (tinyint) WHEN Eq\n" + - " │ │ ├─ rs.NO52D:0!null\n" + - " │ │ └─ Kd (longtext)\n" + - " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + - " │ └─ Filter\n" + - " │ ├─ Or\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + - " │ │ │ └─ NOT\n" + - " │ │ │ └─ InSubquery\n" + - " │ │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + - " │ │ │ └─ right: Subquery\n" + - " │ │ │ ├─ cacheable: true\n" + - " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + - " │ │ │ └─ Distinct\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ NOT\n" + - " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: SFEGG\n" + - " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ │ ├─ colSet: (48-53)\n" + - " │ │ │ └─ tableId: 6\n" + - " │ │ └─ AND\n" + - " │ │ ├─ rs.VYO5E:1 IS NULL\n" + - " │ │ └─ NOT\n" + - " │ │ └─ InSubquery\n" + - " │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.DKCAJ:2!null)\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: true\n" + - " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + - " │ │ └─ Distinct\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ ├─ colSet: (54-59)\n" + - " │ │ └─ tableId: 7\n" + - " │ └─ SubqueryAlias\n" + - " │ ├─ name: rs\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (44-47)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Distinct\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tvtjs.NO52D:7!null as NO52D, tvtjs.VYO5E:9 as VYO5E, nt.id:30!null as DKCAJ, nt.DZLIM:31!null as F35MI]\n" + - " │ └─ LookupJoin\n" + - " │ ├─ LookupJoin\n" + - " │ │ ├─ TableAlias(tvtjs)\n" + - " │ │ │ └─ IndexedTableAccess(HU5A5)\n" + - " │ │ │ ├─ index: [HU5A5.id]\n" + - " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ │ │ ├─ colSet: (7-19)\n" + - " │ │ │ ├─ tableId: 2\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: HU5A5\n" + - " │ │ │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + - " │ │ └─ TableAlias(nd)\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (20-36)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + - " │ └─ TableAlias(nt)\n" + - " │ └─ IndexedTableAccess(F35MI)\n" + - " │ ├─ index: [F35MI.id]\n" + - " │ ├─ keys: [nd.DKCAJ:14!null]\n" + - " │ ├─ colSet: (37-39)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: F35MI\n" + - " │ └─ columns: [id dzlim f3yue]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(Or\n" + - " │ ├─ InSubquery\n" + - " │ │ ├─ left: new.NO52D:1!null\n" + - " │ │ └─ right: Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXHZ\n" + - " │ │ ├─ columns: [svaz4]\n" + - " │ │ ├─ colSet: (13,14)\n" + - " │ │ └─ tableId: 3\n" + - " │ └─ InSubquery\n" + - " │ ├─ left: new.VYO5E:2\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (15,16)\n" + - " │ └─ tableId: 4\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(LessThanOrEqual\n" + - " ├─ new.ADURZ:4!null\n" + - " └─ 0 (int)\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, NO52D, VYO5E, DKCAJ, ADURZ, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: SFEGG\n" + + " │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER SFEGG_on_insert BEFORE INSERT ON SFEGG\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.NO52D IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " OR NEW.VYO5E IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ADURZ <= 0\n" + + " THEN\n" + + " -- SET @custom_error_message = 'ADURZ must be positive.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'ADURZ must be positive.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, NO52D:1!null, VYO5E:2, DKCAJ:3!null, ADURZ:4!null, FHCYT:5]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, rs.NO52D:0!null as NO52D, rs.VYO5E:1 as VYO5E, rs.DKCAJ:2!null as DKCAJ, CASE WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0!null\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ rs.NO52D:0!null\n" + + " │ │ │ └─ FZB3D (longtext)\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.F35MI:3!null\n" + + " │ │ └─ SUZTA (longtext)\n" + + " │ │ THEN 3 (tinyint) WHEN Or\n" + + " │ │ ├─ rs.NO52D LIKE 'AC%'\n" + + " │ │ └─ rs.NO52D LIKE 'EC%'\n" + + " │ │ THEN 3 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ THEN 2 (tinyint) WHEN AND\n" + + " │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN AND\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ rs.NO52D LIKE 'IC%'\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ Eq\n" + + " │ │ ├─ rs.VYO5E:1\n" + + " │ │ └─ CF (longtext)\n" + + " │ │ THEN 4 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0!null\n" + + " │ │ └─ Ki (longtext)\n" + + " │ │ THEN 1 (tinyint) WHEN Eq\n" + + " │ │ ├─ rs.NO52D:0!null\n" + + " │ │ └─ Kd (longtext)\n" + + " │ │ THEN 2 (tinyint) ELSE NULL (null) END as ADURZ, NULL (null) as FHCYT]\n" + + " │ └─ Filter\n" + + " │ ├─ Or\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ rs.VYO5E:1 IS NULL\n" + + " │ │ │ └─ NOT\n" + + " │ │ │ └─ InSubquery\n" + + " │ │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.VYO5E:1, rs.DKCAJ:2!null)\n" + + " │ │ │ └─ right: Subquery\n" + + " │ │ │ ├─ cacheable: true\n" + + " │ │ │ ├─ alias-string: select distinct NO52D, VYO5E, DKCAJ from SFEGG where VYO5E is not null\n" + + " │ │ │ └─ Distinct\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.VYO5E:6, sfegg.DKCAJ:7!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ NOT\n" + + " │ │ │ │ └─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: SFEGG\n" + + " │ │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ │ ├─ colSet: (48-53)\n" + + " │ │ │ └─ tableId: 6\n" + + " │ │ └─ AND\n" + + " │ │ ├─ rs.VYO5E:1 IS NULL\n" + + " │ │ └─ NOT\n" + + " │ │ └─ InSubquery\n" + + " │ │ ├─ left: TUPLE(rs.NO52D:0!null, rs.DKCAJ:2!null)\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: true\n" + + " │ │ ├─ alias-string: select distinct NO52D, DKCAJ from SFEGG where VYO5E is null\n" + + " │ │ └─ Distinct\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.NO52D:5!null, sfegg.DKCAJ:7!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ sfegg.VYO5E:6 IS NULL\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ ├─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ ├─ colSet: (54-59)\n" + + " │ │ └─ tableId: 7\n" + + " │ └─ SubqueryAlias\n" + + " │ ├─ name: rs\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (44-47)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Distinct\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tvtjs.NO52D:7!null as NO52D, tvtjs.VYO5E:9 as VYO5E, nt.id:30!null as DKCAJ, nt.DZLIM:31!null as F35MI]\n" + + " │ └─ LookupJoin\n" + + " │ ├─ LookupJoin\n" + + " │ │ ├─ TableAlias(tvtjs)\n" + + " │ │ │ └─ IndexedTableAccess(HU5A5)\n" + + " │ │ │ ├─ index: [HU5A5.id]\n" + + " │ │ │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ │ │ ├─ colSet: (7-19)\n" + + " │ │ │ ├─ tableId: 2\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: HU5A5\n" + + " │ │ │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + + " │ │ └─ TableAlias(nd)\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (20-36)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id dkcaj kng7t tw55n qrqxw ecxaj fgg57 zh72s fsk67 xqdyt tce7a iwv2h hpcms n5cc2 fhcyt etaq7 a75x7]\n" + + " │ └─ TableAlias(nt)\n" + + " │ └─ IndexedTableAccess(F35MI)\n" + + " │ ├─ index: [F35MI.id]\n" + + " │ ├─ keys: [nd.DKCAJ:14!null]\n" + + " │ ├─ colSet: (37-39)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: F35MI\n" + + " │ └─ columns: [id dzlim f3yue]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(Or\n" + + " │ ├─ InSubquery\n" + + " │ │ ├─ left: new.NO52D:1!null\n" + + " │ │ └─ right: Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXHZ\n" + + " │ │ ├─ columns: [svaz4]\n" + + " │ │ ├─ colSet: (13,14)\n" + + " │ │ └─ tableId: 3\n" + + " │ └─ InSubquery\n" + + " │ ├─ left: new.VYO5E:2\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (15,16)\n" + + " │ └─ tableId: 4\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(LessThanOrEqual\n" + + " ├─ new.ADURZ:4!null\n" + + " └─ 0 (int)\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = ADURZ must be positive., MYSQL_ERRNO = 1644\n" + "", }, { @@ -21425,279 +21399,278 @@ FROM HU5A5 TVTJS WHERE TVTJS.id IN ('1','2','3')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: FLQLP\n" + - " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + - " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + - " FOR EACH ROW\n" + - " BEGIN\n" + - " IF\n" + - " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + - " THEN\n" + - " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + - " END IF;\n" + - " IF\n" + - " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + - " THEN\n" + - " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + - " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + - " END IF;\n" + - " END//)\n" + - " ├─ Project\n" + - " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jdlna.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ jdlna.FTQLQ:26!null\n" + - " │ │ │ └─ tvtjs.TOFPN:1!null\n" + - " │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + - " │ │ ├─ colSet: (27-31)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JDLNA\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as FZ2R5, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [e2i7u.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ e2i7u.TW55N:26!null\n" + - " │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (33-49)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ tpxbu.BTXC5:26\n" + - " │ │ │ └─ tvtjs.LJLUM:5!null\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + - " │ │ ├─ colSet: (51-53)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.id:25!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.NO52D:26!null\n" + - " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:27\n" + - " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ AND\n" + - " │ │ │ │ ├─ sfegg.VYO5E:27 IS NULL\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ sfegg.DKCAJ:28!null\n" + - " │ │ │ └─ Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [nd.DKCAJ:31!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ nd.TW55N:32!null\n" + - " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ │ ├─ colSet: (61-77)\n" + - " │ │ │ ├─ tableId: 7\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + - " │ │ ├─ colSet: (55-60)\n" + - " │ │ ├─ tableId: 6\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + - " │ └─ Project\n" + - " │ ├─ columns: [tvtjs.id:0!null, tvtjs.TOFPN:1!null, tvtjs.I3VTA:2!null, tvtjs.SFJ6L:3, tvtjs.V5DPX:4!null, tvtjs.LJLUM:5!null, tvtjs.IDPK7:6!null, tvtjs.NO52D:7!null, tvtjs.ZRV3B:8!null, tvtjs.VYO5E:9, tvtjs.SWCQV:10!null, tvtjs.YKSSU:11, tvtjs.FHCYT:12, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [jdlna.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ jdlna.FTQLQ:14!null\n" + - " │ │ │ └─ tvtjs.TOFPN:1!null\n" + - " │ │ └─ IndexedTableAccess(JDLNA)\n" + - " │ │ ├─ index: [JDLNA.FTQLQ]\n" + - " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + - " │ │ ├─ colSet: (27-31)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: JDLNA\n" + - " │ │ └─ columns: [id ftqlq]\n" + - " │ │ as FZ2R5, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [e2i7u.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ e2i7u.TW55N:14!null\n" + - " │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ ├─ colSet: (33-49)\n" + - " │ │ ├─ tableId: 4\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: E2I7U\n" + - " │ │ └─ columns: [id tw55n]\n" + - " │ │ as LUEVY, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [tpxbu.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ Eq\n" + - " │ │ │ ├─ tpxbu.BTXC5:14\n" + - " │ │ │ └─ tvtjs.LJLUM:5!null\n" + - " │ │ └─ IndexedTableAccess(TPXBU)\n" + - " │ │ ├─ index: [TPXBU.BTXC5]\n" + - " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + - " │ │ ├─ colSet: (51-53)\n" + - " │ │ ├─ tableId: 5\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: TPXBU\n" + - " │ │ └─ columns: [id btxc5]\n" + - " │ │ as M22QN, Subquery\n" + - " │ │ ├─ cacheable: false\n" + - " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + - " │ │ └─ Project\n" + - " │ │ ├─ columns: [sfegg.id:13!null]\n" + - " │ │ └─ Filter\n" + - " │ │ ├─ AND\n" + - " │ │ │ ├─ AND\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.NO52D:14!null\n" + - " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Eq\n" + - " │ │ │ │ │ ├─ sfegg.VYO5E:15\n" + - " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ AND\n" + - " │ │ │ │ ├─ sfegg.VYO5E:15 IS NULL\n" + - " │ │ │ │ └─ Or\n" + - " │ │ │ │ ├─ Or\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + - " │ │ │ │ │ └─ Eq\n" + - " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ │ └─ N/A (longtext)\n" + - " │ │ │ │ └─ Eq\n" + - " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + - " │ │ │ │ └─ NA (longtext)\n" + - " │ │ │ └─ Eq\n" + - " │ │ │ ├─ sfegg.DKCAJ:16!null\n" + - " │ │ │ └─ Subquery\n" + - " │ │ │ ├─ cacheable: false\n" + - " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + - " │ │ │ └─ Project\n" + - " │ │ │ ├─ columns: [nd.DKCAJ:19!null]\n" + - " │ │ │ └─ Filter\n" + - " │ │ │ ├─ Eq\n" + - " │ │ │ │ ├─ nd.TW55N:20!null\n" + - " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + - " │ │ │ └─ TableAlias(nd)\n" + - " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + - " │ │ │ ├─ index: [E2I7U.TW55N]\n" + - " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + - " │ │ │ ├─ colSet: (61-77)\n" + - " │ │ │ ├─ tableId: 7\n" + - " │ │ │ └─ Table\n" + - " │ │ │ ├─ name: E2I7U\n" + - " │ │ │ └─ columns: [dkcaj tw55n]\n" + - " │ │ └─ IndexedTableAccess(SFEGG)\n" + - " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + - " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + - " │ │ ├─ colSet: (55-60)\n" + - " │ │ ├─ tableId: 6\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: SFEGG\n" + - " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + - " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + - " │ └─ TableAlias(tvtjs)\n" + - " │ └─ IndexedTableAccess(HU5A5)\n" + - " │ ├─ index: [HU5A5.id]\n" + - " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + - " │ ├─ colSet: (13-25)\n" + - " │ ├─ tableId: 2\n" + - " │ └─ Table\n" + - " │ ├─ name: HU5A5\n" + - " │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + - " └─ BEGIN .. END\n" + - " ├─ IF BLOCK\n" + - " │ └─ IF(InSubquery\n" + - " │ ├─ left: new.V5DPX:8!null\n" + - " │ └─ right: Subquery\n" + - " │ ├─ cacheable: false\n" + - " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + - " │ └─ Table\n" + - " │ ├─ name: TPXHZ\n" + - " │ ├─ columns: [svaz4]\n" + - " │ ├─ colSet: (25,26)\n" + - " │ └─ tableId: 3\n" + - " │ )\n" + - " │ └─ BLOCK\n" + - " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + - " └─ IF BLOCK\n" + - " └─ IF(NOT\n" + - " └─ IN\n" + - " ├─ left: new.ZRV3B:10!null\n" + - " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + - " )\n" + - " └─ BLOCK\n" + - " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + + ExpectedPlan: "Insert(id, FZ2R5, LUEVY, M22QN, OVE3E, NRURT, OCA7E, XMM6Q, V5DPX, S3Q3Y, ZRV3B, FHCYT)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: FLQLP\n" + + " │ └─ columns: [id fz2r5 luevy m22qn ove3e nrurt oca7e xmm6q v5dpx s3q3y zrv3b fhcyt]\n" + + " └─ Trigger(CREATE TRIGGER FLQLP_on_insert BEFORE INSERT ON FLQLP\n" + + " FOR EACH ROW\n" + + " BEGIN\n" + + " IF\n" + + " NEW.V5DPX IN (SELECT SVAZ4 FROM TPXHZ)\n" + + " THEN\n" + + " -- SET @custom_error_message = (SELECT error_message FROM trigger_helper_error_message WHERE DZLIM = 'SVAZ4');\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'String field contains invalid value, like empty string, ''none'', ''null'', ''n/a'', ''nan'' etc.';\n" + + " END IF;\n" + + " IF\n" + + " NEW.ZRV3B NOT IN ('=', '<=', '>=', '<', '>')\n" + + " THEN\n" + + " -- SET @custom_error_message = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " -- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = @custom_error_message;\n" + + " SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The ZRV3B must be on of the following: ''='', ''<='', ''>='', ''<'', ''>''.';\n" + + " END IF;\n" + + " END//)\n" + + " ├─ Project\n" + + " │ ├─ columns: [id:0!null, FZ2R5:1!null, LUEVY:2!null, M22QN:3!null, OVE3E:4!null, NRURT:5, OCA7E:6, XMM6Q:7, V5DPX:8!null, S3Q3Y:9!null, ZRV3B:10!null, FHCYT:11]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jdlna.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ jdlna.FTQLQ:26!null\n" + + " │ │ │ └─ tvtjs.TOFPN:1!null\n" + + " │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + + " │ │ ├─ colSet: (27-31)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JDLNA\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as FZ2R5, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [e2i7u.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ e2i7u.TW55N:26!null\n" + + " │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (33-49)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ tpxbu.BTXC5:26\n" + + " │ │ │ └─ tvtjs.LJLUM:5!null\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + + " │ │ ├─ colSet: (51-53)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.id:25!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.NO52D:26!null\n" + + " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:27\n" + + " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ AND\n" + + " │ │ │ │ ├─ sfegg.VYO5E:27 IS NULL\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ sfegg.DKCAJ:28!null\n" + + " │ │ │ └─ Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [nd.DKCAJ:31!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ nd.TW55N:32!null\n" + + " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ │ ├─ colSet: (61-77)\n" + + " │ │ │ ├─ tableId: 7\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + + " │ │ ├─ colSet: (55-60)\n" + + " │ │ ├─ tableId: 6\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + + " │ └─ Project\n" + + " │ ├─ columns: [tvtjs.id:0!null, tvtjs.TOFPN:1!null, tvtjs.I3VTA:2!null, tvtjs.SFJ6L:3, tvtjs.V5DPX:4!null, tvtjs.LJLUM:5!null, tvtjs.IDPK7:6!null, tvtjs.NO52D:7!null, tvtjs.ZRV3B:8!null, tvtjs.VYO5E:9, tvtjs.SWCQV:10!null, tvtjs.YKSSU:11, tvtjs.FHCYT:12, lpad(lower(concat(concat(hex((rand() * 4294967296)),lower(hex((rand() * 4294967296))),lower(hex((rand() * 4294967296)))))), 24, '0') as id, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from JDLNA where JDLNA.FTQLQ = TVTJS.TOFPN\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [jdlna.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ jdlna.FTQLQ:14!null\n" + + " │ │ │ └─ tvtjs.TOFPN:1!null\n" + + " │ │ └─ IndexedTableAccess(JDLNA)\n" + + " │ │ ├─ index: [JDLNA.FTQLQ]\n" + + " │ │ ├─ keys: [tvtjs.TOFPN:1!null]\n" + + " │ │ ├─ colSet: (27-31)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: JDLNA\n" + + " │ │ └─ columns: [id ftqlq]\n" + + " │ │ as FZ2R5, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from E2I7U where TW55N = TVTJS.I3VTA\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [e2i7u.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ e2i7u.TW55N:14!null\n" + + " │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ ├─ colSet: (33-49)\n" + + " │ │ ├─ tableId: 4\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: E2I7U\n" + + " │ │ └─ columns: [id tw55n]\n" + + " │ │ as LUEVY, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from TPXBU where BTXC5 = TVTJS.LJLUM\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [tpxbu.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ Eq\n" + + " │ │ │ ├─ tpxbu.BTXC5:14\n" + + " │ │ │ └─ tvtjs.LJLUM:5!null\n" + + " │ │ └─ IndexedTableAccess(TPXBU)\n" + + " │ │ ├─ index: [TPXBU.BTXC5]\n" + + " │ │ ├─ keys: [tvtjs.LJLUM:5!null]\n" + + " │ │ ├─ colSet: (51-53)\n" + + " │ │ ├─ tableId: 5\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: TPXBU\n" + + " │ │ └─ columns: [id btxc5]\n" + + " │ │ as M22QN, Subquery\n" + + " │ │ ├─ cacheable: false\n" + + " │ │ ├─ alias-string: select id from SFEGG where SFEGG.NO52D = TVTJS.NO52D and (SFEGG.VYO5E = TVTJS.VYO5E or (SFEGG.VYO5E is null and (TVTJS.VYO5E is null or TVTJS.VYO5E = 'N/A' or TVTJS.VYO5E = 'NA'))) and SFEGG.DKCAJ = (select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA)\n" + + " │ │ └─ Project\n" + + " │ │ ├─ columns: [sfegg.id:13!null]\n" + + " │ │ └─ Filter\n" + + " │ │ ├─ AND\n" + + " │ │ │ ├─ AND\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.NO52D:14!null\n" + + " │ │ │ │ │ └─ tvtjs.NO52D:7!null\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Eq\n" + + " │ │ │ │ │ ├─ sfegg.VYO5E:15\n" + + " │ │ │ │ │ └─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ AND\n" + + " │ │ │ │ ├─ sfegg.VYO5E:15 IS NULL\n" + + " │ │ │ │ └─ Or\n" + + " │ │ │ │ ├─ Or\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9 IS NULL\n" + + " │ │ │ │ │ └─ Eq\n" + + " │ │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ │ └─ N/A (longtext)\n" + + " │ │ │ │ └─ Eq\n" + + " │ │ │ │ ├─ tvtjs.VYO5E:9\n" + + " │ │ │ │ └─ NA (longtext)\n" + + " │ │ │ └─ Eq\n" + + " │ │ │ ├─ sfegg.DKCAJ:16!null\n" + + " │ │ │ └─ Subquery\n" + + " │ │ │ ├─ cacheable: false\n" + + " │ │ │ ├─ alias-string: select nd.DKCAJ from E2I7U as nd where nd.TW55N = TVTJS.I3VTA\n" + + " │ │ │ └─ Project\n" + + " │ │ │ ├─ columns: [nd.DKCAJ:19!null]\n" + + " │ │ │ └─ Filter\n" + + " │ │ │ ├─ Eq\n" + + " │ │ │ │ ├─ nd.TW55N:20!null\n" + + " │ │ │ │ └─ tvtjs.I3VTA:2!null\n" + + " │ │ │ └─ TableAlias(nd)\n" + + " │ │ │ └─ IndexedTableAccess(E2I7U)\n" + + " │ │ │ ├─ index: [E2I7U.TW55N]\n" + + " │ │ │ ├─ keys: [tvtjs.I3VTA:2!null]\n" + + " │ │ │ ├─ colSet: (61-77)\n" + + " │ │ │ ├─ tableId: 7\n" + + " │ │ │ └─ Table\n" + + " │ │ │ ├─ name: E2I7U\n" + + " │ │ │ └─ columns: [dkcaj tw55n]\n" + + " │ │ └─ IndexedTableAccess(SFEGG)\n" + + " │ │ ├─ index: [SFEGG.NO52D,SFEGG.VYO5E,SFEGG.DKCAJ]\n" + + " │ │ ├─ keys: [tvtjs.NO52D:7!null]\n" + + " │ │ ├─ colSet: (55-60)\n" + + " │ │ ├─ tableId: 6\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: SFEGG\n" + + " │ │ └─ columns: [id no52d vyo5e dkcaj adurz fhcyt]\n" + + " │ │ as OVE3E, NULL (null) as NRURT, NULL (null) as OCA7E, tvtjs.id:0!null as XMM6Q, tvtjs.V5DPX:4!null as V5DPX, (tvtjs.IDPK7:6!null + 0 (decimal(2,1))) as S3Q3Y, tvtjs.ZRV3B:8!null as ZRV3B, tvtjs.FHCYT:12 as FHCYT]\n" + + " │ └─ TableAlias(tvtjs)\n" + + " │ └─ IndexedTableAccess(HU5A5)\n" + + " │ ├─ index: [HU5A5.id]\n" + + " │ ├─ static: [{[1, 1]}, {[2, 2]}, {[3, 3]}]\n" + + " │ ├─ colSet: (13-25)\n" + + " │ ├─ tableId: 2\n" + + " │ └─ Table\n" + + " │ ├─ name: HU5A5\n" + + " │ └─ columns: [id tofpn i3vta sfj6l v5dpx ljlum idpk7 no52d zrv3b vyo5e swcqv ykssu fhcyt]\n" + + " └─ BEGIN .. END\n" + + " ├─ IF BLOCK\n" + + " │ └─ IF(InSubquery\n" + + " │ ├─ left: new.V5DPX:8!null\n" + + " │ └─ right: Subquery\n" + + " │ ├─ cacheable: false\n" + + " │ ├─ alias-string: select SVAZ4 from TPXHZ\n" + + " │ └─ Table\n" + + " │ ├─ name: TPXHZ\n" + + " │ ├─ columns: [svaz4]\n" + + " │ ├─ colSet: (25,26)\n" + + " │ └─ tableId: 3\n" + + " │ )\n" + + " │ └─ BLOCK\n" + + " │ └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = String field contains invalid value, like empty string, 'none', 'null', 'n/a', 'nan' etc., MYSQL_ERRNO = 1644\n" + + " └─ IF BLOCK\n" + + " └─ IF(NOT\n" + + " └─ IN\n" + + " ├─ left: new.ZRV3B:10!null\n" + + " └─ right: TUPLE(= (longtext), <= (longtext), >= (longtext), < (longtext), > (longtext))\n" + + " )\n" + + " └─ BLOCK\n" + + " └─ SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = The ZRV3B must be on of the following: '=', '<=', '>=', '<', '>'., MYSQL_ERRNO = 1644\n" + "", }, } diff --git a/enginetest/queries/query_plans.go b/enginetest/queries/query_plans.go index 2281114180..0698c70e56 100644 --- a/enginetest/queries/query_plans.go +++ b/enginetest/queries/query_plans.go @@ -6695,39 +6695,38 @@ inner join pq on true }, { Query: `INSERT INTO mytable(i,s) SELECT t1.i, 'hello' FROM mytable t1 JOIN mytable t2 on t1.i = t2.i + 1 where t1.i = 2 and t2.i = 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(i, s)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: mytable\n" + - " │ └─ columns: [i s]\n" + + ExpectedPlan: "Insert(i, s)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: mytable\n" + + " │ └─ columns: [i s]\n" + + " └─ Project\n" + + " ├─ columns: [i:0!null, s:1!null]\n" + " └─ Project\n" + - " ├─ columns: [i:0!null, s:1!null]\n" + - " └─ Project\n" + - " ├─ columns: [t1.i:1!null, hello (longtext)]\n" + - " └─ InnerJoin\n" + - " ├─ Eq\n" + - " │ ├─ t1.i:1!null\n" + - " │ └─ (t2.i:0!null + 1 (tinyint))\n" + - " ├─ TableAlias(t2)\n" + - " │ └─ IndexedTableAccess(mytable)\n" + - " │ ├─ index: [mytable.i]\n" + - " │ ├─ static: [{[1, 1]}]\n" + - " │ ├─ colSet: (5,6)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: mytable\n" + - " │ └─ columns: [i]\n" + - " └─ TableAlias(t1)\n" + - " └─ IndexedTableAccess(mytable)\n" + - " ├─ index: [mytable.i]\n" + - " ├─ static: [{[2, 2]}]\n" + - " ├─ colSet: (3,4)\n" + - " ├─ tableId: 2\n" + - " └─ Table\n" + - " ├─ name: mytable\n" + - " └─ columns: [i]\n" + + " ├─ columns: [t1.i:1!null, hello (longtext)]\n" + + " └─ InnerJoin\n" + + " ├─ Eq\n" + + " │ ├─ t1.i:1!null\n" + + " │ └─ (t2.i:0!null + 1 (tinyint))\n" + + " ├─ TableAlias(t2)\n" + + " │ └─ IndexedTableAccess(mytable)\n" + + " │ ├─ index: [mytable.i]\n" + + " │ ├─ static: [{[1, 1]}]\n" + + " │ ├─ colSet: (5,6)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: mytable\n" + + " │ └─ columns: [i]\n" + + " └─ TableAlias(t1)\n" + + " └─ IndexedTableAccess(mytable)\n" + + " ├─ index: [mytable.i]\n" + + " ├─ static: [{[2, 2]}]\n" + + " ├─ colSet: (3,4)\n" + + " ├─ tableId: 2\n" + + " └─ Table\n" + + " ├─ name: mytable\n" + + " └─ columns: [i]\n" + "", }, { @@ -7954,58 +7953,57 @@ inner join pq on true }, { Query: `INSERT INTO mytable SELECT sub.i + 10, ot.s2 FROM othertable ot INNER JOIN (SELECT i, i2, s2 FROM mytable INNER JOIN othertable ON i = i2) sub ON sub.i = ot.i2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(i, s)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: mytable\n" + - " │ └─ columns: [i s]\n" + + ExpectedPlan: "Insert(i, s)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: mytable\n" + + " │ └─ columns: [i s]\n" + + " └─ Project\n" + + " ├─ columns: [i:0!null, s:1!null]\n" + " └─ Project\n" + - " ├─ columns: [i:0!null, s:1!null]\n" + - " └─ Project\n" + - " ├─ columns: [(sub.i:0!null + 10 (tinyint)) as sub.i + 10, ot.s2:3!null]\n" + - " └─ HashJoin\n" + - " ├─ Eq\n" + - " │ ├─ sub.i:0!null\n" + - " │ └─ ot.i2:4!null\n" + - " ├─ SubqueryAlias\n" + - " │ ├─ name: sub\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (9-11)\n" + - " │ ├─ tableId: 5\n" + - " │ └─ Project\n" + - " │ ├─ columns: [mytable.i:0!null, othertable.i2:2!null, othertable.s2:1!null]\n" + - " │ └─ MergeJoin\n" + - " │ ├─ cmp: Eq\n" + - " │ │ ├─ mytable.i:0!null\n" + - " │ │ └─ othertable.i2:2!null\n" + - " │ ├─ IndexedTableAccess(mytable)\n" + - " │ │ ├─ index: [mytable.i,mytable.s]\n" + - " │ │ ├─ static: [{[NULL, ∞), [NULL, ∞)}]\n" + - " │ │ ├─ colSet: (5,6)\n" + - " │ │ ├─ tableId: 3\n" + - " │ │ └─ Table\n" + - " │ │ ├─ name: mytable\n" + - " │ │ └─ columns: [i]\n" + - " │ └─ IndexedTableAccess(othertable)\n" + - " │ ├─ index: [othertable.i2]\n" + - " │ ├─ static: [{[NULL, ∞)}]\n" + - " │ ├─ colSet: (7,8)\n" + - " │ ├─ tableId: 4\n" + - " │ └─ Table\n" + - " │ ├─ name: othertable\n" + - " │ └─ columns: [s2 i2]\n" + - " └─ HashLookup\n" + - " ├─ left-key: TUPLE(sub.i:0!null)\n" + - " ├─ right-key: TUPLE(ot.i2:1!null)\n" + - " └─ TableAlias(ot)\n" + - " └─ ProcessTable\n" + - " └─ Table\n" + - " ├─ name: othertable\n" + - " └─ columns: [s2 i2]\n" + + " ├─ columns: [(sub.i:0!null + 10 (tinyint)) as sub.i + 10, ot.s2:3!null]\n" + + " └─ HashJoin\n" + + " ├─ Eq\n" + + " │ ├─ sub.i:0!null\n" + + " │ └─ ot.i2:4!null\n" + + " ├─ SubqueryAlias\n" + + " │ ├─ name: sub\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (9-11)\n" + + " │ ├─ tableId: 5\n" + + " │ └─ Project\n" + + " │ ├─ columns: [mytable.i:0!null, othertable.i2:2!null, othertable.s2:1!null]\n" + + " │ └─ MergeJoin\n" + + " │ ├─ cmp: Eq\n" + + " │ │ ├─ mytable.i:0!null\n" + + " │ │ └─ othertable.i2:2!null\n" + + " │ ├─ IndexedTableAccess(mytable)\n" + + " │ │ ├─ index: [mytable.i,mytable.s]\n" + + " │ │ ├─ static: [{[NULL, ∞), [NULL, ∞)}]\n" + + " │ │ ├─ colSet: (5,6)\n" + + " │ │ ├─ tableId: 3\n" + + " │ │ └─ Table\n" + + " │ │ ├─ name: mytable\n" + + " │ │ └─ columns: [i]\n" + + " │ └─ IndexedTableAccess(othertable)\n" + + " │ ├─ index: [othertable.i2]\n" + + " │ ├─ static: [{[NULL, ∞)}]\n" + + " │ ├─ colSet: (7,8)\n" + + " │ ├─ tableId: 4\n" + + " │ └─ Table\n" + + " │ ├─ name: othertable\n" + + " │ └─ columns: [s2 i2]\n" + + " └─ HashLookup\n" + + " ├─ left-key: TUPLE(sub.i:0!null)\n" + + " ├─ right-key: TUPLE(ot.i2:1!null)\n" + + " └─ TableAlias(ot)\n" + + " └─ ProcessTable\n" + + " └─ Table\n" + + " ├─ name: othertable\n" + + " └─ columns: [s2 i2]\n" + "", }, { @@ -16930,8 +16928,34 @@ inner join pq on true }, { Query: `DELETE FROM two_pk WHERE c1 > 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + ExpectedPlan: "Delete\n" + + " └─ Filter\n" + + " ├─ GreaterThan\n" + + " │ ├─ two_pk.c1:2!null\n" + + " │ └─ 1 (tinyint)\n" + + " └─ ProcessTable\n" + + " └─ Table\n" + + " ├─ name: two_pk\n" + + " └─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + + "", + }, + { + Query: `DELETE FROM two_pk WHERE pk1 = 1 AND pk2 = 2`, + ExpectedPlan: "Delete\n" + + " └─ IndexedTableAccess(two_pk)\n" + + " ├─ index: [two_pk.pk1,two_pk.pk2]\n" + + " ├─ static: [{[1, 1], [2, 2]}]\n" + + " ├─ colSet: (1-7)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: two_pk\n" + + " └─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + + "", + }, + { + Query: `UPDATE two_pk SET c1 = 1 WHERE c1 > 1`, + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET two_pk.c1:2!null = 1 (tinyint))\n" + " └─ Filter\n" + " ├─ GreaterThan\n" + " │ ├─ two_pk.c1:2!null\n" + @@ -16943,9 +16967,9 @@ inner join pq on true "", }, { - Query: `DELETE FROM two_pk WHERE pk1 = 1 AND pk2 = 2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Delete\n" + + Query: `UPDATE two_pk SET c1 = 1 WHERE pk1 = 1 AND pk2 = 2`, + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET two_pk.c1:2!null = 1 (tinyint))\n" + " └─ IndexedTableAccess(two_pk)\n" + " ├─ index: [two_pk.pk1,two_pk.pk2]\n" + " ├─ static: [{[1, 1], [2, 2]}]\n" + @@ -16957,94 +16981,62 @@ inner join pq on true "", }, { - Query: `UPDATE two_pk SET c1 = 1 WHERE c1 > 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET two_pk.c1:2!null = 1 (tinyint))\n" + - " └─ Filter\n" + - " ├─ GreaterThan\n" + - " │ ├─ two_pk.c1:2!null\n" + - " │ └─ 1 (tinyint)\n" + - " └─ ProcessTable\n" + + Query: `UPDATE /*+ JOIN_ORDER(two_pk, one_pk) */ one_pk JOIN two_pk on one_pk.pk = two_pk.pk1 SET two_pk.c1 = two_pk.c1 + 1`, + ExpectedPlan: "Update\n" + + " └─ Update Join\n" + + " └─ UpdateSource(SET two_pk.c1:8!null = (two_pk.c1:8!null + 1 (tinyint)))\n" + + " └─ MergeJoin\n" + + " ├─ cmp: Eq\n" + + " │ ├─ one_pk.pk:0!null\n" + + " │ └─ two_pk.pk1:6!null\n" + + " ├─ IndexedTableAccess(one_pk)\n" + + " │ ├─ index: [one_pk.pk]\n" + + " │ ├─ static: [{[NULL, ∞)}]\n" + + " │ ├─ colSet: (1-6)\n" + + " │ ├─ tableId: 1\n" + + " │ └─ Table\n" + + " │ ├─ name: one_pk\n" + + " │ └─ columns: [pk c1 c2 c3 c4 c5]\n" + + " └─ IndexedTableAccess(two_pk)\n" + + " ├─ index: [two_pk.pk1,two_pk.pk2]\n" + + " ├─ static: [{[NULL, ∞), [NULL, ∞)}]\n" + + " ├─ colSet: (7-13)\n" + + " ├─ tableId: 2\n" + " └─ Table\n" + " ├─ name: two_pk\n" + " └─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + "", }, - { - Query: `UPDATE two_pk SET c1 = 1 WHERE pk1 = 1 AND pk2 = 2`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET two_pk.c1:2!null = 1 (tinyint))\n" + - " └─ IndexedTableAccess(two_pk)\n" + - " ├─ index: [two_pk.pk1,two_pk.pk2]\n" + - " ├─ static: [{[1, 1], [2, 2]}]\n" + - " ├─ colSet: (1-7)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: two_pk\n" + - " └─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + - "", - }, - { - Query: `UPDATE /*+ JOIN_ORDER(two_pk, one_pk) */ one_pk JOIN two_pk on one_pk.pk = two_pk.pk1 SET two_pk.c1 = two_pk.c1 + 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ Update Join\n" + - " └─ UpdateSource(SET two_pk.c1:8!null = (two_pk.c1:8!null + 1 (tinyint)))\n" + - " └─ MergeJoin\n" + - " ├─ cmp: Eq\n" + - " │ ├─ one_pk.pk:0!null\n" + - " │ └─ two_pk.pk1:6!null\n" + - " ├─ IndexedTableAccess(one_pk)\n" + - " │ ├─ index: [one_pk.pk]\n" + - " │ ├─ static: [{[NULL, ∞)}]\n" + - " │ ├─ colSet: (1-6)\n" + - " │ ├─ tableId: 1\n" + - " │ └─ Table\n" + - " │ ├─ name: one_pk\n" + - " │ └─ columns: [pk c1 c2 c3 c4 c5]\n" + - " └─ IndexedTableAccess(two_pk)\n" + - " ├─ index: [two_pk.pk1,two_pk.pk2]\n" + - " ├─ static: [{[NULL, ∞), [NULL, ∞)}]\n" + - " ├─ colSet: (7-13)\n" + - " ├─ tableId: 2\n" + - " └─ Table\n" + - " ├─ name: two_pk\n" + - " └─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + - "", - }, { Query: `UPDATE one_pk INNER JOIN (SELECT * FROM two_pk) as t2 on one_pk.pk = t2.pk1 SET one_pk.c1 = one_pk.c1 + 1, one_pk.c2 = one_pk.c2 + 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ Update Join\n" + - " └─ UpdateSource(SET one_pk.c1:1 = (one_pk.c1:1 + 1 (tinyint)),SET one_pk.c2:2 = (one_pk.c2:2 + 1 (tinyint)))\n" + - " └─ Project\n" + - " ├─ columns: [one_pk.pk:7!null, one_pk.c1:8, one_pk.c2:9, one_pk.c3:10, one_pk.c4:11, one_pk.c5:12, t2.pk1:0!null, t2.pk2:1!null, t2.c1:2!null, t2.c2:3!null, t2.c3:4!null, t2.c4:5!null, t2.c5:6!null]\n" + - " └─ HashJoin\n" + - " ├─ Eq\n" + - " │ ├─ one_pk.pk:7!null\n" + - " │ └─ t2.pk1:0!null\n" + - " ├─ SubqueryAlias\n" + - " │ ├─ name: t2\n" + - " │ ├─ outerVisibility: false\n" + - " │ ├─ isLateral: false\n" + - " │ ├─ cacheable: true\n" + - " │ ├─ colSet: (14-20)\n" + - " │ ├─ tableId: 3\n" + - " │ └─ Table\n" + - " │ ├─ name: two_pk\n" + - " │ ├─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + - " │ ├─ colSet: (7-13)\n" + - " │ └─ tableId: 2\n" + - " └─ HashLookup\n" + - " ├─ left-key: TUPLE(t2.pk1:0!null)\n" + - " ├─ right-key: TUPLE(one_pk.pk:0!null)\n" + - " └─ ProcessTable\n" + - " └─ Table\n" + - " ├─ name: one_pk\n" + - " └─ columns: [pk c1 c2 c3 c4 c5]\n" + + ExpectedPlan: "Update\n" + + " └─ Update Join\n" + + " └─ UpdateSource(SET one_pk.c1:1 = (one_pk.c1:1 + 1 (tinyint)),SET one_pk.c2:2 = (one_pk.c2:2 + 1 (tinyint)))\n" + + " └─ Project\n" + + " ├─ columns: [one_pk.pk:7!null, one_pk.c1:8, one_pk.c2:9, one_pk.c3:10, one_pk.c4:11, one_pk.c5:12, t2.pk1:0!null, t2.pk2:1!null, t2.c1:2!null, t2.c2:3!null, t2.c3:4!null, t2.c4:5!null, t2.c5:6!null]\n" + + " └─ HashJoin\n" + + " ├─ Eq\n" + + " │ ├─ one_pk.pk:7!null\n" + + " │ └─ t2.pk1:0!null\n" + + " ├─ SubqueryAlias\n" + + " │ ├─ name: t2\n" + + " │ ├─ outerVisibility: false\n" + + " │ ├─ isLateral: false\n" + + " │ ├─ cacheable: true\n" + + " │ ├─ colSet: (14-20)\n" + + " │ ├─ tableId: 3\n" + + " │ └─ Table\n" + + " │ ├─ name: two_pk\n" + + " │ ├─ columns: [pk1 pk2 c1 c2 c3 c4 c5]\n" + + " │ ├─ colSet: (7-13)\n" + + " │ └─ tableId: 2\n" + + " └─ HashLookup\n" + + " ├─ left-key: TUPLE(t2.pk1:0!null)\n" + + " ├─ right-key: TUPLE(one_pk.pk:0!null)\n" + + " └─ ProcessTable\n" + + " └─ Table\n" + + " ├─ name: one_pk\n" + + " └─ columns: [pk c1 c2 c3 c4 c5]\n" + "", }, { diff --git a/enginetest/queries/tpcc_plans.go b/enginetest/queries/tpcc_plans.go index 665b65b6fb..13b2e00a1d 100644 --- a/enginetest/queries/tpcc_plans.go +++ b/enginetest/queries/tpcc_plans.go @@ -108,45 +108,42 @@ SELECT c_discount, c_last, c_credit, w_tax FROM customer2, warehouse2 WHERE w_id }, { Query: `UPDATE district2 SET d_next_o_id = 3002 WHERE d_id = 9 AND d_w_id= 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET district2.d_next_o_id:10 = 3002 (smallint))\n" + - " └─ IndexedTableAccess(district2)\n" + - " ├─ index: [district2.d_w_id,district2.d_id]\n" + - " ├─ static: [{[1, 1], [9, 9]}]\n" + - " ├─ colSet: (1-11)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: district2\n" + - " └─ columns: [d_id d_w_id d_name d_street_1 d_street_2 d_city d_state d_zip d_tax d_ytd d_next_o_id]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET district2.d_next_o_id:10 = 3002 (smallint))\n" + + " └─ IndexedTableAccess(district2)\n" + + " ├─ index: [district2.d_w_id,district2.d_id]\n" + + " ├─ static: [{[1, 1], [9, 9]}]\n" + + " ├─ colSet: (1-11)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: district2\n" + + " └─ columns: [d_id d_w_id d_name d_street_1 d_street_2 d_city d_state d_zip d_tax d_ytd d_next_o_id]\n" + "", }, { Query: `INSERT INTO orders2 (o_id, o_d_id, o_w_id, o_c_id, o_entry_d, o_ol_cnt, o_all_local) VALUES (3001,9,1,2151,NOW(),12,1)`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(o_id, o_d_id, o_w_id, o_c_id, o_entry_d, o_ol_cnt, o_all_local)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: orders2\n" + - " │ └─ columns: [o_id o_d_id o_w_id o_c_id o_entry_d o_carrier_id o_ol_cnt o_all_local]\n" + - " └─ Project\n" + - " ├─ columns: [o_id:0!null, o_d_id:1!null, o_w_id:2!null, o_c_id:3, o_entry_d:4, , o_ol_cnt:5, o_all_local:6]\n" + - " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),2151 (smallint),NOW(),12 (tinyint),1 (tinyint)])\n" + + ExpectedPlan: "Insert(o_id, o_d_id, o_w_id, o_c_id, o_entry_d, o_ol_cnt, o_all_local)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: orders2\n" + + " │ └─ columns: [o_id o_d_id o_w_id o_c_id o_entry_d o_carrier_id o_ol_cnt o_all_local]\n" + + " └─ Project\n" + + " ├─ columns: [o_id:0!null, o_d_id:1!null, o_w_id:2!null, o_c_id:3, o_entry_d:4, , o_ol_cnt:5, o_all_local:6]\n" + + " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),2151 (smallint),NOW(),12 (tinyint),1 (tinyint)])\n" + "", }, { Query: `INSERT INTO new_orders2 (no_o_id, no_d_id, no_w_id) VALUES (3001,9,1)`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(no_o_id, no_d_id, no_w_id)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: new_orders2\n" + - " │ └─ columns: [no_o_id no_d_id no_w_id]\n" + - " └─ Project\n" + - " ├─ columns: [no_o_id:0!null, no_d_id:1!null, no_w_id:2!null]\n" + - " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint)])\n" + + ExpectedPlan: "Insert(no_o_id, no_d_id, no_w_id)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: new_orders2\n" + + " │ └─ columns: [no_o_id no_d_id no_w_id]\n" + + " └─ Project\n" + + " ├─ columns: [no_o_id:0!null, no_d_id:1!null, no_w_id:2!null]\n" + + " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint)])\n" + "", }, { @@ -207,32 +204,30 @@ SELECT c_discount, c_last, c_credit, w_tax FROM customer2, warehouse2 WHERE w_id }, { Query: `UPDATE stock2 SET s_quantity = 39 WHERE s_i_id = 2532 AND s_w_id= 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET stock2.s_quantity:2 = 39 (tinyint))\n" + - " └─ IndexedTableAccess(stock2)\n" + - " ├─ index: [stock2.s_w_id,stock2.s_i_id]\n" + - " ├─ static: [{[1, 1], [2532, 2532]}]\n" + - " ├─ colSet: (1-17)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: stock2\n" + - " └─ columns: [s_i_id s_w_id s_quantity s_dist_01 s_dist_02 s_dist_03 s_dist_04 s_dist_05 s_dist_06 s_dist_07 s_dist_08 s_dist_09 s_dist_10 s_ytd s_order_cnt s_remote_cnt s_data]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET stock2.s_quantity:2 = 39 (tinyint))\n" + + " └─ IndexedTableAccess(stock2)\n" + + " ├─ index: [stock2.s_w_id,stock2.s_i_id]\n" + + " ├─ static: [{[1, 1], [2532, 2532]}]\n" + + " ├─ colSet: (1-17)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: stock2\n" + + " └─ columns: [s_i_id s_w_id s_quantity s_dist_01 s_dist_02 s_dist_03 s_dist_04 s_dist_05 s_dist_06 s_dist_07 s_dist_08 s_dist_09 s_dist_10 s_ytd s_order_cnt s_remote_cnt s_data]\n" + "", }, { Query: `INSERT INTO order_line2 (ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) VALUES ( 3001,9,1,1,2532,1,5,301,'kkkkkkkkkkkkkkkkkkkkkkkk')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: order_line2\n" + - " │ └─ columns: [ol_o_id ol_d_id ol_w_id ol_number ol_i_id ol_supply_w_id ol_delivery_d ol_quantity ol_amount ol_dist_info]\n" + - " └─ Project\n" + - " ├─ columns: [ol_o_id:0!null, ol_d_id:1!null, ol_w_id:2!null, ol_number:3!null, ol_i_id:4, ol_supply_w_id:5, , ol_quantity:6, ol_amount:7, ol_dist_info:8]\n" + - " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),1 (tinyint),2532 (smallint),1 (tinyint),5 (tinyint),301 (smallint),kkkkkkkkkkkkkkkkkkkkkkkk (longtext)])\n" + + ExpectedPlan: "Insert(ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: order_line2\n" + + " │ └─ columns: [ol_o_id ol_d_id ol_w_id ol_number ol_i_id ol_supply_w_id ol_delivery_d ol_quantity ol_amount ol_dist_info]\n" + + " └─ Project\n" + + " ├─ columns: [ol_o_id:0!null, ol_d_id:1!null, ol_w_id:2!null, ol_number:3!null, ol_i_id:4, ol_supply_w_id:5, , ol_quantity:6, ol_amount:7, ol_dist_info:8]\n" + + " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),1 (tinyint),2532 (smallint),1 (tinyint),5 (tinyint),301 (smallint),kkkkkkkkkkkkkkkkkkkkkkkk (longtext)])\n" + "", }, { @@ -295,49 +290,46 @@ SELECT i_price, i_name, i_data FROM item2 WHERE i_id = 2532`, }, { Query: `UPDATE stock2 SET s_quantity = 5 WHERE s_i_id = 64568 AND s_w_id= 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET stock2.s_quantity:2 = 5 (tinyint))\n" + - " └─ IndexedTableAccess(stock2)\n" + - " ├─ index: [stock2.s_w_id,stock2.s_i_id]\n" + - " ├─ static: [{[1, 1], [64568, 64568]}]\n" + - " ├─ colSet: (1-17)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: stock2\n" + - " └─ columns: [s_i_id s_w_id s_quantity s_dist_01 s_dist_02 s_dist_03 s_dist_04 s_dist_05 s_dist_06 s_dist_07 s_dist_08 s_dist_09 s_dist_10 s_ytd s_order_cnt s_remote_cnt s_data]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET stock2.s_quantity:2 = 5 (tinyint))\n" + + " └─ IndexedTableAccess(stock2)\n" + + " ├─ index: [stock2.s_w_id,stock2.s_i_id]\n" + + " ├─ static: [{[1, 1], [64568, 64568]}]\n" + + " ├─ colSet: (1-17)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: stock2\n" + + " └─ columns: [s_i_id s_w_id s_quantity s_dist_01 s_dist_02 s_dist_03 s_dist_04 s_dist_05 s_dist_06 s_dist_07 s_dist_08 s_dist_09 s_dist_10 s_ytd s_order_cnt s_remote_cnt s_data]\n" + "", }, { Query: `INSERT INTO order_line2 (ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info) VALUES ( 3001,9,1,11,64568,1,7,298,'oooooooooooooooooooooooo')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: order_line2\n" + - " │ └─ columns: [ol_o_id ol_d_id ol_w_id ol_number ol_i_id ol_supply_w_id ol_delivery_d ol_quantity ol_amount ol_dist_info]\n" + - " └─ Project\n" + - " ├─ columns: [ol_o_id:0!null, ol_d_id:1!null, ol_w_id:2!null, ol_number:3!null, ol_i_id:4, ol_supply_w_id:5, , ol_quantity:6, ol_amount:7, ol_dist_info:8]\n" + - " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),11 (tinyint),64568 (smallint unsigned),1 (tinyint),7 (tinyint),298 (smallint),oooooooooooooooooooooooo (longtext)])\n" + + ExpectedPlan: "Insert(ol_o_id, ol_d_id, ol_w_id, ol_number, ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_dist_info)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: order_line2\n" + + " │ └─ columns: [ol_o_id ol_d_id ol_w_id ol_number ol_i_id ol_supply_w_id ol_delivery_d ol_quantity ol_amount ol_dist_info]\n" + + " └─ Project\n" + + " ├─ columns: [ol_o_id:0!null, ol_d_id:1!null, ol_w_id:2!null, ol_number:3!null, ol_i_id:4, ol_supply_w_id:5, , ol_quantity:6, ol_amount:7, ol_dist_info:8]\n" + + " └─ Values([3001 (smallint),9 (tinyint),1 (tinyint),11 (tinyint),64568 (smallint unsigned),1 (tinyint),7 (tinyint),298 (smallint),oooooooooooooooooooooooo (longtext)])\n" + "", }, { Query: ` -- cycle 2 UPDATE warehouse2 SET w_ytd = w_ytd + 1767 WHERE w_id = 1`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET warehouse2.w_ytd:8 = (warehouse2.w_ytd:8 + 1767 (smallint)))\n" + - " └─ IndexedTableAccess(warehouse2)\n" + - " ├─ index: [warehouse2.w_id]\n" + - " ├─ static: [{[1, 1]}]\n" + - " ├─ colSet: (1-9)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: warehouse2\n" + - " └─ columns: [w_id w_name w_street_1 w_street_2 w_city w_state w_zip w_tax w_ytd]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET warehouse2.w_ytd:8 = (warehouse2.w_ytd:8 + 1767 (smallint)))\n" + + " └─ IndexedTableAccess(warehouse2)\n" + + " ├─ index: [warehouse2.w_id]\n" + + " ├─ static: [{[1, 1]}]\n" + + " ├─ colSet: (1-9)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: warehouse2\n" + + " └─ columns: [w_id w_name w_street_1 w_street_2 w_city w_state w_zip w_tax w_ytd]\n" + "", }, { @@ -370,17 +362,16 @@ UPDATE warehouse2 SET w_ytd = w_ytd + 1767 WHERE w_id = 1`, }, { Query: `UPDATE district2 SET d_ytd = d_ytd + 1767 WHERE d_w_id = 1 AND d_id= 8`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET district2.d_ytd:9 = (district2.d_ytd:9 + 1767 (smallint)))\n" + - " └─ IndexedTableAccess(district2)\n" + - " ├─ index: [district2.d_w_id,district2.d_id]\n" + - " ├─ static: [{[1, 1], [8, 8]}]\n" + - " ├─ colSet: (1-11)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: district2\n" + - " └─ columns: [d_id d_w_id d_name d_street_1 d_street_2 d_city d_state d_zip d_tax d_ytd d_next_o_id]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET district2.d_ytd:9 = (district2.d_ytd:9 + 1767 (smallint)))\n" + + " └─ IndexedTableAccess(district2)\n" + + " ├─ index: [district2.d_w_id,district2.d_id]\n" + + " ├─ static: [{[1, 1], [8, 8]}]\n" + + " ├─ colSet: (1-11)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: district2\n" + + " └─ columns: [d_id d_w_id d_name d_street_1 d_street_2 d_city d_state d_zip d_tax d_ytd d_next_o_id]\n" + "", }, { @@ -509,31 +500,29 @@ UPDATE warehouse2 SET w_ytd = w_ytd + 1767 WHERE w_id = 1`, }, { Query: `UPDATE customer2 SET c_balance=-1777.000000, c_ytd_payment=1777.000000 WHERE c_w_id = 1 AND c_d_id=5 AND c_id=1838`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Update\n" + - " └─ UpdateSource(SET customer2.c_balance:16 = -1777.000000,SET customer2.c_ytd_payment:17 = 1777 (decimal(10,6)))\n" + - " └─ IndexedTableAccess(customer2)\n" + - " ├─ index: [customer2.c_w_id,customer2.c_d_id,customer2.c_id]\n" + - " ├─ static: [{[1, 1], [5, 5], [1838, 1838]}]\n" + - " ├─ colSet: (1-21)\n" + - " ├─ tableId: 1\n" + - " └─ Table\n" + - " ├─ name: customer2\n" + - " └─ columns: [c_id c_d_id c_w_id c_first c_middle c_last c_street_1 c_street_2 c_city c_state c_zip c_phone c_since c_credit c_credit_lim c_discount c_balance c_ytd_payment c_payment_cnt c_delivery_cnt c_data]\n" + + ExpectedPlan: "Update\n" + + " └─ UpdateSource(SET customer2.c_balance:16 = -1777.000000,SET customer2.c_ytd_payment:17 = 1777 (decimal(10,6)))\n" + + " └─ IndexedTableAccess(customer2)\n" + + " ├─ index: [customer2.c_w_id,customer2.c_d_id,customer2.c_id]\n" + + " ├─ static: [{[1, 1], [5, 5], [1838, 1838]}]\n" + + " ├─ colSet: (1-21)\n" + + " ├─ tableId: 1\n" + + " └─ Table\n" + + " ├─ name: customer2\n" + + " └─ columns: [c_id c_d_id c_w_id c_first c_middle c_last c_street_1 c_street_2 c_city c_state c_zip c_phone c_since c_credit c_credit_lim c_discount c_balance c_ytd_payment c_payment_cnt c_delivery_cnt c_data]\n" + "", }, { Query: `INSERT INTO history2 (h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data) VALUES (5,1,1838,8,1,NOW(),1767,'name-rqojn name-dnvgs ')`, - ExpectedPlan: "RowUpdateAccumulator\n" + - " └─ Insert(h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data)\n" + - " ├─ InsertDestination\n" + - " │ └─ ProcessTable\n" + - " │ └─ Table\n" + - " │ ├─ name: history2\n" + - " │ └─ columns: [h_c_id h_c_d_id h_c_w_id h_d_id h_w_id h_date h_amount h_data]\n" + - " └─ Project\n" + - " ├─ columns: [h_c_id:2, h_c_d_id:0, h_c_w_id:1, h_d_id:3, h_w_id:4, h_date:5, h_amount:6, h_data:7]\n" + - " └─ Values([5 (tinyint),1 (tinyint),1838 (smallint),8 (tinyint),1 (tinyint),NOW(),1767 (smallint),name-rqojn name-dnvgs (longtext)])\n" + + ExpectedPlan: "Insert(h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data)\n" + + " ├─ InsertDestination\n" + + " │ └─ ProcessTable\n" + + " │ └─ Table\n" + + " │ ├─ name: history2\n" + + " │ └─ columns: [h_c_id h_c_d_id h_c_w_id h_d_id h_w_id h_date h_amount h_data]\n" + + " └─ Project\n" + + " ├─ columns: [h_c_id:2, h_c_d_id:0, h_c_w_id:1, h_d_id:3, h_w_id:4, h_date:5, h_amount:6, h_data:7]\n" + + " └─ Values([5 (tinyint),1 (tinyint),1838 (smallint),8 (tinyint),1 (tinyint),NOW(),1767 (smallint),name-rqojn name-dnvgs (longtext)])\n" + "", }, { diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 91c0705465..e785c5ebc1 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -516,7 +516,7 @@ type accumulatorIter struct { updateRowHandler accumulatorRowHandler } -func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, error) { +func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows var rowHandler accumulatorRowHandler @@ -560,27 +560,27 @@ func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql. } }) if schema == nil { - return nil, fmt.Errorf("error: No JoinNode found in query plan to go along with an UpdateTypeJoinUpdate") + return nil, nil, fmt.Errorf("error: No JoinNode found in query plan to go along with an UpdateTypeJoinUpdate") } // assign row handler to updateJoinIter rowHandler = &updateJoinRowHandler{joinSchema: schema, tableMap: plan.RecreateTableSchemaFromJoinSchema(schema), updaterMap: updaterMap} - for iter, done := iter, false; !done; { - switch i := iter.(type) { + for i, done := iter, false; !done; { + switch ii := i.(type) { case *plan.TableEditorIter: - iter = i.InnerIter() + i = ii.InnerIter() case *ProjectIter: - iter = i.childIter + i = ii.childIter case *plan.CheckpointingTableEditorIter: - iter = i.InnerIter() + i = ii.InnerIter() case *triggerIter: - iter = i.child + i = ii.child case *updateIter: - iter = i.childIter + i = ii.childIter case *updateJoinIter: - i.accumulator = rowHandler.(*updateJoinRowHandler) + ii.accumulator = rowHandler.(*updateJoinRowHandler) done = true default: - return nil, fmt.Errorf("failed to apply rowHandler to updateJoin, unknown type: %T", iter) + return nil, nil, fmt.Errorf("failed to apply rowHandler to updateJoin, unknown type: %T", iter) } } } else { @@ -590,13 +590,13 @@ func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql. rowHandler = &updateRowHandler{schema: sch[:len(sch)/2], clientFoundRowsCapability: clientFoundRowsToggled} } default: - return iter, nil + return iter, nil, nil } return &accumulatorIter{ iter: iter, updateRowHandler: rowHandler, - }, nil + }, types.OkResultSchema, nil } func (a *accumulatorIter) Next(ctx *sql.Context) (r sql.Row, err error) { From 34e3d7eed5a893af790c05730a78bb3c39317523 Mon Sep 17 00:00:00 2001 From: jycor Date: Mon, 28 Oct 2024 23:39:00 +0000 Subject: [PATCH 10/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- enginetest/memory_engine_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index 10290b2555..2eb5a28c6e 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -200,14 +200,14 @@ func TestSingleScript(t *testing.T) { //t.Skip() var scripts = []queries.ScriptTest{ { - Name: "test script", + Name: "test script", SetUpScript: []string{ "create table t (i int);", "create procedure p() begin insert into t values (1); end;", }, - Assertions: []queries.ScriptTestAssertion{ + Assertions: []queries.ScriptTestAssertion{ { - Query: "call p();", + Query: "call p();", Expected: []sql.Row{}, }, }, From 3cefd2c6cba3fa6ab96fa52b7a09005affbe8cd2 Mon Sep 17 00:00:00 2001 From: James Cor Date: Tue, 29 Oct 2024 16:37:10 -0700 Subject: [PATCH 11/25] more progress --- engine.go | 2 +- enginetest/memory_engine_test.go | 6 +- sql/analyzer/apply_update_accumulators.go | 4 +- sql/rowexec/dml_iters.go | 127 +++++++++------------- sql/rowexec/other.go | 3 +- 5 files changed, 63 insertions(+), 79 deletions(-) diff --git a/engine.go b/engine.go index 9064574f9b..9a284ac355 100644 --- a/engine.go +++ b/engine.go @@ -898,7 +898,7 @@ func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, var err error var sch sql.Schema // TODO: if this is does something we need to overwrite the schema with types.OkResultSchema - //iter, sch, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) + iter, sch, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) if err != nil { return nil, nil, err } diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index 2eb5a28c6e..c2428d171c 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -202,7 +202,7 @@ func TestSingleScript(t *testing.T) { { Name: "test script", SetUpScript: []string{ - "create table t (i int);", + "create table t (i int primary key);", "create procedure p() begin insert into t values (1); end;", }, Assertions: []queries.ScriptTestAssertion{ @@ -210,6 +210,10 @@ func TestSingleScript(t *testing.T) { Query: "call p();", Expected: []sql.Row{}, }, + //{ + // Query: "update t join (values row(1), row(2)) t2 (j) on t.i = t2.j set t.i = 10;", + // Expected: []sql.Row{}, + //}, }, }, } diff --git a/sql/analyzer/apply_update_accumulators.go b/sql/analyzer/apply_update_accumulators.go index 8565277c1c..d84bbaf740 100644 --- a/sql/analyzer/apply_update_accumulators.go +++ b/sql/analyzer/apply_update_accumulators.go @@ -26,7 +26,7 @@ import ( // applyUpdateAccumulators wraps any Insert, Update, or Delete nodes with RowUpdateAccumulators to tally the results // for report to the client. func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, sel RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error) { - return n, transform.SameTree, nil + //return n, transform.SameTree, nil switch n := n.(type) { case *plan.TriggerExecutor, *plan.InsertInto, *plan.DeleteFrom, *plan.Update: accumulatorType, err := getUpdateAccumulatorType(n) @@ -41,7 +41,7 @@ func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *p // getUpdateAccumulatorType returns the type of accumulator needed for the node given, or an error if there's no match. func getUpdateAccumulatorType(n sql.Node) (plan.RowUpdateType, error) { - return -1, nil + //return -1, nil switch n := n.(type) { case *plan.TriggerExecutor: return getUpdateAccumulatorType(n.Left()) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index e785c5ebc1..32dc20c1ad 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -516,87 +516,66 @@ type accumulatorIter struct { updateRowHandler accumulatorRowHandler } -func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { - clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows - var rowHandler accumulatorRowHandler - switch n := node.(type) { - case *plan.TriggerExecutor: - return AddAccumulatorIter(ctx, n.Left(), iter) - case *plan.InsertInto: - if n.IsReplace { - rowHandler = &replaceRowHandler{} - } else if len(n.OnDupExprs) > 0 { - rowHandler = &onDuplicateUpdateHandler{schema: n.Schema(), clientFoundRowsCapability: clientFoundRowsToggled} - } else { - rowHandler = &insertRowHandler{} +func getRowHandler(ctx *sql.Context, clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRowHandler { + switch i := iter.(type) { + case *plan.TableEditorIter: + return getRowHandler(ctx, clientFoundRowsToggled, i.InnerIter()) + case *plan.CheckpointingTableEditorIter: + return getRowHandler(ctx, clientFoundRowsToggled, i.InnerIter()) + case *ProjectIter: + return getRowHandler(ctx, clientFoundRowsToggled, i.childIter) + case *triggerIter: + return getRowHandler(ctx, clientFoundRowsToggled, i.child) + case *insertIter: + if i.replacer != nil { + return &replaceRowHandler{} } - case *plan.DeleteFrom: - rowHandler = &deleteRowHandler{} - case *plan.Update: - // search for a join - hasJoin := false - transform.Inspect(n, func(node sql.Node) bool { - switch node.(type) { - case *plan.JoinNode: - hasJoin = true - return false - } - return true - }) - if hasJoin { - var schema sql.Schema - var updaterMap map[string]sql.RowUpdater - transform.Inspect(n, func(node sql.Node) bool { - switch nn := node.(type) { - case *plan.JoinNode, *plan.Project: - schema = node.Schema() - return false - case *plan.UpdateJoin: - updaterMap = nn.Updaters - return true - default: - return true - } - }) - if schema == nil { - return nil, nil, fmt.Errorf("error: No JoinNode found in query plan to go along with an UpdateTypeJoinUpdate") - } - // assign row handler to updateJoinIter - rowHandler = &updateJoinRowHandler{joinSchema: schema, tableMap: plan.RecreateTableSchemaFromJoinSchema(schema), updaterMap: updaterMap} - for i, done := iter, false; !done; { - switch ii := i.(type) { - case *plan.TableEditorIter: - i = ii.InnerIter() - case *ProjectIter: - i = ii.childIter - case *plan.CheckpointingTableEditorIter: - i = ii.InnerIter() - case *triggerIter: - i = ii.child - case *updateIter: - i = ii.childIter - case *updateJoinIter: - ii.accumulator = rowHandler.(*updateJoinRowHandler) - done = true - default: - return nil, nil, fmt.Errorf("failed to apply rowHandler to updateJoin, unknown type: %T", iter) - } + if i.updater != nil { + return &onDuplicateUpdateHandler{schema: i.schema, clientFoundRowsCapability: clientFoundRowsToggled} + } + return &insertRowHandler{} + case *deleteIter: + return &deleteRowHandler{} + case *updateIter: + if updateJoin, ok := i.childIter.(*updateJoinIter); ok { + return &updateJoinRowHandler{ + joinSchema: updateJoin.joinSchema, + tableMap: plan.RecreateTableSchemaFromJoinSchema(updateJoin.joinSchema), + updaterMap: updateJoin.updaters, } - } else { - // the schema of the update node is a self-concatenation of the underlying table's, so split it in half - // for new / old row comparison purposes - sch := n.Schema() - rowHandler = &updateRowHandler{schema: sch[:len(sch)/2], clientFoundRowsCapability: clientFoundRowsToggled} } + return &updateRowHandler{schema: i.schema[:len(i.schema)/2], clientFoundRowsCapability: clientFoundRowsToggled} default: - return iter, nil, nil + return nil } +} - return &accumulatorIter{ - iter: iter, - updateRowHandler: rowHandler, - }, types.OkResultSchema, nil +func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { + switch i := iter.(type) { + case *callIter: + childIter, sch, err := AddAccumulatorIter(ctx, node, i.innerIter) + i.innerIter = childIter + return i, sch, err + case *beginEndIter: + childIter, sch, err := AddAccumulatorIter(ctx, node, i.rowIter) + i.rowIter = childIter + return i, sch, err + case *blockIter: + childIter, sch, err := AddAccumulatorIter(ctx, node, i.internalIter) + i.internalIter = childIter + return i, sch, err + default: + clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows + rowHandler := getRowHandler(ctx, clientFoundRowsToggled, iter) + if rowHandler == nil { + return iter, nil, nil + } + return &accumulatorIter{ + iter: iter, + updateRowHandler: rowHandler, + }, types.OkResultSchema, nil + } } func (a *accumulatorIter) Next(ctx *sql.Context) (r sql.Row, err error) { diff --git a/sql/rowexec/other.go b/sql/rowexec/other.go index 0c9326024d..dfb342b742 100644 --- a/sql/rowexec/other.go +++ b/sql/rowexec/other.go @@ -219,7 +219,8 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( returnSch = subIterSch } else if !selectSeen { returnNode = subIterNode - returnSch = subIterSch + returnSch = types.OkResultSchema + //returnSch = subIterSch } for { From bdc846f6b189000d05c71555033062e4e0dfa6c6 Mon Sep 17 00:00:00 2001 From: jycor Date: Wed, 30 Oct 2024 22:10:44 +0000 Subject: [PATCH 12/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- sql/rowexec/dml_iters.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 32dc20c1ad..7d8efcdb6e 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -516,7 +516,6 @@ type accumulatorIter struct { updateRowHandler accumulatorRowHandler } - func getRowHandler(ctx *sql.Context, clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRowHandler { switch i := iter.(type) { case *plan.TableEditorIter: @@ -541,7 +540,7 @@ func getRowHandler(ctx *sql.Context, clientFoundRowsToggled bool, iter sql.RowIt if updateJoin, ok := i.childIter.(*updateJoinIter); ok { return &updateJoinRowHandler{ joinSchema: updateJoin.joinSchema, - tableMap: plan.RecreateTableSchemaFromJoinSchema(updateJoin.joinSchema), + tableMap: plan.RecreateTableSchemaFromJoinSchema(updateJoin.joinSchema), updaterMap: updateJoin.updaters, } } From 43291193247a99fac1360d2e7a94a58651d842d5 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 30 Oct 2024 16:35:23 -0700 Subject: [PATCH 13/25] moved rowupdateaccumulator --- sql/analyzer/apply_update_accumulators.go | 2 +- sql/rowexec/dml_iters.go | 46 +++++++++++++---------- sql/rowexec/other.go | 12 ++++-- sql/rowexec/other_iters.go | 5 ++- sql/rowexec/proc.go | 8 +++- 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/sql/analyzer/apply_update_accumulators.go b/sql/analyzer/apply_update_accumulators.go index d84bbaf740..213e3310d1 100644 --- a/sql/analyzer/apply_update_accumulators.go +++ b/sql/analyzer/apply_update_accumulators.go @@ -26,7 +26,7 @@ import ( // applyUpdateAccumulators wraps any Insert, Update, or Delete nodes with RowUpdateAccumulators to tally the results // for report to the client. func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, sel RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error) { - //return n, transform.SameTree, nil + return n, transform.SameTree, nil switch n := n.(type) { case *plan.TriggerExecutor, *plan.InsertInto, *plan.DeleteFrom, *plan.Update: accumulatorType, err := getUpdateAccumulatorType(n) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 32dc20c1ad..af5cdf8777 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -516,17 +516,18 @@ type accumulatorIter struct { updateRowHandler accumulatorRowHandler } - -func getRowHandler(ctx *sql.Context, clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRowHandler { +func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRowHandler { switch i := iter.(type) { case *plan.TableEditorIter: - return getRowHandler(ctx, clientFoundRowsToggled, i.InnerIter()) + return getRowHandler(clientFoundRowsToggled, i.InnerIter()) case *plan.CheckpointingTableEditorIter: - return getRowHandler(ctx, clientFoundRowsToggled, i.InnerIter()) + return getRowHandler(clientFoundRowsToggled, i.InnerIter()) case *ProjectIter: - return getRowHandler(ctx, clientFoundRowsToggled, i.childIter) + return getRowHandler(clientFoundRowsToggled, i.childIter) case *triggerIter: - return getRowHandler(ctx, clientFoundRowsToggled, i.child) + return getRowHandler(clientFoundRowsToggled, i.child) + case *blockIter: + return getRowHandler(clientFoundRowsToggled, i.repIter) case *insertIter: if i.replacer != nil { return &replaceRowHandler{} @@ -538,14 +539,25 @@ func getRowHandler(ctx *sql.Context, clientFoundRowsToggled bool, iter sql.RowIt case *deleteIter: return &deleteRowHandler{} case *updateIter: - if updateJoin, ok := i.childIter.(*updateJoinIter); ok { - return &updateJoinRowHandler{ - joinSchema: updateJoin.joinSchema, - tableMap: plan.RecreateTableSchemaFromJoinSchema(updateJoin.joinSchema), - updaterMap: updateJoin.updaters, - } + // it's possible that there's an updateJoinIter that's not the immediate child of updateIter + rowHandler := getRowHandler(clientFoundRowsToggled, i.childIter) + if rowHandler != nil { + return rowHandler + } + sch := i.schema + // special case for foreign keys, plan.ForeignKeyHandler.Schema() returns original schema + if fkHandler, isFk := i.updater.(*plan.ForeignKeyHandler); isFk { + sch = fkHandler.Sch } - return &updateRowHandler{schema: i.schema[:len(i.schema)/2], clientFoundRowsCapability: clientFoundRowsToggled} + return &updateRowHandler{schema: sch, clientFoundRowsCapability: clientFoundRowsToggled} + case *updateJoinIter: + rowHandler := &updateJoinRowHandler{ + joinSchema: i.joinSchema, + tableMap: plan.RecreateTableSchemaFromJoinSchema(i.joinSchema), + updaterMap: i.updaters, + } + i.accumulator = rowHandler + return rowHandler default: return nil } @@ -561,13 +573,9 @@ func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql. childIter, sch, err := AddAccumulatorIter(ctx, node, i.rowIter) i.rowIter = childIter return i, sch, err - case *blockIter: - childIter, sch, err := AddAccumulatorIter(ctx, node, i.internalIter) - i.internalIter = childIter - return i, sch, err default: - clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows - rowHandler := getRowHandler(ctx, clientFoundRowsToggled, iter) + clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) > 0 + rowHandler := getRowHandler(clientFoundRowsToggled, iter) if rowHandler == nil { return iter, nil, nil } diff --git a/sql/rowexec/other.go b/sql/rowexec/other.go index dfb342b742..1f96cd7452 100644 --- a/sql/rowexec/other.go +++ b/sql/rowexec/other.go @@ -148,7 +148,8 @@ func (b *BaseBuilder) buildCachedResults(ctx *sql.Context, n *plan.CachedResults func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) (sql.RowIter, error) { var returnRows []sql.Row var returnNode sql.Node - var returnSch sql.Schema + var returnIter sql.RowIter + var returnSch sql.Schema selectSeen := false for _, s := range n.Children() { @@ -216,10 +217,12 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( if isSelect = plan.NodeRepresentsSelect(subIterNode); isSelect { selectSeen = true returnNode = subIterNode - returnSch = subIterSch + returnIter = subIter + returnSch = subIterSch } else if !selectSeen { returnNode = subIterNode - returnSch = types.OkResultSchema + returnIter = subIter + returnSch = types.OkResultSchema //returnSch = subIterSch } @@ -259,7 +262,8 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( return &blockIter{ internalIter: sql.RowsToRowIter(returnRows...), repNode: returnNode, - sch: returnSch, + repIter: returnIter, + repSch: returnSch, }, nil } diff --git a/sql/rowexec/other_iters.go b/sql/rowexec/other_iters.go index afe1b2b53d..0aa30cf124 100644 --- a/sql/rowexec/other_iters.go +++ b/sql/rowexec/other_iters.go @@ -115,7 +115,8 @@ func (itr *dropHistogramIter) Close(_ *sql.Context) error { type blockIter struct { internalIter sql.RowIter repNode sql.Node - sch sql.Schema + repIter sql.RowIter + repSch sql.Schema } var _ plan.BlockRowIter = (*blockIter)(nil) @@ -137,7 +138,7 @@ func (i *blockIter) RepresentingNode() sql.Node { // Schema implements the sql.BlockRowIter interface. func (i *blockIter) Schema() sql.Schema { - return i.sch + return i.repSch } type prependRowIter struct { diff --git a/sql/rowexec/proc.go b/sql/rowexec/proc.go index c7e9d48807..c56342a03e 100644 --- a/sql/rowexec/proc.go +++ b/sql/rowexec/proc.go @@ -232,7 +232,8 @@ func (b *BaseBuilder) buildLoop(ctx *sql.Context, n *plan.Loop, row sql.Row) (sq var returnRows []sql.Row var returnNode sql.Node - var returnSch sql.Schema + var returnIter sql.RowIter + var returnSch sql.Schema selectSeen := false // It's technically valid to make an infinite loop, but we don't want to actually allow that @@ -285,10 +286,12 @@ func (b *BaseBuilder) buildLoop(ctx *sql.Context, n *plan.Loop, row sql.Row) (sq selectSeen = true includeResultSet = true returnNode = subIterNode + returnIter = loopBodyIter returnSch = subIterSch } else if !selectSeen { includeResultSet = true returnNode = subIterNode + returnIter = loopBodyIter returnSch = subIterSch } } @@ -336,7 +339,8 @@ func (b *BaseBuilder) buildLoop(ctx *sql.Context, n *plan.Loop, row sql.Row) (sq return &blockIter{ internalIter: sql.RowsToRowIter(returnRows...), repNode: returnNode, - sch: returnSch, + repSch: returnSch, + repIter: returnIter, }, nil } From 12b09ced4093c09c22c5885d238855bbd562217d Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 30 Oct 2024 16:42:33 -0700 Subject: [PATCH 14/25] remove rowupdateaccumulator node --- enginetest/memory_engine_test.go | 20 +---- sql/analyzer/apply_foreign_keys.go | 16 ---- sql/analyzer/apply_update_accumulators.go | 78 ------------------- sql/analyzer/rule_ids.go | 1 - sql/analyzer/ruleid_string.go | 35 +++++---- sql/analyzer/rules.go | 1 - sql/analyzer/triggers.go | 13 +--- sql/plan/row_update_accumulator.go | 91 ----------------------- sql/plan/table_copier.go | 5 +- sql/rowexec/dml.go | 77 ------------------- sql/rowexec/node_builder.gen.go | 2 - 11 files changed, 25 insertions(+), 314 deletions(-) delete mode 100644 sql/analyzer/apply_update_accumulators.go delete mode 100644 sql/plan/row_update_accumulator.go diff --git a/enginetest/memory_engine_test.go b/enginetest/memory_engine_test.go index c2428d171c..06a9bb1915 100644 --- a/enginetest/memory_engine_test.go +++ b/enginetest/memory_engine_test.go @@ -197,24 +197,12 @@ func TestSingleQueryPrepared(t *testing.T) { // Convenience test for debugging a single query. Unskip and set to the desired query. func TestSingleScript(t *testing.T) { - //t.Skip() + t.Skip() var scripts = []queries.ScriptTest{ { - Name: "test script", - SetUpScript: []string{ - "create table t (i int primary key);", - "create procedure p() begin insert into t values (1); end;", - }, - Assertions: []queries.ScriptTestAssertion{ - { - Query: "call p();", - Expected: []sql.Row{}, - }, - //{ - // Query: "update t join (values row(1), row(2)) t2 (j) on t.i = t2.j set t.i = 10;", - // Expected: []sql.Row{}, - //}, - }, + Name: "test script", + SetUpScript: []string{}, + Assertions: []queries.ScriptTestAssertion{}, }, } diff --git a/sql/analyzer/apply_foreign_keys.go b/sql/analyzer/apply_foreign_keys.go index 8210fcc3c3..71758740b6 100644 --- a/sql/analyzer/apply_foreign_keys.go +++ b/sql/analyzer/apply_foreign_keys.go @@ -190,22 +190,6 @@ func applyForeignKeysToNodes(ctx *sql.Context, a *Analyzer, n sql.Node, cache *f } return newNode, transform.NewTree, nil } - case *plan.RowUpdateAccumulator: - children := n.Children() - newChildren := make([]sql.Node, len(children)) - treeIdentity := transform.SameTree - for i, child := range children { - newIdentity := transform.SameTree - newChildren[i], newIdentity, err = applyForeignKeysToNodes(ctx, a, child, cache) - if err != nil { - return nil, transform.SameTree, err - } - if newIdentity == transform.NewTree { - treeIdentity = transform.NewTree - } - } - nn, err := n.WithChildren(newChildren...) - return nn, treeIdentity, err default: return n, transform.SameTree, nil } diff --git a/sql/analyzer/apply_update_accumulators.go b/sql/analyzer/apply_update_accumulators.go deleted file mode 100644 index 213e3310d1..0000000000 --- a/sql/analyzer/apply_update_accumulators.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2020-2021 Dolthub, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package analyzer - -import ( - "fmt" - - "github.com/dolthub/go-mysql-server/sql/transform" - - "github.com/dolthub/go-mysql-server/sql" - "github.com/dolthub/go-mysql-server/sql/plan" -) - -// applyUpdateAccumulators wraps any Insert, Update, or Delete nodes with RowUpdateAccumulators to tally the results -// for report to the client. -func applyUpdateAccumulators(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, sel RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error) { - return n, transform.SameTree, nil - switch n := n.(type) { - case *plan.TriggerExecutor, *plan.InsertInto, *plan.DeleteFrom, *plan.Update: - accumulatorType, err := getUpdateAccumulatorType(n) - if err != nil { - return nil, transform.SameTree, err - } - return plan.NewRowUpdateAccumulator(n, accumulatorType), transform.NewTree, nil - default: - return n, transform.SameTree, nil - } -} - -// getUpdateAccumulatorType returns the type of accumulator needed for the node given, or an error if there's no match. -func getUpdateAccumulatorType(n sql.Node) (plan.RowUpdateType, error) { - //return -1, nil - switch n := n.(type) { - case *plan.TriggerExecutor: - return getUpdateAccumulatorType(n.Left()) - case *plan.InsertInto: - if n.IsReplace { - return plan.UpdateTypeReplace, nil - } else if len(n.OnDupExprs) > 0 { - return plan.UpdateTypeDuplicateKeyUpdate, nil - } - return plan.UpdateTypeInsert, nil - case *plan.DeleteFrom: - return plan.UpdateTypeDelete, nil - case *plan.Update: - // search for a join - hasJoin := false - transform.Inspect(n, func(node sql.Node) bool { - switch node.(type) { - case *plan.JoinNode: - hasJoin = true - return false - } - - return true - }) - - if hasJoin { - return plan.UpdateTypeJoinUpdate, nil - } - - return plan.UpdateTypeUpdate, nil - } - - return -1, fmt.Errorf("unexpected node type: %T", n) -} diff --git a/sql/analyzer/rule_ids.go b/sql/analyzer/rule_ids.go index 9067489e1b..e22ce39f2b 100644 --- a/sql/analyzer/rule_ids.go +++ b/sql/analyzer/rule_ids.go @@ -66,7 +66,6 @@ const ( applyProceduresId // applyProcedures assignRoutinesId // assignRoutines modifyUpdateExprsForJoinId // modifyUpdateExprsForJoin - applyUpdateAccumulatorsId // applyUpdateAccumulators applyForeignKeysId // applyForeignKeys // validate diff --git a/sql/analyzer/ruleid_string.go b/sql/analyzer/ruleid_string.go index ca205402ba..267ed23631 100755 --- a/sql/analyzer/ruleid_string.go +++ b/sql/analyzer/ruleid_string.go @@ -64,27 +64,26 @@ func _() { _ = x[applyProceduresId-53] _ = x[assignRoutinesId-54] _ = x[modifyUpdateExprsForJoinId-55] - _ = x[applyUpdateAccumulatorsId-56] - _ = x[applyForeignKeysId-57] - _ = x[validateResolvedId-58] - _ = x[validateOrderById-59] - _ = x[validateGroupById-60] - _ = x[validateSchemaSourceId-61] - _ = x[validateIndexCreationId-62] - _ = x[ValidateOperandsId-63] - _ = x[validateIntervalUsageId-64] - _ = x[validateSubqueryColumnsId-65] - _ = x[validateUnionSchemasMatchId-66] - _ = x[validateAggregationsId-67] - _ = x[validateDeleteFromId-68] - _ = x[cacheSubqueryAliasesInJoinsId-69] - _ = x[BacktickDefaulColumnValueNamesId-70] - _ = x[TrackProcessId-71] + _ = x[applyForeignKeysId-56] + _ = x[validateResolvedId-57] + _ = x[validateOrderById-58] + _ = x[validateGroupById-59] + _ = x[validateSchemaSourceId-60] + _ = x[validateIndexCreationId-61] + _ = x[ValidateOperandsId-62] + _ = x[validateIntervalUsageId-63] + _ = x[validateSubqueryColumnsId-64] + _ = x[validateUnionSchemasMatchId-65] + _ = x[validateAggregationsId-66] + _ = x[validateDeleteFromId-67] + _ = x[cacheSubqueryAliasesInJoinsId-68] + _ = x[BacktickDefaulColumnValueNamesId-69] + _ = x[TrackProcessId-70] } -const _RuleId_name = "applyDefaultSelectLimitvalidateOffsetAndLimitvalidateStarExpressionsvalidateCreateTablevalidateAlterTablevalidateExprSemloadStoredProceduresvalidateDropTablesresolveDropConstraintvalidateDropConstraintresolveCreateSelectresolveSubqueriesresolveUnionsvalidateColumnDefaultsvalidateCreateTriggervalidateCreateProcedurevalidateReadOnlyDatabasevalidateReadOnlyTransactionvalidateDatabaseSetvalidatePrivilegesapplyEventSchedulerflattenTableAliasespushdownSubqueryAliasFiltersvalidateCheckConstraintsreplaceCountStarreplaceCrossJoinsmoveJoinConditionsToFiltersimplifyFilterspushNotFiltershoistOutOfScopeFiltersunnestInSubqueriesunnestExistsSubqueriesfinalizeSubqueriesfinalizeUnionsloadTriggersprocessTruncateresolveAlterColumnstripTableNamesFromColumnDefaultsoptimizeJoinspushFiltersapplyIndexesFromOuterScopepruneTablesassignExecIndexesinlineSubqueryAliasRefseraseProjectionflattenDistinctreplaceAggreplaceIdxSortinsertTopNNodesreplaceIdxOrderByDistanceapplyHashInresolveInsertRowsapplyTriggersapplyProceduresassignRoutinesmodifyUpdateExprsForJoinapplyUpdateAccumulatorsapplyForeignKeysvalidateResolvedvalidateOrderByvalidateGroupByvalidateSchemaSourcevalidateIndexCreationvalidateOperandsvalidateIntervalUsagevalidateSubqueryColumnsvalidateUnionSchemasMatchvalidateAggregationsvalidateDeleteFromcacheSubqueryAliasesInJoinsbacktickDefaultColumnValueNamestrackProcess" +const _RuleId_name = "applyDefaultSelectLimitvalidateOffsetAndLimitvalidateStarExpressionsvalidateCreateTablevalidateAlterTablevalidateExprSemloadStoredProceduresvalidateDropTablesresolveDropConstraintvalidateDropConstraintresolveCreateSelectresolveSubqueriesresolveUnionsvalidateColumnDefaultsvalidateCreateTriggervalidateCreateProcedurevalidateReadOnlyDatabasevalidateReadOnlyTransactionvalidateDatabaseSetvalidatePrivilegesapplyEventSchedulerflattenTableAliasespushdownSubqueryAliasFiltersvalidateCheckConstraintsreplaceCountStarreplaceCrossJoinsmoveJoinConditionsToFiltersimplifyFilterspushNotFiltershoistOutOfScopeFiltersunnestInSubqueriesunnestExistsSubqueriesfinalizeSubqueriesfinalizeUnionsloadTriggersprocessTruncateresolveAlterColumnstripTableNamesFromColumnDefaultsoptimizeJoinspushFiltersapplyIndexesFromOuterScopepruneTablesassignExecIndexesinlineSubqueryAliasRefseraseProjectionflattenDistinctreplaceAggreplaceIdxSortinsertTopNNodesreplaceIdxOrderByDistanceapplyHashInresolveInsertRowsapplyTriggersapplyProceduresassignRoutinesmodifyUpdateExprsForJoinapplyForeignKeysvalidateResolvedvalidateOrderByvalidateGroupByvalidateSchemaSourcevalidateIndexCreationvalidateOperandsvalidateIntervalUsagevalidateSubqueryColumnsvalidateUnionSchemasMatchvalidateAggregationsvalidateDeleteFromcacheSubqueryAliasesInJoinsbacktickDefaultColumnValueNamestrackProcess" -var _RuleId_index = [...]uint16{0, 23, 45, 68, 87, 105, 120, 140, 158, 179, 201, 220, 237, 250, 272, 293, 316, 340, 367, 386, 404, 423, 442, 470, 494, 510, 527, 553, 568, 582, 604, 622, 644, 662, 676, 688, 703, 721, 754, 767, 778, 804, 815, 832, 855, 870, 885, 895, 909, 924, 949, 960, 977, 990, 1005, 1019, 1043, 1066, 1082, 1098, 1113, 1128, 1148, 1169, 1185, 1206, 1229, 1254, 1274, 1292, 1319, 1350, 1362} +var _RuleId_index = [...]uint16{0, 23, 45, 68, 87, 105, 120, 140, 158, 179, 201, 220, 237, 250, 272, 293, 316, 340, 367, 386, 404, 423, 442, 470, 494, 510, 527, 553, 568, 582, 604, 622, 644, 662, 676, 688, 703, 721, 754, 767, 778, 804, 815, 832, 855, 870, 885, 895, 909, 924, 949, 960, 977, 990, 1005, 1019, 1043, 1059, 1075, 1090, 1105, 1125, 1146, 1162, 1183, 1206, 1231, 1251, 1269, 1296, 1327, 1339} func (i RuleId) String() string { if i < 0 || i >= RuleId(len(_RuleId_index)-1) { diff --git a/sql/analyzer/rules.go b/sql/analyzer/rules.go index 6a5ae05626..f63f6f57db 100644 --- a/sql/analyzer/rules.go +++ b/sql/analyzer/rules.go @@ -21,7 +21,6 @@ func init() { {resolveInsertRowsId, resolveInsertRows}, {applyTriggersId, applyTriggers}, {applyProceduresId, applyProcedures}, - {applyUpdateAccumulatorsId, applyUpdateAccumulators}, {inlineSubqueryAliasRefsId, inlineSubqueryAliasRefs}, {cacheSubqueryAliasesInJoinsId, cacheSubqueryAliasesInJoins}, {BacktickDefaulColumnValueNamesId, backtickDefaultColumnValueNames}, diff --git a/sql/analyzer/triggers.go b/sql/analyzer/triggers.go index 4aea1ce3c7..4f9edadd6a 100644 --- a/sql/analyzer/triggers.go +++ b/sql/analyzer/triggers.go @@ -423,13 +423,6 @@ func getUpdateJoinSource(n sql.Node) *plan.UpdateSource { // getTriggerLogic analyzes and returns the Node representing the trigger body for the trigger given, applied to the // plan node given, which must be an insert, update, or delete. func getTriggerLogic(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope, trigger *plan.CreateTrigger, qFlags *sql.QueryFlags) (sql.Node, error) { - // For trigger body analysis, we don't want any row update accumulators applied to insert / update / delete - // statements, we need the raw output from them. - var noRowUpdateAccumulators RuleSelector - noRowUpdateAccumulators = func(id RuleId) bool { - return DefaultRuleSelector(id) && id != applyUpdateAccumulatorsId - } - // For the reference to the row in the trigger table, we use the scope mechanism. This is a little strange because // scopes for subqueries work with the child schemas of a scope node, but we don't have such a node here. Instead we // fabricate one with the right properties (its child schema matches the table schema, with the right aliased name) @@ -444,7 +437,7 @@ func getTriggerLogic(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scop plan.NewTableAlias("new", trigger.Table), ) s := (*plan.Scope)(nil).NewScope(scopeNode).WithMemos(scope.Memo(n).MemoNodes()).WithProcedureCache(scope.ProcedureCache()) - triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, noRowUpdateAccumulators, qFlags) + triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, DefaultRuleSelector, qFlags) case sqlparser.UpdateStr: var scopeNode *plan.Project if updateSrc := getUpdateJoinSource(n); updateSrc == nil { @@ -467,7 +460,7 @@ func getTriggerLogic(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scop } // Triggers are wrapped in prepend nodes, which means that the parent scope is included s := (*plan.Scope)(nil).NewScope(scopeNode).WithMemos(scope.Memo(n).MemoNodes()).WithProcedureCache(scope.ProcedureCache()) - triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, noRowUpdateAccumulators, qFlags) + triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, DefaultRuleSelector, qFlags) case sqlparser.DeleteStr: scopeNode := plan.NewProject( []sql.Expression{expression.NewStar()}, @@ -475,7 +468,7 @@ func getTriggerLogic(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scop ) // Triggers are wrapped in prepend nodes, which means that the parent scope is included s := scope.NewScope(scopeNode) - triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, noRowUpdateAccumulators, qFlags) + triggerLogic, _, err = a.analyzeWithSelector(ctx, trigger.Body, s, SelectAllBatches, DefaultRuleSelector, qFlags) } return triggerLogic, err diff --git a/sql/plan/row_update_accumulator.go b/sql/plan/row_update_accumulator.go deleted file mode 100644 index 4e82a8fddf..0000000000 --- a/sql/plan/row_update_accumulator.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020-2021 Dolthub, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package plan - -import ( - "github.com/dolthub/go-mysql-server/sql" - "github.com/dolthub/go-mysql-server/sql/types" -) - -type RowUpdateType int - -const ( - UpdateTypeInsert RowUpdateType = iota - UpdateTypeReplace - UpdateTypeDuplicateKeyUpdate - UpdateTypeUpdate - UpdateTypeDelete - UpdateTypeJoinUpdate -) - -// RowUpdateAccumulator wraps other nodes that update tables, and returns their results as OKResults with the appropriate -// fields set. -type RowUpdateAccumulator struct { - UnaryNode - RowUpdateType -} - -var _ sql.Node = RowUpdateAccumulator{} -var _ sql.CollationCoercible = RowUpdateAccumulator{} - -// NewRowUpdateResult returns a new RowUpdateResult with the given node to wrap. -func NewRowUpdateAccumulator(n sql.Node, updateType RowUpdateType) *RowUpdateAccumulator { - return &RowUpdateAccumulator{ - UnaryNode: UnaryNode{ - Child: n, - }, - RowUpdateType: updateType, - } -} - -func (r RowUpdateAccumulator) Child() sql.Node { - return r.UnaryNode.Child -} - -func (r RowUpdateAccumulator) Schema() sql.Schema { - return types.OkResultSchema -} - -func (r RowUpdateAccumulator) IsReadOnly() bool { - return r.Child().IsReadOnly() -} - -func (r RowUpdateAccumulator) WithChildren(children ...sql.Node) (sql.Node, error) { - if len(children) != 1 { - return nil, sql.ErrInvalidChildrenNumber.New(r, 1, len(children)) - } - return NewRowUpdateAccumulator(children[0], r.RowUpdateType), nil -} - -// CheckPrivileges implements the interface sql.Node. -func (r RowUpdateAccumulator) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool { - return r.Child().CheckPrivileges(ctx, opChecker) -} - -// CollationCoercibility implements the interface sql.CollationCoercible. -func (r RowUpdateAccumulator) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) { - return sql.GetCoercibility(ctx, r.Child()) -} - -func (r RowUpdateAccumulator) String() string { - return r.Child().String() -} - -func (r RowUpdateAccumulator) DebugString() string { - pr := sql.NewTreePrinter() - _ = pr.WriteNode("RowUpdateAccumulator") - _ = pr.WriteChildren(sql.DebugString(r.Child())) - return pr.String() -} diff --git a/sql/plan/table_copier.go b/sql/plan/table_copier.go index 39ddaad306..b3744305b0 100644 --- a/sql/plan/table_copier.go +++ b/sql/plan/table_copier.go @@ -74,10 +74,7 @@ func (tc *TableCopier) ProcessCreateTable(ctx *sql.Context, b sql.NodeExecBuilde // TODO: Improve parsing for CREATE TABLE SELECT to allow for IGNORE/REPLACE and custom specs ii := NewInsertInto(tc.db, NewResolvedTable(table, tc.db, nil), tc.Source, tc.options.replace, nil, nil, tc.options.ignore) - // Wrap the insert into a row update accumulator - roa := NewRowUpdateAccumulator(ii, UpdateTypeInsert) - - return b.Build(ctx, roa, row) + return b.Build(ctx, ii, row) } // createTableSelectCanBeCopied determines whether the newly created table's data can just be copied from the Source table diff --git a/sql/rowexec/dml.go b/sql/rowexec/dml.go index 0871a3aa4d..944183d16c 100644 --- a/sql/rowexec/dml.go +++ b/sql/rowexec/dml.go @@ -20,8 +20,6 @@ import ( "strings" "sync" - "github.com/dolthub/vitess/go/mysql" - "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/fulltext" "github.com/dolthub/go-mysql-server/sql/plan" @@ -294,81 +292,6 @@ func (b *BaseBuilder) buildInsertDestination(ctx *sql.Context, n *plan.InsertDes return b.buildNodeExec(ctx, n.Child, row) } -func (b *BaseBuilder) buildRowUpdateAccumulator(ctx *sql.Context, n *plan.RowUpdateAccumulator, row sql.Row) (sql.RowIter, error) { - rowIter, err := b.buildNodeExec(ctx, n.Child(), row) - if err != nil { - return nil, err - } - - clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) == mysql.CapabilityClientFoundRows - - var rowHandler accumulatorRowHandler - switch n.RowUpdateType { - case plan.UpdateTypeInsert: - rowHandler = &insertRowHandler{} - case plan.UpdateTypeReplace: - rowHandler = &replaceRowHandler{} - case plan.UpdateTypeDuplicateKeyUpdate: - rowHandler = &onDuplicateUpdateHandler{schema: n.Child().Schema(), clientFoundRowsCapability: clientFoundRowsToggled} - case plan.UpdateTypeUpdate: - schema := n.Child().Schema() - // the schema of the update node is a self-concatenation of the underlying table's, so split it in half for new / - // old row comparison purposes - rowHandler = &updateRowHandler{schema: schema[:len(schema)/2], clientFoundRowsCapability: clientFoundRowsToggled} - case plan.UpdateTypeDelete: - rowHandler = &deleteRowHandler{} - case plan.UpdateTypeJoinUpdate: - var schema sql.Schema - var updaterMap map[string]sql.RowUpdater - transform.Inspect(n.Child(), func(node sql.Node) bool { - switch node.(type) { - case *plan.JoinNode, *plan.Project: - schema = node.Schema() - return false - case *plan.UpdateJoin: - updaterMap = node.(*plan.UpdateJoin).Updaters - return true - } - - return true - }) - - if schema == nil { - return nil, fmt.Errorf("error: No JoinNode found in query plan to go along with an UpdateTypeJoinUpdate") - } - - rowHandler = &updateJoinRowHandler{joinSchema: schema, tableMap: plan.RecreateTableSchemaFromJoinSchema(schema), updaterMap: updaterMap} - var iter = rowIter - var done bool - for !done { - switch i := iter.(type) { - case *plan.TableEditorIter: - iter = i.InnerIter() - case *updateIter: - iter = i.childIter - case *updateJoinIter: - i.accumulator = rowHandler.(*updateJoinRowHandler) - done = true - case *ProjectIter: - iter = i.childIter - case *plan.CheckpointingTableEditorIter: - iter = i.InnerIter() - case *triggerIter: - iter = i.child - default: - return nil, fmt.Errorf("failed to apply rowHandler to updateJoin, unknown type: %T", iter) - } - } - default: - panic(fmt.Sprintf("Unrecognized RowUpdateType %d", n.RowUpdateType)) - } - - return &accumulatorIter{ - iter: rowIter, - updateRowHandler: rowHandler, - }, nil -} - func (b *BaseBuilder) buildTruncate(ctx *sql.Context, n *plan.Truncate, row sql.Row) (sql.RowIter, error) { truncatable, err := plan.GetTruncatable(n.Child) if err != nil { diff --git a/sql/rowexec/node_builder.gen.go b/sql/rowexec/node_builder.gen.go index 4f2597d683..ecca6c36ed 100644 --- a/sql/rowexec/node_builder.gen.go +++ b/sql/rowexec/node_builder.gen.go @@ -210,8 +210,6 @@ func (b *BaseBuilder) buildNodeExecNoAnalyze(ctx *sql.Context, n sql.Node, row s return b.buildDropView(ctx, n, row) case *plan.GroupBy: return b.buildGroupBy(ctx, n, row) - case *plan.RowUpdateAccumulator: - return b.buildRowUpdateAccumulator(ctx, n, row) case *plan.Block: return b.buildBlock(ctx, n, row) case *plan.InsertDestination: From 0f6e539bb1c7db344c2776d34ed6b7bdef95abf2 Mon Sep 17 00:00:00 2001 From: jycor Date: Wed, 30 Oct 2024 23:44:34 +0000 Subject: [PATCH 15/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- sql/rowexec/dml_iters.go | 2 +- sql/rowexec/other.go | 6 +++--- sql/rowexec/proc.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 7fcce18ffd..93b4b3851c 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -553,7 +553,7 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow case *updateJoinIter: rowHandler := &updateJoinRowHandler{ joinSchema: i.joinSchema, - tableMap: plan.RecreateTableSchemaFromJoinSchema(i.joinSchema), + tableMap: plan.RecreateTableSchemaFromJoinSchema(i.joinSchema), updaterMap: i.updaters, } i.accumulator = rowHandler diff --git a/sql/rowexec/other.go b/sql/rowexec/other.go index 1f96cd7452..34a13f9663 100644 --- a/sql/rowexec/other.go +++ b/sql/rowexec/other.go @@ -149,7 +149,7 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( var returnRows []sql.Row var returnNode sql.Node var returnIter sql.RowIter - var returnSch sql.Schema + var returnSch sql.Schema selectSeen := false for _, s := range n.Children() { @@ -218,11 +218,11 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( selectSeen = true returnNode = subIterNode returnIter = subIter - returnSch = subIterSch + returnSch = subIterSch } else if !selectSeen { returnNode = subIterNode returnIter = subIter - returnSch = types.OkResultSchema + returnSch = types.OkResultSchema //returnSch = subIterSch } diff --git a/sql/rowexec/proc.go b/sql/rowexec/proc.go index c56342a03e..4531605586 100644 --- a/sql/rowexec/proc.go +++ b/sql/rowexec/proc.go @@ -233,7 +233,7 @@ func (b *BaseBuilder) buildLoop(ctx *sql.Context, n *plan.Loop, row sql.Row) (sq var returnRows []sql.Row var returnNode sql.Node var returnIter sql.RowIter - var returnSch sql.Schema + var returnSch sql.Schema selectSeen := false // It's technically valid to make an infinite loop, but we don't want to actually allow that From 506cb90dc2e3f8a9e01e854660431a8de55cbb54 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 30 Oct 2024 16:54:39 -0700 Subject: [PATCH 16/25] tidying up --- engine.go | 2 +- engine_test.go | 2 +- sql/rowexec/dml_iters.go | 6 +++--- sql/rowexec/other.go | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engine.go b/engine.go index 9a284ac355..9b27630e38 100644 --- a/engine.go +++ b/engine.go @@ -898,7 +898,7 @@ func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, var err error var sch sql.Schema // TODO: if this is does something we need to overwrite the schema with types.OkResultSchema - iter, sch, err = rowexec.AddAccumulatorIter(ctx, analyzed, iter) + iter, sch, err = rowexec.AddAccumulatorIter(ctx, iter) if err != nil { return nil, nil, err } diff --git a/engine_test.go b/engine_test.go index a64b84c5be..562f24b552 100755 --- a/engine_test.go +++ b/engine_test.go @@ -232,7 +232,7 @@ func TestTrackProcess(t *testing.T) { iter, err := rowexec.DefaultBuilder.Build(ctx, result, nil) require.NoError(err) - iter, err = finalizeIters(ctx, result, nil, iter) + iter, _, err = finalizeIters(ctx, result, nil, iter) require.NoError(err) _, err = sql.RowIterToRows(ctx, iter) require.NoError(err) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 7fcce18ffd..ce90975e75 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -563,14 +563,14 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow } } -func AddAccumulatorIter(ctx *sql.Context, node sql.Node, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { +func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { switch i := iter.(type) { case *callIter: - childIter, sch, err := AddAccumulatorIter(ctx, node, i.innerIter) + childIter, sch, err := AddAccumulatorIter(ctx, i.innerIter) i.innerIter = childIter return i, sch, err case *beginEndIter: - childIter, sch, err := AddAccumulatorIter(ctx, node, i.rowIter) + childIter, sch, err := AddAccumulatorIter(ctx, i.rowIter) i.rowIter = childIter return i, sch, err default: diff --git a/sql/rowexec/other.go b/sql/rowexec/other.go index 1f96cd7452..4e6790f5d5 100644 --- a/sql/rowexec/other.go +++ b/sql/rowexec/other.go @@ -223,7 +223,6 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( returnNode = subIterNode returnIter = subIter returnSch = types.OkResultSchema - //returnSch = subIterSch } for { From 352c368adbe1e3e853d26b3dec702664ab5c496b Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 30 Oct 2024 17:15:34 -0700 Subject: [PATCH 17/25] fix server engine test --- sql/plan/common.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sql/plan/common.go b/sql/plan/common.go index 05a91ebabb..7e461d1f9d 100644 --- a/sql/plan/common.go +++ b/sql/plan/common.go @@ -100,6 +100,22 @@ func NodeRepresentsSelect(s sql.Node) bool { if s == nil { return false } + + // Special case for calling procedures that call other procedures. + switch node := s.(type) { + case *Call: + return NodeRepresentsSelect(node.Procedure) + case *Procedure: + return NodeRepresentsSelect(node.Body) + case *Block: + for _, stmt := range node.statements { + if NodeRepresentsSelect(stmt) { + return true + } + } + return false + } + isSelect := false // All SELECT statements, including those that do not specify a table (using "dual"), have a TableNode. transform.Inspect(s, func(node sql.Node) bool { From 0f14692056aad3f45bd48e560c4ede2859e8269b Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 31 Oct 2024 11:07:23 -0700 Subject: [PATCH 18/25] fix --- sql/plan/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/plan/common.go b/sql/plan/common.go index 7e461d1f9d..f8b954a91c 100644 --- a/sql/plan/common.go +++ b/sql/plan/common.go @@ -123,7 +123,7 @@ func NodeRepresentsSelect(s sql.Node) bool { case *AlterAutoIncrement, *AlterIndex, *CreateForeignKey, *CreateIndex, *CreateTable, *CreateTrigger, *DeleteFrom, *DropForeignKey, *InsertInto, *ShowCreateTable, *ShowIndexes, *Truncate, *Update, *Into: return false - case *ResolvedTable, *ProcedureResolvedTable: + case sql.Table: isSelect = true return false default: From c505db77d3f15b8f8f161e3a1b3b7a1760b02e04 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 31 Oct 2024 11:44:01 -0700 Subject: [PATCH 19/25] more fixes --- sql/rowexec/other.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sql/rowexec/other.go b/sql/rowexec/other.go index 5496409264..b9ac346399 100644 --- a/sql/rowexec/other.go +++ b/sql/rowexec/other.go @@ -222,7 +222,13 @@ func (b *BaseBuilder) buildBlock(ctx *sql.Context, n *plan.Block, row sql.Row) ( } else if !selectSeen { returnNode = subIterNode returnIter = subIter - returnSch = types.OkResultSchema + switch subIterNode.(type) { + case *plan.Set, *plan.Into, *plan.Call: + // These nodes return empty schema + returnSch = subIterSch + default: + returnSch = types.OkResultSchema + } } for { From 6ce11adc1d00c3c55e3221d1e6eea6f93450eceb Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 31 Oct 2024 12:58:57 -0700 Subject: [PATCH 20/25] remove error --- engine.go | 24 ++++++------------------ engine_test.go | 2 +- sql/rowexec/dml_iters.go | 14 +++++++------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/engine.go b/engine.go index 9b27630e38..ba598f3c1c 100644 --- a/engine.go +++ b/engine.go @@ -447,7 +447,7 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar } var schema sql.Schema - iter, schema, err = finalizeIters(ctx, analyzed, qFlags, iter) + iter, schema = finalizeIters(ctx, analyzed, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -493,7 +493,7 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. } var schema sql.Schema - iter, schema, err = finalizeIters(ctx, plan, qFlags, iter) + iter, schema = finalizeIters(ctx, plan, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -852,14 +852,7 @@ func (e *Engine) executeEvent(ctx *sql.Context, dbName, createEventStatement, us return err } - iter, _, err = finalizeIters(ctx, definitionNode, nil, iter) - if err != nil { - clearAutocommitErr := clearAutocommitTransaction(ctx) - if clearAutocommitErr != nil { - return clearAutocommitErr - } - return err - } + iter, _ = finalizeIters(ctx, definitionNode, nil, iter) // Drain the iterate to execute the event body/definition // NOTE: No row data is returned for an event; we just need to execute the statements @@ -894,17 +887,12 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { } // finalizeIters applies the final transformations on sql.RowIter before execution. -func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { - var err error +func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, sql.Schema) { var sch sql.Schema - // TODO: if this is does something we need to overwrite the schema with types.OkResultSchema - iter, sch, err = rowexec.AddAccumulatorIter(ctx, iter) - if err != nil { - return nil, nil, err - } + iter, sch = rowexec.AddAccumulatorIter(ctx, iter) iter = rowexec.AddTriggerRollbackIter(ctx, qFlags, iter) iter = rowexec.AddTransactionCommittingIter(qFlags, iter) iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = rowexec.AddExpressionCloser(analyzed, iter) - return iter, sch, nil + return iter, sch } diff --git a/engine_test.go b/engine_test.go index 562f24b552..c046ba9a0a 100755 --- a/engine_test.go +++ b/engine_test.go @@ -232,7 +232,7 @@ func TestTrackProcess(t *testing.T) { iter, err := rowexec.DefaultBuilder.Build(ctx, result, nil) require.NoError(err) - iter, _, err = finalizeIters(ctx, result, nil, iter) + iter, _ = finalizeIters(ctx, result, nil, iter) require.NoError(err) _, err = sql.RowIterToRows(ctx, iter) require.NoError(err) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index c5ddde8587..b6ec32281e 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -563,26 +563,26 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow } } -func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema, error) { +func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema) { switch i := iter.(type) { case *callIter: - childIter, sch, err := AddAccumulatorIter(ctx, i.innerIter) + childIter, sch := AddAccumulatorIter(ctx, i.innerIter) i.innerIter = childIter - return i, sch, err + return i, sch case *beginEndIter: - childIter, sch, err := AddAccumulatorIter(ctx, i.rowIter) + childIter, sch := AddAccumulatorIter(ctx, i.rowIter) i.rowIter = childIter - return i, sch, err + return i, sch default: clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) > 0 rowHandler := getRowHandler(clientFoundRowsToggled, iter) if rowHandler == nil { - return iter, nil, nil + return iter, nil } return &accumulatorIter{ iter: iter, updateRowHandler: rowHandler, - }, types.OkResultSchema, nil + }, types.OkResultSchema } } From 3894c874c17b489174ad4c5d379bb7a71bb12cd0 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 31 Oct 2024 13:42:59 -0700 Subject: [PATCH 21/25] move finalize to rowexec --- engine.go | 17 +++-------------- engine_test.go | 2 +- sql/rowexec/builder.go | 14 +++++++++++++- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/engine.go b/engine.go index ba598f3c1c..9a11b5067d 100644 --- a/engine.go +++ b/engine.go @@ -447,7 +447,7 @@ func (e *Engine) QueryWithBindings(ctx *sql.Context, query string, parsed sqlpar } var schema sql.Schema - iter, schema = finalizeIters(ctx, analyzed, qFlags, iter) + iter, schema = rowexec.FinalizeIters(ctx, analyzed, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -493,7 +493,7 @@ func (e *Engine) PrepQueryPlanForExecution(ctx *sql.Context, _ string, plan sql. } var schema sql.Schema - iter, schema = finalizeIters(ctx, plan, qFlags, iter) + iter, schema = rowexec.FinalizeIters(ctx, plan, qFlags, iter) if err != nil { clearAutocommitErr := clearAutocommitTransaction(ctx) if clearAutocommitErr != nil { @@ -852,7 +852,7 @@ func (e *Engine) executeEvent(ctx *sql.Context, dbName, createEventStatement, us return err } - iter, _ = finalizeIters(ctx, definitionNode, nil, iter) + iter, _ = rowexec.FinalizeIters(ctx, definitionNode, nil, iter) // Drain the iterate to execute the event body/definition // NOTE: No row data is returned for an event; we just need to execute the statements @@ -885,14 +885,3 @@ func findCreateEventNode(planTree sql.Node) (*plan.CreateEvent, error) { return createEventNode, nil } - -// finalizeIters applies the final transformations on sql.RowIter before execution. -func finalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, sql.Schema) { - var sch sql.Schema - iter, sch = rowexec.AddAccumulatorIter(ctx, iter) - iter = rowexec.AddTriggerRollbackIter(ctx, qFlags, iter) - iter = rowexec.AddTransactionCommittingIter(qFlags, iter) - iter = plan.AddTrackedRowIter(ctx, analyzed, iter) - iter = rowexec.AddExpressionCloser(analyzed, iter) - return iter, sch -} diff --git a/engine_test.go b/engine_test.go index c046ba9a0a..98c40e16e2 100755 --- a/engine_test.go +++ b/engine_test.go @@ -232,7 +232,7 @@ func TestTrackProcess(t *testing.T) { iter, err := rowexec.DefaultBuilder.Build(ctx, result, nil) require.NoError(err) - iter, _ = finalizeIters(ctx, result, nil, iter) + iter, _ = rowexec.FinalizeIters(ctx, result, nil, iter) require.NoError(err) _, err = sql.RowIterToRows(ctx, iter) require.NoError(err) diff --git a/sql/rowexec/builder.go b/sql/rowexec/builder.go index 62a560b17c..a940691d96 100644 --- a/sql/rowexec/builder.go +++ b/sql/rowexec/builder.go @@ -15,7 +15,8 @@ package rowexec import ( - "runtime/trace" + "github.com/dolthub/go-mysql-server/sql/plan" +"runtime/trace" "github.com/dolthub/go-mysql-server/sql" ) @@ -42,3 +43,14 @@ func (b *BaseBuilder) Build(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIte func NewOverrideBuilder(override sql.NodeExecBuilder) sql.NodeExecBuilder { return &BaseBuilder{override: override} } + +// FinalizeIters applies the final transformations on sql.RowIter before execution. +func FinalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter sql.RowIter) (sql.RowIter, sql.Schema) { + var sch sql.Schema + iter, sch = AddAccumulatorIter(ctx, iter) + iter = AddTriggerRollbackIter(ctx, qFlags, iter) + iter = AddTransactionCommittingIter(qFlags, iter) + iter = plan.AddTrackedRowIter(ctx, analyzed, iter) + iter = AddExpressionCloser(analyzed, iter) + return iter, sch +} \ No newline at end of file From fa99f5b2c9f31e737c6fbb3772f51b7b80e01ac7 Mon Sep 17 00:00:00 2001 From: jycor Date: Thu, 31 Oct 2024 20:44:16 +0000 Subject: [PATCH 22/25] [ga-format-pr] Run ./format_repo.sh to fix formatting --- sql/rowexec/builder.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/rowexec/builder.go b/sql/rowexec/builder.go index a940691d96..0dfe4f1109 100644 --- a/sql/rowexec/builder.go +++ b/sql/rowexec/builder.go @@ -15,8 +15,9 @@ package rowexec import ( + "runtime/trace" + "github.com/dolthub/go-mysql-server/sql/plan" -"runtime/trace" "github.com/dolthub/go-mysql-server/sql" ) @@ -53,4 +54,4 @@ func FinalizeIters(ctx *sql.Context, analyzed sql.Node, qFlags *sql.QueryFlags, iter = plan.AddTrackedRowIter(ctx, analyzed, iter) iter = AddExpressionCloser(analyzed, iter) return iter, sch -} \ No newline at end of file +} From 1cef4d6786dd23bdf0bce8aba9f8bbb27e6dfd37 Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 1 Nov 2024 11:33:11 -0700 Subject: [PATCH 23/25] custom iterator --- sql/rowexec/dml_iters.go | 4 ++++ sql/rows.go | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index b6ec32281e..fb88dd882a 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -565,6 +565,10 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema) { switch i := iter.(type) { + case sql.CustomRowIter: + childIter := i.GetChildIter() + childIter, sch := AddAccumulatorIter(ctx, childIter) + return i.SetChildIter(childIter), sch case *callIter: childIter, sch := AddAccumulatorIter(ctx, i.innerIter) i.innerIter = childIter diff --git a/sql/rows.go b/sql/rows.go index 21920517ae..57447af703 100644 --- a/sql/rows.go +++ b/sql/rows.go @@ -201,3 +201,11 @@ func (i *sliceRowIter) Close(*Context) error { i.rows = nil return nil } + +// CustomRowIter is an extension of RowIter for integrators that wrap RowIters. +// It allows for analysis rules to inspect the underlying RowIters. +type CustomRowIter interface { + RowIter + GetChildIter() RowIter + SetChildIter(childIter RowIter) RowIter +} From 0c5a32340a379cc20fb9c01f8483edcdd44ff330 Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 1 Nov 2024 15:03:19 -0700 Subject: [PATCH 24/25] mutable --- sql/rowexec/dml_iters.go | 12 ++------- sql/rowexec/proc_iters.go | 52 +++++++++++++++++++++++++++++---------- sql/rows.go | 6 ++--- 3 files changed, 44 insertions(+), 26 deletions(-) diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index fb88dd882a..914bf4985c 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -565,18 +565,10 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow func AddAccumulatorIter(ctx *sql.Context, iter sql.RowIter) (sql.RowIter, sql.Schema) { switch i := iter.(type) { - case sql.CustomRowIter: + case sql.MutableRowIter: childIter := i.GetChildIter() childIter, sch := AddAccumulatorIter(ctx, childIter) - return i.SetChildIter(childIter), sch - case *callIter: - childIter, sch := AddAccumulatorIter(ctx, i.innerIter) - i.innerIter = childIter - return i, sch - case *beginEndIter: - childIter, sch := AddAccumulatorIter(ctx, i.rowIter) - i.rowIter = childIter - return i, sch + return i.WithChildIter(childIter), sch default: clientFoundRowsToggled := (ctx.Client().Capabilities & mysql.CapabilityClientFoundRows) > 0 rowHandler := getRowHandler(clientFoundRowsToggled, iter) diff --git a/sql/rowexec/proc_iters.go b/sql/rowexec/proc_iters.go index 9a02d1e386..07a6cb853d 100644 --- a/sql/rowexec/proc_iters.go +++ b/sql/rowexec/proc_iters.go @@ -66,7 +66,7 @@ type beginEndIter struct { rowIter sql.RowIter } -var _ sql.RowIter = (*beginEndIter)(nil) +var _ sql.MutableRowIter = (*beginEndIter)(nil) // Next implements the interface sql.RowIter. func (b *beginEndIter) Next(ctx *sql.Context) (sql.Row, error) { @@ -99,40 +99,54 @@ func (b *beginEndIter) Close(ctx *sql.Context) error { return b.rowIter.Close(ctx) } +// GetChildIter implements the sql.MutableRowIter interface. +func (b *beginEndIter) GetChildIter() sql.RowIter { + return b.rowIter +} + +// WithChildIter implements the sql.MutableRowIter interface. +func (b *beginEndIter) WithChildIter(child sql.RowIter) sql.RowIter { + nb := *b + nb.rowIter = child + return &nb +} + // callIter is the row iterator for *Call. type callIter struct { call *plan.Call innerIter sql.RowIter } +var _ sql.MutableRowIter = (*callIter)(nil) + // Next implements the sql.RowIter interface. -func (iter *callIter) Next(ctx *sql.Context) (sql.Row, error) { - return iter.innerIter.Next(ctx) +func (ci *callIter) Next(ctx *sql.Context) (sql.Row, error) { + return ci.innerIter.Next(ctx) } // Close implements the sql.RowIter interface. -func (iter *callIter) Close(ctx *sql.Context) error { - err := iter.innerIter.Close(ctx) +func (ci *callIter) Close(ctx *sql.Context) error { + err := ci.innerIter.Close(ctx) if err != nil { return err } - err = iter.call.Pref.CloseAllCursors(ctx) + err = ci.call.Pref.CloseAllCursors(ctx) if err != nil { return err } // Set all user and system variables from INOUT and OUT params - for i, param := range iter.call.Procedure.Params { + for i, param := range ci.call.Procedure.Params { if param.Direction == plan.ProcedureParamDirection_Inout || - (param.Direction == plan.ProcedureParamDirection_Out && iter.call.Pref.VariableHasBeenSet(param.Name)) { - val, err := iter.call.Pref.GetVariableValue(param.Name) + (param.Direction == plan.ProcedureParamDirection_Out && ci.call.Pref.VariableHasBeenSet(param.Name)) { + val, err := ci.call.Pref.GetVariableValue(param.Name) if err != nil { return err } - typ := iter.call.Pref.GetVariableType(param.Name) + typ := ci.call.Pref.GetVariableType(param.Name) - switch callParam := iter.call.Params[i].(type) { + switch callParam := ci.call.Params[i].(type) { case *expression.UserVar: err = ctx.SetUserVariable(ctx, callParam.Name, val, typ) if err != nil { @@ -150,9 +164,9 @@ func (iter *callIter) Close(ctx *sql.Context) error { } else if param.Direction == plan.ProcedureParamDirection_Out { // VariableHasBeenSet was false // For OUT only, if a var was not set within the procedure body, then we set the vars to nil. // If the var had a value before the call then it is basically removed. - switch callParam := iter.call.Params[i].(type) { + switch callParam := ci.call.Params[i].(type) { case *expression.UserVar: - err = ctx.SetUserVariable(ctx, callParam.Name, nil, iter.call.Pref.GetVariableType(param.Name)) + err = ctx.SetUserVariable(ctx, callParam.Name, nil, ci.call.Pref.GetVariableType(param.Name)) if err != nil { return err } @@ -170,6 +184,18 @@ func (iter *callIter) Close(ctx *sql.Context) error { return nil } +// GetChildIter implements the sql.MutableRowIter interface. +func (ci *callIter) GetChildIter() sql.RowIter { + return ci.innerIter +} + +// WithChildIter implements the sql.MutableRowIter interface. +func (ci *callIter) WithChildIter(child sql.RowIter) sql.RowIter { + nci := *ci + nci.innerIter = child + return &nci +} + type elseCaseErrorIter struct{} var _ sql.RowIter = elseCaseErrorIter{} diff --git a/sql/rows.go b/sql/rows.go index 57447af703..a01757ce05 100644 --- a/sql/rows.go +++ b/sql/rows.go @@ -202,10 +202,10 @@ func (i *sliceRowIter) Close(*Context) error { return nil } -// CustomRowIter is an extension of RowIter for integrators that wrap RowIters. +// MutableRowIter is an extension of RowIter for integrators that wrap RowIters. // It allows for analysis rules to inspect the underlying RowIters. -type CustomRowIter interface { +type MutableRowIter interface { RowIter GetChildIter() RowIter - SetChildIter(childIter RowIter) RowIter + WithChildIter(childIter RowIter) RowIter } From 0365f1d3e3a686f6e2a1f76ee32368175e200cb4 Mon Sep 17 00:00:00 2001 From: James Cor Date: Fri, 1 Nov 2024 15:18:21 -0700 Subject: [PATCH 25/25] tidying up --- sql/rowexec/builder.go | 3 +-- sql/rowexec/dml_iters.go | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sql/rowexec/builder.go b/sql/rowexec/builder.go index 0dfe4f1109..28c9481f36 100644 --- a/sql/rowexec/builder.go +++ b/sql/rowexec/builder.go @@ -17,9 +17,8 @@ package rowexec import ( "runtime/trace" - "github.com/dolthub/go-mysql-server/sql/plan" - "github.com/dolthub/go-mysql-server/sql" + "github.com/dolthub/go-mysql-server/sql/plan" ) var DefaultBuilder = &BaseBuilder{} diff --git a/sql/rowexec/dml_iters.go b/sql/rowexec/dml_iters.go index 914bf4985c..e9366649bf 100644 --- a/sql/rowexec/dml_iters.go +++ b/sql/rowexec/dml_iters.go @@ -528,16 +528,6 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow return getRowHandler(clientFoundRowsToggled, i.child) case *blockIter: return getRowHandler(clientFoundRowsToggled, i.repIter) - case *insertIter: - if i.replacer != nil { - return &replaceRowHandler{} - } - if i.updater != nil { - return &onDuplicateUpdateHandler{schema: i.schema, clientFoundRowsCapability: clientFoundRowsToggled} - } - return &insertRowHandler{} - case *deleteIter: - return &deleteRowHandler{} case *updateIter: // it's possible that there's an updateJoinIter that's not the immediate child of updateIter rowHandler := getRowHandler(clientFoundRowsToggled, i.childIter) @@ -545,7 +535,7 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow return rowHandler } sch := i.schema - // special case for foreign keys, plan.ForeignKeyHandler.Schema() returns original schema + // special case for foreign keys; plan.ForeignKeyHandler.Schema() returns original schema if fkHandler, isFk := i.updater.(*plan.ForeignKeyHandler); isFk { sch = fkHandler.Sch } @@ -558,6 +548,16 @@ func getRowHandler(clientFoundRowsToggled bool, iter sql.RowIter) accumulatorRow } i.accumulator = rowHandler return rowHandler + case *insertIter: + if i.replacer != nil { + return &replaceRowHandler{} + } + if i.updater != nil { + return &onDuplicateUpdateHandler{schema: i.schema, clientFoundRowsCapability: clientFoundRowsToggled} + } + return &insertRowHandler{} + case *deleteIter: + return &deleteRowHandler{} default: return nil }