func (c *conn) normalizeTableName(table *parser.TableName) error { if table.Qualifier == "" { if c.database == "" { return fmt.Errorf("no database specified") } table.Qualifier = c.database } if table.Name == "" { return fmt.Errorf("empty table name: %s", table) } return nil }
func (s *Server) normalizeTableName(database string, table *parser.TableName) error { if table.Qualifier == "" { if database == "" { return fmt.Errorf("no database specified") } table.Qualifier = database } if table.Name == "" { return fmt.Errorf("empty table name: %s", table) } return nil }