Skip to content

Commit

Permalink
Fix bug 1419230 (The stored procedure key uses spaces instead of
Browse files Browse the repository at this point in the history
underscores in the extended slow query log).

The stored procedure identifier is logged with a "# Stored procedure:
" key, where as the rest of information use underscores, i.e. "#
QC_Hit: ". Fixed trivially, adjusted the testcase.
  • Loading branch information
laurynas-biveinis committed Feb 20, 2015
1 parent 3fb146c commit 84ae2d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mysql-test/r/percona_log_slow_sp_statements.result
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ EXECUTE stmt;
[log_grep.inc] lines: 2
[log_grep.inc] file: percona.slow_extended.sp1 pattern: CALL test_
[log_grep.inc] lines: 0
[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored routine: test.test_outer
[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored_routine: test.test_outer
[log_grep.inc] lines: 2
[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored routine: test.test_inner
[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored_routine: test.test_inner
[log_grep.inc] lines: 2
SET GLOBAL log_slow_sp_statements=OFF;
[log_start.inc] percona.slow_extended.sp2
Expand All @@ -55,7 +55,7 @@ EXECUTE stmt;
[log_grep.inc] lines: 0
[log_grep.inc] file: percona.slow_extended.sp2 pattern: CALL test_
[log_grep.inc] lines: 2
[log_grep.inc] file: percona.slow_extended.sp2 pattern: # Stored routine: test.test_
[log_grep.inc] file: percona.slow_extended.sp2 pattern: # Stored_routine: test.test_
[log_grep.inc] lines: 0
DROP PROCEDURE test_outer;
DROP PROCEDURE test_inner;
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/t/percona_log_slow_sp_statements.test
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ EXECUTE stmt;
--source include/log_grep.inc
--let grep_pattern=CALL test_
--source include/log_grep.inc
--let grep_pattern=# Stored routine: test.test_outer
--let grep_pattern=# Stored_routine: test.test_outer
--source include/log_grep.inc
--let grep_pattern=# Stored routine: test.test_inner
--let grep_pattern=# Stored_routine: test.test_inner
--source include/log_grep.inc

SET GLOBAL log_slow_sp_statements=OFF;
Expand All @@ -56,7 +56,7 @@ EXECUTE stmt;
--source include/log_grep.inc
--let grep_pattern=CALL test_
--source include/log_grep.inc
--let grep_pattern=# Stored routine: test.test_
--let grep_pattern=# Stored_routine: test.test_
--source include/log_grep.inc

DROP PROCEDURE test_outer;
Expand Down
2 changes: 1 addition & 1 deletion sql/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, ulonglong current_utime,
if (opt_log_slow_sp_statements &&
thd->spcont &&
my_b_printf(&log_file,
"# Stored routine: %s\n",
"# Stored_routine: %s\n",
thd->spcont->sp->m_qname.str) == (uint) -1)
tmp_errno= errno;

Expand Down

0 comments on commit 84ae2d2

Please sign in to comment.