summaryrefslogtreecommitdiff
path: root/sql/item_row.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-12-31 18:39:16 +0200
committerunknown <bell@sanja.is.com.ua>2002-12-31 18:39:16 +0200
commitcd248a8d636395a467f26550b55e0a184e86f0db (patch)
tree686761238f1e54eb1f7c25c8869e028f9c356ffd /sql/item_row.cc
parent53894481bfd2e7e1cf2a30706fd99ec67656dd5e (diff)
downloadmariadb-git-cd248a8d636395a467f26550b55e0a184e86f0db.tar.gz
postreviews fix (SCRUM related)
reordered Item_row class variables to be sorted by memory size mysql-test/r/subselect.result: fix result of subselect test sql/item.cc: postreviews fix sql/item.h: postreviews fix sql/item_cmpfunc.h: postreviews fix sql/item_row.cc: postreviews fix sql/item_row.h: reordered class variables to be sorted by memory size postreviews fix sql/item_strfunc.cc: postreviews fix sql/item_subselect.cc: postreviews fix
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc28
1 files changed, 8 insertions, 20 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index b54653f4183..ba4ac19b880 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -54,7 +54,14 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref)
if (items[i]->fix_fields(thd, tabl, items+i))
return 1;
used_tables_cache |= items[i]->used_tables();
- const_item_cache&= items[i]->const_item();
+ if (const_item_cache&= items[i]->const_item() && !with_null)
+ if (items[i]->cols() > 1)
+ with_null|= items[i]->null_inside();
+ else
+ {
+ items[i]->val_int();
+ with_null|= items[i]->null_value;
+ }
maybe_null|= items[i]->maybe_null;
}
return 0;
@@ -82,25 +89,6 @@ bool Item_row::check_cols(uint c)
return 0;
}
-bool Item_row::null_inside()
-{
- for (uint i= 0; i < arg_count; i++)
- {
- if (items[i]->cols() > 1)
- {
- if (items[i]->null_inside())
- return 1;
- }
- else
- {
- items[i]->val_int();
- if (items[i]->null_value)
- return 1;
- }
- }
- return 0;
-}
-
void Item_row::bring_value()
{
for (uint i= 0; i < arg_count; i++)