Skip to content

Commit 3e92db9

Browse files
sqlparser: remove strings.Clone from NewIdentifierCS (#19683)
1 parent 0da032e commit 3e92db9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

go/vt/sqlparser/ast_funcs.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,11 +1084,7 @@ func (node *IdentifierCI) UnmarshalJSON(b []byte) error {
10841084

10851085
// NewIdentifierCS creates a new IdentifierCS.
10861086
func NewIdentifierCS(str string) IdentifierCS {
1087-
// Use StringClone on the table name to ensure it is not pinned to the
1088-
// underlying query string that has been generated by the parser. This
1089-
// could lead to a significant increase in memory usage when the table
1090-
// name comes from a large query.
1091-
return IdentifierCS{v: strings.Clone(str)}
1087+
return IdentifierCS{v: str}
10921088
}
10931089

10941090
// IsEmpty returns true if TabIdent is empty.

0 commit comments

Comments
 (0)