summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-08-02 11:33:45 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-08-02 11:33:45 +0400
commitde3693a1cd292af3efd8841414da866ee2c2e1de (patch)
tree12ae3424978cad870dff4198962862e5c0573ab0 /sql/sql_class.h
parent7841c3f574a7a12b8ed44001b92da7f28764de63 (diff)
downloadmariadb-git-de3693a1cd292af3efd8841414da866ee2c2e1de.tar.gz
Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
There is an optimization of DISTINCT in JOIN::optimize() which depends on THD::used_tables value. Each SELECT statement inside SP resets used_tables value(see mysql_select()) and it leads to wrong result. The fix is to replace THD::used_tables with LEX::used_tables.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index bf197fee9c3..3c1b2c1330f 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1734,13 +1734,6 @@ public:
*/
ha_rows examined_row_count;
- /*
- The set of those tables whose fields are referenced in all subqueries
- of the query.
- TODO: possibly this it is incorrect to have used tables in THD because
- with more than one subquery, it is not clear what does the field mean.
- */
- table_map used_tables;
USER_CONN *user_connect;
CHARSET_INFO *db_charset;
/*