Im using MySQL for implementing our research techniques and Im pretty new to MySQL's source code.

I would like to know the "function" in the source code from where I would be able to intercept all the user queries.

For ex, when the user types

mysql> begin;use test;select * from students;commit;

Im not able to intercept the entire user transaction in a single variable. (Ex. char *packet).

this variable only has a value "begin" initially and then has a value "use test" and so on.

Guys who are working on MySQL source code, please let me know the place where I could intercept the entire transaction in a single variable.

Thanks so much,