diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2015-06-20 04:20:18 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2015-06-20 04:20:18 +0300 |
commit | ebe2bd74fe7e30306feefae7acf201d18cbec267 (patch) | |
tree | d652f1efbfdf04d6374b404404c898e6a2816549 /sql/sql_analyze_stmt.cc | |
parent | f33173d19e7ff25c7b185b23172e248ee5df7b4c (diff) | |
download | mariadb-git-ebe2bd74fe7e30306feefae7acf201d18cbec267.tar.gz |
MDEV-7836: ANALYZE FORMAT=JSON should provide info about GROUP BY
ANALYZE should also record remove_duplicates() operation.
Diffstat (limited to 'sql/sql_analyze_stmt.cc')
-rw-r--r-- | sql/sql_analyze_stmt.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/sql_analyze_stmt.cc b/sql/sql_analyze_stmt.cc index eae47743b03..da1e970d0b8 100644 --- a/sql/sql_analyze_stmt.cc +++ b/sql/sql_analyze_stmt.cc @@ -113,3 +113,22 @@ void Sort_and_group_tracker::report_tmp_table(TABLE *tbl) cur_action++; } + +void Sort_and_group_tracker::report_duplicate_removal() +{ + DBUG_ASSERT(cur_action < MAX_QEP_ACTIONS); + if (total_actions) + { + /* This is not the first execution. Check if the steps match. */ + if (qep_actions[cur_action] != EXPL_ACTION_REMOVE_DUPS) + varied_executions= true; + } + + if (!varied_executions) + { + qep_actions[cur_action]= EXPL_ACTION_REMOVE_DUPS; + } + + cur_action++; +} + |