summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <mhansson/martin@linux-st28.site>2007-06-18 16:35:01 +0300
committerunknown <mhansson/martin@linux-st28.site>2007-06-18 16:35:01 +0300
commit3d31e3d641ed8a4420546449e5e25dcafe51f22f (patch)
tree4d65c5f245153c9a76e6e4e0a6fd69b70a0d05c8 /sql/sql_select.cc
parent14cb59d8bb0531cec3955fb3718455e7742d5db8 (diff)
downloadmariadb-git-3d31e3d641ed8a4420546449e5e25dcafe51f22f.tar.gz
Bug#28677: SELECT on missing column gives extra error
The method select_insert::send_error does two things, it rolls back a statement being executed and outputs an error message. But when a nonexistent column is referenced, an error message has been published already and there is no need to publish another. Fixed by moving all functionality beyond publishing an error message into select_insert::abort() and calling only that function. mysql-test/r/errors.result: Bug#28677: test result mysql-test/t/errors.test: Bug#28677: test case sql/sql_class.h: Bug#28677: overriding abort() sql/sql_insert.cc: Bug#28677: - moved everything beyond producing an error message out of select_insert::send_error and into new override select_insert::abort() - made corresponding move of code from select_create::send_error to select_create::abort sql/sql_select.cc: Bug#28677: No need to pusblish an error here
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index ea59cbbe9f2..d284ebbfb0f 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -258,11 +258,8 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
thd->net.report_error));
res|= thd->net.report_error;
if (unlikely(res))
- {
- /* If we had a another error reported earlier then this will be ignored */
- result->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR));
result->abort();
- }
+
DBUG_RETURN(res);
}