diff options
author | igor@olga.mysql.com <> | 2007-01-30 13:14:52 -0800 |
---|---|---|
committer | igor@olga.mysql.com <> | 2007-01-30 13:14:52 -0800 |
commit | 3eff8907e200c886b6ae30189f2b7bdd41d09025 (patch) | |
tree | db588e6b6deebacd8515f72e9897a1546a2c7eca /sql/opt_sum.cc | |
parent | e897780919fff10981f123b3f4e1f754aa431518 (diff) | |
parent | 60ac1f1b785ced5c8e09d738da294a614e680188 (diff) | |
download | mariadb-git-3eff8907e200c886b6ae30189f2b7bdd41d09025.tar.gz |
Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug24987
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24987
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index e8bc15a93f1..9222e15ff91 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -67,9 +67,9 @@ static int maxmin_in_range(bool max_fl, Field* field, COND *cond); GROUP BY part. RETURN VALUES - 0 No errors - 1 if all items were resolved - -1 on impossible conditions + 0 no errors + 1 if all items were resolved + HA_ERR_KEY_NOT_FOUND on impossible conditions OR an error number from my_base.h HA_ERR_... if a deadlock or a lock wait timeout happens, for example */ @@ -224,7 +224,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) if (error) { if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE) - return -1; // No rows matching WHERE + return HA_ERR_KEY_NOT_FOUND; // No rows matching WHERE /* HA_ERR_LOCK_DEADLOCK or some other error */ table->file->print_error(error, MYF(0)); return(error); @@ -311,7 +311,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) if (error) { if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE) - return -1; // No rows matching WHERE + return HA_ERR_KEY_NOT_FOUND; // No rows matching WHERE /* HA_ERR_LOCK_DEADLOCK or some other error */ table->file->print_error(error, MYF(0)); return(error); |