detecting select SQL statements that are functions

Zardosht Kasheff <[email protected]> Thu, 17 Jan 2013 23:47:07 -0500
Newsgroups gmane.comp.db.mysql.devel
Message-ID <CABFd+SE0X1YdzuAz2WBM81QzbAoeArbUaTD6vxdibK4JjmM3ag@mail.gmail.com>
Hello all,

In our storage engine's handler, we would like to be able to detect
when a statement is just a simple select statement, that is,
"read-only".

In MySQL 5.6, InnoDB seems to do this with the function thd_trx_is_auto_commit.

We have tried to do something similar in MySQL 5.5.

The problem we run into is when the select statement is a function,
and the function performs a write. With the thd, is there a way to
detect that the statement is not a simple select, but rather calling a
function?

Thanks
-Zardosht

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals