summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-02-02 10:25:45 +0400
committerunknown <gluh@eagle.(none)>2007-02-02 10:25:45 +0400
commited0e4a968a4dfba3788bc270c73620f3e498dca5 (patch)
treea499a38ce070d521a711fde73af6cb95e3713dc3 /sql/opt_sum.cc
parent4ebef0520629873253ed5007aba1a01c91d7f8fd (diff)
parenta30830460794651c0e9fc5ec4779cf77680514ee (diff)
downloadmariadb-git-ed0e4a968a4dfba3788bc270c73620f3e498dca5.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt mysql-test/r/distinct.result: Auto merged mysql-test/r/join_nested.result: Auto merged mysql-test/r/null_key.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/subselect3.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/t/select.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/filesort.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_sum.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged mysql-test/r/func_time.result: manual merge mysql-test/r/information_schema.result: manual merge mysql-test/t/func_time.test: manual merge mysql-test/t/information_schema.test: manual merge sql/opt_range.cc: manual merge sql/sql_delete.cc: manual merge sql/sql_lex.h: manual merge
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 90a3ff66a22..5bd5ec4b42d 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -97,9 +97,9 @@ static ulonglong get_exact_record_count(TABLE_LIST *tables)
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
*/
@@ -267,7 +267,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);
@@ -354,7 +354,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);