summaryrefslogtreecommitdiff
path: root/sql/share
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-07-21 23:37:40 +0300
committerunknown <sanja@askmonty.org>2011-07-21 23:37:40 +0300
commit813aaac51d2aaf0c582cbcd869fd48b948b90d66 (patch)
treedd0723f7e841410ec714d4e52510f807ceddf754 /sql/share
parentc86ffc23ee737b258dc006669ccfb3600e6f4c2e (diff)
downloadmariadb-git-813aaac51d2aaf0c582cbcd869fd48b948b90d66.tar.gz
Fix for LP BUG#806071
In case of two views with subqueries it is dificult to decide about order of injected ORDER BY clauses. A simple solution is just prohibit ORDER BY injection if there is other order by. mysql-test/r/view.result: New test added, old test changed. mysql-test/t/view.test: New test aded. sql/share/errmsg.txt: new warning added. sql/sql_view.cc: Inject ORDER BY only if there is no other one. Warning about ignoring ORDER BY in this case for EXPLAIN EXTENDED.
Diffstat (limited to 'sql/share')
-rw-r--r--sql/share/errmsg.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index b0989388028..928a28aba24 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -6288,3 +6288,5 @@ ER_QUERY_CACHE_IS_DISABLED
eng "Query cache is disabled (resize or similar command in progress); repeat this command later"
ER_QUERY_CACHE_IS_GLOBALY_DISABLED
eng "Query cache is globally disabled and you can't enable it only for this session"
+ER_VIEW_ORDERBY_IGNORED
+ eng "View '%-.192s'.'%-.192s' ORDER BY clause ignored because there is other ORDER BY clause already."