@@ -59,7 +59,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
5959 selectNode := builder .qry .Nodes [lastNodeID ]
6060 selectTag := selectNode .BindingTags [0 ]
6161
62- fullProjTag := builder .genNewTag ()
62+ fullProjTag := builder .genNewBindTag ()
6363 fullProjList := make ([]* plan.Expr , 0 , len (selectNode .ProjectList )+ len (tableDef .Cols ))
6464 for i , expr := range selectNode .ProjectList {
6565 fullProjList = append (fullProjList , & plan.Expr {
@@ -80,7 +80,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
8080
8181 // get old columns from existing main table
8282 {
83- oldScanTag := builder .genNewTag ()
83+ oldScanTag := builder .genNewBindTag ()
8484
8585 builder .addNameByColRef (oldScanTag , tableDef )
8686
@@ -186,7 +186,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
186186
187187 // detect primary key confliction
188188 {
189- scanTag := builder .genNewTag ()
189+ scanTag := builder .genNewBindTag ()
190190
191191 // handle primary/unique key confliction
192192 builder .addNameByColRef (scanTag , tableDef )
@@ -268,7 +268,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
268268 continue
269269 }
270270
271- idxTag := builder .genNewTag ()
271+ idxTag := builder .genNewBindTag ()
272272 builder .addNameByColRef (idxTag , idxTableDefs [i ])
273273
274274 idxScanNode := & plan.Node {
@@ -352,7 +352,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
352352
353353 // get old RowID for index tables
354354 for i := range tableDef .Indexes {
355- idxTag := builder .genNewTag ()
355+ idxTag := builder .genNewBindTag ()
356356 builder .addNameByColRef (idxTag , idxTableDefs [i ])
357357
358358 idxScanNode := & plan.Node {
@@ -408,7 +408,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
408408 lockTargets := make ([]* plan.LockTarget , 0 )
409409 updateCtxList := make ([]* plan.UpdateCtx , 0 )
410410
411- finalProjTag := builder .genNewTag ()
411+ finalProjTag := builder .genNewBindTag ()
412412 finalProjList := make ([]* plan.Expr , 0 , len (tableDef .Cols )+ len (tableDef .Indexes )* 2 )
413413 var newPkIdx int32
414414
@@ -580,7 +580,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
580580 NodeType : plan .Node_LOCK_OP ,
581581 Children : []int32 {lastNodeID },
582582 TableDef : tableDef ,
583- BindingTags : []int32 {builder .genNewTag ()},
583+ BindingTags : []int32 {builder .genNewBindTag ()},
584584 LockTargets : lockTargets ,
585585 }, bindCtx )
586586 reCheckifNeedLockWholeTable (builder )
@@ -589,7 +589,7 @@ func (builder *QueryBuilder) appendDedupAndMultiUpdateNodesForBindReplace(
589589 lastNodeID = builder .appendNode (& plan.Node {
590590 NodeType : plan .Node_MULTI_UPDATE ,
591591 Children : []int32 {lastNodeID },
592- BindingTags : []int32 {builder .genNewTag ()},
592+ BindingTags : []int32 {builder .genNewBindTag ()},
593593 UpdateCtxList : updateCtxList ,
594594 }, bindCtx )
595595
@@ -614,8 +614,8 @@ func (builder *QueryBuilder) appendNodesForReplaceStmt(
614614
615615 projList1 := make ([]* plan.Expr , 0 , len (tableDef .Cols )- 1 )
616616 projList2 := make ([]* plan.Expr , 0 , len (tableDef .Cols )- 1 )
617- projTag1 := builder .genNewTag ()
618- preInsertTag := builder .genNewTag ()
617+ projTag1 := builder .genNewBindTag ()
618+ preInsertTag := builder .genNewBindTag ()
619619
620620 var (
621621 compPkeyExpr * plan.Expr
@@ -778,7 +778,7 @@ func (builder *QueryBuilder) appendNodesForReplaceStmt(
778778 NodeType : plan .Node_PROJECT ,
779779 ProjectList : projList2 ,
780780 Children : []int32 {lastNodeID },
781- BindingTags : []int32 {builder .genNewTag ()},
781+ BindingTags : []int32 {builder .genNewBindTag ()},
782782 }, tmpCtx )
783783
784784 return lastNodeID , colName2Idx , skipUniqueIdx , nil
0 commit comments