Skip to content

Commit

Permalink
Merge #82526
Browse files Browse the repository at this point in the history
82526: sql: fix assignment of global typDelim var r=rafiss a=rafiss

refs #82304

This fixes a bug that caused tests to fail under stress.

Release note: None

Co-authored-by: Rafi Shamim <[email protected]>
  • Loading branch information
craig[bot] and rafiss committed Jun 7, 2022
2 parents 02cc393 + 5ebce2e commit ba4d29e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sql/pg_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -2800,7 +2800,7 @@ var (
_ = typCategoryRange
_ = typCategoryBitString

typDelim = tree.NewDString(",")
commaTypDelim = tree.NewDString(",")
)

func tableIDToTypeOID(table catalog.TableDescriptor) tree.Datum {
Expand Down Expand Up @@ -2833,7 +2833,7 @@ func addPGTypeRowForTable(
typCategoryComposite, // typcategory
tree.DBoolFalse, // typispreferred
tree.DBoolTrue, // typisdefined
typDelim, // typdelim
commaTypDelim, // typdelim
tableOid(table.GetID()), // typrelid
oidZero, // typelem
// NOTE: we do not add the array type or OID here.
Expand Down Expand Up @@ -2902,7 +2902,7 @@ func addPGTypeRow(
typType = typTypePseudo
}
typname := typ.PGName()
typDelim = tree.NewDString(typ.Delimiter())
typDelim := tree.NewDString(typ.Delimiter())
return addRow(
tree.NewDOid(tree.DInt(typ.Oid())), // oid
tree.NewDName(typname), // typname
Expand Down

0 comments on commit ba4d29e

Please sign in to comment.