summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 09:34:07 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 09:34:07 +0100
commitba26b71d316e31ae6f5db57e13800f514ac83ec5 (patch)
tree2fb522edcaf99f94040b8049c080cae436043dd2 /sql/sql_select.h
parent27d45e46968e4bd623565688a997b83b0a5cc1a8 (diff)
downloadmariadb-git-ba26b71d316e31ae6f5db57e13800f514ac83ec5.tar.gz
MDEV-5549 Wrong row counter in found_rows() result
only let filesort() count rows for SQL_CALC_ROWS if it's using priority queue
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index c413d0ca023..bd0433eb5ee 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1119,6 +1119,12 @@ public:
restore_no_rows_in_result() in ::reinit()
*/
bool no_rows_in_result_called;
+
+ /**
+ This is set if SQL_CALC_ROWS was calculated by filesort()
+ and should be taken from the appropriate JOIN_TAB
+ */
+ bool filesort_found_rows;
/**
Copy of this JOIN to be used with temporary tables.
@@ -1334,6 +1340,7 @@ public:
emb_sjm_nest= NULL;
sjm_lookup_tables= 0;
+ filesort_found_rows= false;
exec_saved_explain= false;
/*
The following is needed because JOIN::cleanup(true) may be called for