this_query
NAME
this_query(): Returns the current query executed by this thread.TYPE
FunctionDESCRIPTION
This function returns the text of query which is now executing under the current process.
Essentially, it is the very same query which invoked this function. That it, the call to this_query() is expected to be found within the result's text.
The function is provided as ground for future query/text analysis routines which would be able to modify query behavior according to query's text.
SYNOPSIS
this_query() RETURNS LONGTEXT CHARSET utf8
EXAMPLES
The most simplistic form:
mysql> SELECT this_query(); +---------------------+ | this_query() | +---------------------+ | SELECT this_query() | +---------------------+