Skip to content

Commit

Permalink
sql: fix assignment of global typDelim var
Browse files Browse the repository at this point in the history
This fixes a bug that caused tests to fail under stress.

Release note: None
  • Loading branch information
rafiss committed Jun 7, 2022
1 parent 02cc393 commit 5ebce2e
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 5ebce2e

Please sign in to comment.