summaryrefslogtreecommitdiff
path: root/mysql-test/r/ps_grant.result
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-06-17 00:11:48 +0400
committerunknown <konstantin@mysql.com>2005-06-17 00:11:48 +0400
commitc0484a301f1dfdac6b63b25cf0e4697a2ad9d05c (patch)
treeaa80d8bfa43a8551cec82a9398a033d8fba6f9fa /mysql-test/r/ps_grant.result
parent51cd70da3dced6800ccf31a6c8e63040b73dbc84 (diff)
downloadmariadb-git-c0484a301f1dfdac6b63b25cf0e4697a2ad9d05c.tar.gz
Fix Bug#9334 "PS API queries in log file" and
Bug#8367 "low log doesn't gives complete information about prepared statements" Implement status variables for prepared statements commands (a port of the patch by Andrey Hristov). See details in comments to the changed files. No test case as there is no way to test slow log/general log in mysqltest. mysql-test/r/ps_grant.result: Now execute is logged with tag 'Execute' (changed result file). sql/mysql_priv.h: - remove obsolete macro. - add declarations for new status variables. - export function log_slow_statement, which now is used in sql_prepare.cc sql/mysqld.cc: Add status variables for prepared statements API: now we record mysql_stmt_close, mysql_stmt_reset, mysql_stmt_prepare, mysql_stmt_execute mysql_stmt_send_long_data, PREPARE, EXECUTE, DEALLOCATE. sql/sql_parse.cc: - account DEALLOCATE prepare as a Com_stmt_close command (close of a prepared statement). sql/sql_prepare.cc: - fix a bug in SQL syntax for prepared statements + logging: if we use --log and EXECUTE stmt USING @no_such_variable;, the server crashed because the old code assumed that the variable returned by get_var_with_binlog is never NULL. - account statistics for mysql_stmt_{prepare,execute,close,reset,send_long_data} in Com_stmt_{prepare,execute,close,reset,send_long_data} correspondingly. - log slow statements into the slow log early, when thd->query points to a valid (with expanded placeholder values) query. The previous version was logging it in sql_parse, when thd->query is empty. Prevent the server from logging the statement twice by setting thd->enable_slow_log= FALSE. - now in case of EXECUTE stmt in SQL syntax for prepared statements the general log gets two queries, e.g. Query EXECUTE stmt USING @a, @b, @c Execute INSERT INTO t1 VALUES (1, 2, 3) This makes the behavior consistent with PREPARE command, which also logs the statement twice.
Diffstat (limited to 'mysql-test/r/ps_grant.result')
-rw-r--r--mysql-test/r/ps_grant.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/ps_grant.result b/mysql-test/r/ps_grant.result
index 0787f30c643..249fb2fe40f 100644
--- a/mysql-test/r/ps_grant.result
+++ b/mysql-test/r/ps_grant.result
@@ -78,4 +78,4 @@ drop database mysqltest;
prepare stmt4 from ' show full processlist ';
execute stmt4;
Id User Host db Command Time State Info
-number root localhost test Query time NULL show full processlist
+number root localhost test Execute time NULL show full processlist