diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-09-13 20:00:42 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-09-13 20:00:42 +0300 |
commit | df8b036d029a049ba40ba404142bbee3fd8cf13d (patch) | |
tree | 0d228856c0a962a6c50120db5e84e840252d88c2 /sql/sql_select.cc | |
parent | aedc0ab09836923bebb35146f640e90e72dec8b9 (diff) | |
parent | 7eb9d41c46ea9922389e919a37704a7b2bac3701 (diff) | |
download | mariadb-git-df8b036d029a049ba40ba404142bbee3fd8cf13d.tar.gz |
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index a3a8fe288fa..5319434a8f6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -478,8 +478,7 @@ bool JOIN::test_in_subselect(Item **where) /* global select optimisation. return 0 - success - 1 - go out - -1 - go out with cleaning + 1 - error error code saved in field 'error' */ int @@ -516,11 +515,9 @@ JOIN::optimize() conds= optimize_cond(conds,&cond_value); if (thd->net.report_error) { - // quick abort - delete procedure; - error= thd->is_fatal_error ? -1 : 1; + error= 1; DBUG_PRINT("error",("Error from optimize_cond")); - DBUG_RETURN(error); + DBUG_RETURN(1); } if (cond_value == Item::COND_FALSE || @@ -543,8 +540,7 @@ JOIN::optimize() { if (res > 1) { - delete procedure; - DBUG_RETURN(-1); + DBUG_RETURN(1); } if (res < 0) { @@ -1514,7 +1510,7 @@ mysql_select(THD *thd, Item ***rref_pointer_array, conds, og_num, order, group, having, proc_param, select_lex, unit, tables_and_fields_initied)) { - DBUG_RETURN(-1); + goto err; } } join->select_options= select_options; @@ -1529,15 +1525,12 @@ mysql_select(THD *thd, Item ***rref_pointer_array, conds, og_num, order, group, having, proc_param, select_lex, unit, tables_and_fields_initied)) { - DBUG_RETURN(-1); + goto err; } } if ((err= join->optimize())) { - if (err == -1) - DBUG_RETURN(join->error); - DBUG_ASSERT(err == 1); goto err; // 1 } |