diff --git a/go/vt/mysqlctl/schema.go b/go/vt/mysqlctl/schema.go index a90ed76943d..c50cd439aaa 100644 --- a/go/vt/mysqlctl/schema.go +++ b/go/vt/mysqlctl/schema.go @@ -58,10 +58,10 @@ func encodeTableName(tableName string) string { return buf.String() } -// tableListSql returns an IN clause "('t1', 't2'...) for a list of tables." -func tableListSql(tables []string) (string, error) { +// tableListSQL returns an IN clause "('t1', 't2'...) for a list of tables." +func tableListSQL(tables []string) (string, error) { if len(tables) == 0 { - return "", vterrors.New(vtrpc.Code_INTERNAL, "no tables for tableListSql") + return "", vterrors.New(vtrpc.Code_INTERNAL, "no tables for tableListSQL") } encodedTables := make([]string, len(tables)) @@ -234,7 +234,7 @@ func (mysqld *Mysqld) collectSchema(ctx context.Context, dbName, tableName, tabl // normalizedSchema returns a table schema with database names replaced, and auto_increment annotations removed. func (mysqld *Mysqld) normalizedSchema(ctx context.Context, dbName, tableName, tableType string) (string, error) { backtickDBName := sqlescape.EscapeID(dbName) - qr, fetchErr := mysqld.FetchSuperQuery(ctx, fmt.Sprintf("SHOW CREATE TABLE %s.%s", dbName, sqlescape.EscapeID(tableName))) + qr, fetchErr := mysqld.FetchSuperQuery(ctx, fmt.Sprintf("SHOW CREATE TABLE %s.%s", backtickDBName, sqlescape.EscapeID(tableName))) if fetchErr != nil { return "", fetchErr } @@ -308,7 +308,7 @@ func (mysqld *Mysqld) getPrimaryKeyColumns(ctx context.Context, dbName string, t } defer conn.Recycle() - tableList, err := tableListSql(tables) + tableList, err := tableListSQL(tables) if err != nil { return nil, err }