5

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

Mike
  • 2,735
  • 11
  • 44
  • 68

1 Answers1

7

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.

David H. Bennett
  • 1,822
  • 13
  • 16
  • No, this only works for the current session you are on but does not give you the session of **another** client. – Pacerier Apr 22 '16 at 04:03