diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-02-23 21:35:05 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-02-23 21:35:05 +0100 |
commit | a5679af1b13bb0c7c4eaa75f27551072dc18fb7d (patch) | |
tree | 7d039fb5e83c331daa75f9b9b67625b0469f6a9b /sql/sql_lex.cc | |
parent | 20c4dfd4a9e7c5f2f570488a7ead0b7c74e61817 (diff) | |
parent | 5f2f3c4fa81851b45dcee33601f14e05f6407333 (diff) | |
download | mariadb-git-a5679af1b13bb0c7c4eaa75f27551072dc18fb7d.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 898e3ae33c6..2ebadb10089 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2015, MariaDB + Copyright (c) 2009, 2016, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3916,6 +3916,19 @@ void SELECT_LEX::update_used_tables() tl->on_expr->update_used_tables(); tl->on_expr->walk(&Item::eval_not_null_tables, 0, NULL); } + /* + - There is no need to check sj_on_expr, because merged semi-joins inject + sj_on_expr into the parent's WHERE clase. + - For non-merged semi-joins (aka JTBMs), we need to check their + left_expr. There is no need to check the rest of the subselect, we know + it is uncorrelated and so cannot refer to any tables in this select. + */ + if (tl->jtbm_subselect) + { + Item *left_expr= tl->jtbm_subselect->left_expr; + left_expr->walk(&Item::update_table_bitmaps_processor, FALSE, NULL); + } + embedding= tl->embedding; while (embedding) { |