summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-10-16 20:24:02 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-10-16 20:24:02 +0400
commit70f066eba48f2d6248c9bb912fd28bc4a3091b8e (patch)
tree13a57b7db9b45fa0ad4f259e91170b5ff3a18bea /sql/sp_head.cc
parent3bf20bc7de3e9016b62705904933d30d2bd97fd1 (diff)
parent73f8b4dac263964482b532199151c87596f191b7 (diff)
downloadmariadb-git-70f066eba48f2d6248c9bb912fd28bc4a3091b8e.tar.gz
Merge 5.5 -> 10.0-base
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 4cf4a0731a8..0c887c5e157 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3170,7 +3170,15 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
log_slow_statement(thd);
}
else
+ {
+ /* change statistics */
+ enum_sql_command save_sql_command= thd->lex->sql_command;
+ thd->lex->sql_command= SQLCOM_SELECT;
+ status_var_increment(thd->status_var.com_stat[SQLCOM_SELECT]);
+ thd->update_stats();
+ thd->lex->sql_command= save_sql_command;
*nextp= m_ip+1;
+ }
thd->set_query(query_backup);
thd->query_name_consts= 0;