Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check the SQL_MODE in mysql for a single process?

Tags:

mysql

sql-mode

How can I check what SQL_MODE is a process is using?

so I see all processed that are currently running using SHOW PROCESSLIST

What I need to do is to know the SQL_MODE that a process is using?

I want to make sure the client that I am using did not change the SQL mode.

Thanks

like image 329
Mike Avatar asked Mar 12 '14 16:03

Mike


1 Answers

Refer to this page.

To determine the current global or session sql_mode value, use the following statements:

SELECT @@GLOBAL.sql_mode;
SELECT @@SESSION.sql_mode;

You are primarily interested in the @@SESSION.sql_mode variable.

like image 184
David H. Bennett Avatar answered Sep 30 '22 02:09

David H. Bennett