diff options
author | bell@sanja.is.com.ua <> | 2002-12-31 18:39:16 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-12-31 18:39:16 +0200 |
commit | c7a02249f5eee028b4183b23eda05862a95eec61 (patch) | |
tree | 686761238f1e54eb1f7c25c8869e028f9c356ffd /sql/item_row.cc | |
parent | 7c0a07461407f62cceeebf5aa8ed2133361ec229 (diff) | |
download | mariadb-git-c7a02249f5eee028b4183b23eda05862a95eec61.tar.gz |
postreviews fix (SCRUM related)
reordered Item_row class variables to be sorted by memory size
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 28 |
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++) |