summaryrefslogtreecommitdiff
path: root/sql/item_row.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-06-26 14:05:41 +0400
committerSergey Petrunya <psergey@askmonty.org>2010-06-26 14:05:41 +0400
commit27f9fc063c54ad8c9c0e35e78bbbb14a3e2419af (patch)
treeaf692374b15c7e8186406a1009e678cfedc3e78b /sql/item_row.cc
parent7754be7f4c19d442564d8fef6853e711aa0e3cec (diff)
parent50cc6c9d8a7d68ace0802702f3bc10cb2afb3730 (diff)
downloadmariadb-git-27f9fc063c54ad8c9c0e35e78bbbb14a3e2419af.tar.gz
MariaDB 5.2 -> MariaDB 5.3 merge
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 97bbde2c562..b8fbba2c90e 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -30,7 +30,8 @@
*/
Item_row::Item_row(List<Item> &arg):
- Item(), used_tables_cache(0), const_item_cache(1), with_null(0)
+ Item(), used_tables_cache(0), not_null_tables_cache(0),
+ const_item_cache(1), with_null(0)
{
//TODO: think placing 2-3 component items in item (as it done for function)
@@ -71,7 +72,13 @@ bool Item_row::fix_fields(THD *thd, Item **ref)
Item *item= *arg;
used_tables_cache |= item->used_tables();
const_item_cache&= item->const_item() && !with_null;
- if (const_item_cache)
+ not_null_tables_cache|= item->not_null_tables();
+ /*
+ Some subqueries transformations aren't done in the view_prepare_mode thus
+ is_null() will fail. So we skip is_null() calculation for CREATE VIEW as
+ not necessary.
+ */
+ if (const_item_cache && !thd->lex->view_prepare_mode)
{
if (item->cols() > 1)
with_null|= item->null_inside();