diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2008-12-09 20:35:02 +0200 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2008-12-09 20:35:02 +0200 |
commit | 979974c53ba88f66c2c00b803159599b6856ab21 (patch) | |
tree | 0db843e1daa7ae2e3211dd641d435f7584a1a8c6 /sql/opt_sum.cc | |
parent | cbe1a8a0f937dd37901f13963573a16bdf3e5c26 (diff) | |
download | mariadb-git-979974c53ba88f66c2c00b803159599b6856ab21.tar.gz |
backported the fix for bug #34773 to 5.0
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 3fc62d05ae5..39db1344588 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -160,7 +160,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) to the number of rows in the tables if this number is exact and there are no outer joins. */ - if (!conds && !((Item_sum_count*) item)->args[0]->maybe_null && + if (!conds && !((Item_sum_count*) item)->get_arg(0)->maybe_null && !outer_tables && is_exact_count) { ((Item_sum_count*) item)->make_const(count); @@ -176,7 +176,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) parts of the key is found in the COND, then we can use indexes to find the key. */ - Item *expr=item_sum->args[0]; + Item *expr=item_sum->get_arg(0); if (expr->real_item()->type() == Item::FIELD_ITEM) { byte key_buff[MAX_KEY_LENGTH]; @@ -319,7 +319,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) parts of the key is found in the COND, then we can use indexes to find the key. */ - Item *expr=item_sum->args[0]; + Item *expr=item_sum->get_arg(0); if (expr->real_item()->type() == Item::FIELD_ITEM) { byte key_buff[MAX_KEY_LENGTH]; |