PCT-671: Support for explain

Alpha prototype, WIP
Daniel,

But if use GoMySQL driver with a connection pool,
it may route a next query to a different connection, with a different
default database.



On Wed, Jul 2, 2014 at 1:35 PM, Daniel Nichter <notifications@github.com>
wrote:

> In mysql/mysql.go:
>
> > @@ -97,6 +99,55 @@ func (c *Connection) Close() {
> >  	}
> >  }
> >
> > +func (c *Connection) Explain(q string, db string) (explain []proto.ExplainRow, err error) {
> > +	// Transaction because we need to ensure USE and EXPLAIN are run in one connection
>
> A transaction isn't required. USE sets the default database for the
> connection; it's not related to transactions. And EXPLAIN not a "real"
> query in the sense that it does not access data so a transaction to capture
> the state of data at a point in time is not required/related.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/percona/percona-agent/pull/63/files#r14481899>.
>



-- 
Vadim Tkachenko, CTO, Percona
Phone +1-925-400-7377,  Skype: vadimtk153

Percona Cloud Tools - to make MySQL Performance Easy
https://clould.percona.com