summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2004-11-02 18:23:15 +0200
committerunknown <timour@mysql.com>2004-11-02 18:23:15 +0200
commit048d731a3112e5745038f422da3f1a5c1fadde81 (patch)
treef36fd67db9dbc59a015a4fa4d848db945a5c8bd9 /sql/sp.cc
parent637c08d7cc0d462e445c68307d0c206fbf4f743b (diff)
downloadmariadb-git-048d731a3112e5745038f422da3f1a5c1fadde81.tar.gz
WL#1972 "Evaluate HAVING before SELECT select-list"
- Changed name resolution for GROUP BY so that derived columns do not shadow table columns from the FROM clause. As a result GROUP BY now is handled as a true ANSI extentsion. - Issue a warning when HAVING is resolved into ambiguous columns, and prefer the columns from the GROUP BY clause over SELECT columns. mysql-test/r/having.result: Correct result for updated GROUP BY name resolution. sql/item.cc: - prefer GROUP columns, but if none is found use SELECT list - issue a waring when a field may be resolved ambiguously - more/fixed comments sql/mysql_priv.h: More flexible find_field_in_tables(). sql/sp.cc: More flexible find_field_in_tables(). sql/sql_base.cc: More flexible find_field_in_tables(). sql/sql_help.cc: More flexible find_field_in_tables(). sql/sql_select.cc: - name resolution of GROUP/ORDER BY column references is differentiated: - GROUP BY is resolved in SELECT and FROM clauses - ORDER BY is resolved only in SELECT (as before) - more informative variable names - more comments
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index e444a412760..323c1acd525 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -615,7 +615,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
Item_field *field= new Item_field("mysql", "proc",
used_field->field_name);
if (!(used_field->field= find_field_in_tables(thd, field, &tables,
- 0, TRUE, 1)))
+ 0, REPORT_ALL_ERRORS, 1)))
{
res= SP_INTERNAL_ERROR;
goto err_case1;