MCPcopy
hub / github.com/github/gh-ost / getSafeTableName

Function getSafeTableName

go/base/context.go:361–368  ·  view source on GitHub ↗
(baseName string, suffix string)

Source from the content-addressed store, hash-verified

359}
360
361func getSafeTableName(baseName string, suffix string) string {
362 name := fmt.Sprintf("_%s_%s", baseName, suffix)
363 if len(name) <= mysql.MaxTableNameLength {
364 return name
365 }
366 extraCharacters := len(name) - mysql.MaxTableNameLength
367 return fmt.Sprintf("_%s_%s", baseName[0:len(baseName)-extraCharacters], suffix)
368}
369
370// GetGhostTableName generates the name of ghost table, based on original table name
371// or a given table name

Callers 4

GetGhostTableNameMethod · 0.85
GetOldTableNameMethod · 0.85
GetChangelogTableNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…