← Back to team overview

maria-discuss team mailing list archive

Re: DELETE FROM RETURNING

 

Yeah, that is the one.  Basically, inside the server there isn't an API for
running a SQL statement and returning the results internally.  The results
of the select are automatically packed and sent over the wire.  Because of
this, there are no real good solutions for running SQL in the server.  I'd
like to be able to use mysql_internal_connect() (a new function that works
like mysql_connect) and then mysql_query() to basically get a
authentication-less (auth is already done) handle to the current connection
and execute sql on it.  For example, it would be great if a rewrite plugin
could run some SQL to populate a table, then rewrite the query as select *
from tmp_table.  While I could write a rewrite plugin the uses the C client
API to run queries as long as I use a username/password to connect, I can't
run them in the context of the original THD, so it can't access temporary
tables created by the C API connection through the THD, so it isn't very
useful.

--Justin



On Thu, Jun 11, 2015 at 6:34 PM, Geoff Montee <geoff.montee@xxxxxxxxx>
wrote:

> On Thu, Jun 11, 2015 at 5:50 PM, Justin Swanhart <greenlion@xxxxxxxxx>
> wrote:
> > It would be very nice if I could exec SQL in the server without hacking
> that using a subclass which would be a big patch.  Any updates on when that
> MDEV (don't know #) will be implemented?
>
> I'm not completely sure which MDEV you are referring to. Is it this one?
>
> https://mariadb.atlassian.net/browse/MDEV-4641
>
> I'm not sure what the progress is on that, but it's still unassigned in
> JIRA.
>
> Geoff
>

References