![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
| Hi, My question is related to MySQL administration, where I don't have any particular experience. I would to trace every SQL statement executed inside a procedure that is called by a client: CREATE PROCEDURE foo() NOT DETERMINISTIC MODIFIES SQL DATA COMMENT 'Generate the required number of random battles' BEGIN <statement 1> <statement 2> <statement 3> END; The problem is that the mysql-slow.log file only contains a trace of the call to the procedure; it does not provide any trace of every subsequent statement executed by the procedure itself: # Time: 070607 1:23:04 # User@Host: dbo[dbo] @ localhost [] # Query_time: 0 Lock_time: 0 Rows_sent: 0 Rows_examined: 2 SET last_insert_id=27274; CALL foo(); Is there any way to configure mysqld to trace every statement executed by MySQL? For information, my current configuration is the following: [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english long_query_time = 1 log-queries-not-using-indexes skip-external-locking verbose log_bin_trust_function_creators = 1 Thanks a lot! -- Daniel |
| |||
| Daniel vi t: > [mysqld] > user = mysql > pid-file = /var/run/mysqld/mysqld.pid > socket = /var/run/mysqld/mysqld.sock > port = 3306 > basedir = /usr > datadir = /var/lib/mysql > tmpdir = /tmp > language = /usr/share/mysql/english > long_query_time = 1 > log-queries-not-using-indexes > skip-external-locking > verbose > log_bin_trust_function_creators = 1 My MySQL configuration file also contains the following lines: log = /var/log/mysql/mysql.log log-long-format log-slow-queries = /var/log/mysql/mysql-slow.log However the mysql.log file just contains the stored procedure call: 12 Query CALL foo() I though that the SQL engine was also logging every query that it executes. -- Daniel |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |