diff options
author | Sinisa@sinisa.nasamreza.org <> | 2002-12-02 20:18:51 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2002-12-02 20:18:51 +0200 |
commit | 5483796c50a6c74b9d7f6363aba5d39c2739df1b (patch) | |
tree | 374595893cfcdc147203da32bfac612391bffa8d /sql/sql_base.cc | |
parent | a655fdb10d74ca5c91c9bb3616d493588d0cb512 (diff) | |
download | mariadb-git-5483796c50a6c74b9d7f6363aba5d39c2739df1b.tar.gz |
Proper handling of ORDER BY table.column in UNION's
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index fc7629caae3..63affe5fde6 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1957,8 +1957,14 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, table_name=buff; } if (report_error) - my_printf_error(ER_UNKNOWN_TABLE, ER(ER_UNKNOWN_TABLE), MYF(0), - table_name, thd->where); + { + if (thd->lex.current_select->get_master()->order_list.elements) + my_printf_error(ER_TABLENAME_NOT_ALLOWED_HERE, ER(ER_TABLENAME_NOT_ALLOWED_HERE), + MYF(0), table_name, thd->where); + else + my_printf_error(ER_UNKNOWN_TABLE, ER(ER_UNKNOWN_TABLE), MYF(0), + table_name, thd->where); + } else return (Field*) not_found_field; } |