func (rqc *RequestContext) execStreamSQL(conn dbconnpool.PoolConnection, sql string, callback func(*mproto.QueryResult) error) { start := time.Now() err := conn.ExecuteStreamFetch(sql, callback, int(rqc.qe.streamBufferSize.Get())) rqc.logStats.AddRewrittenSql(sql, start) if err != nil { panic(NewTabletErrorSql(FAIL, err)) } }
func (qe *QueryEngine) executeStreamSql(logStats *SQLQueryStats, conn dbconnpool.PoolConnection, sql string, callback func(*mproto.QueryResult) error) { logStats.QuerySources |= QUERY_SOURCE_MYSQL logStats.NumberOfQueries++ logStats.AddRewrittenSql(sql) fetchStart := time.Now() err := conn.ExecuteStreamFetch(sql, callback, int(qe.streamBufferSize.Get())) logStats.MysqlResponseTime += time.Now().Sub(fetchStart) if err != nil { panic(NewTabletErrorSql(FAIL, err)) } }