diff options
author | unknown <evgen@moonbone.local> | 2005-08-10 17:45:00 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-08-10 17:45:00 +0400 |
commit | 3fba3d9894bfbf10bc6716e55c5215f38b2fb0fe (patch) | |
tree | 9daa110455c864e4bfbf2f5a8c350de43a71686e /mysql-test/r/select_safe.result | |
parent | 9c0abd826f667f5db08afbcea4f537d249a10e58 (diff) | |
download | mariadb-git-3fba3d9894bfbf10bc6716e55c5215f38b2fb0fe.tar.gz |
Fix bug #11864 non unique names are allowed in subquery
Column names weren't checked for uniqueness for subqueries.
Code for names uniqueness checking used for view creation moved into
separate function named check_duplicate_names(). It's called on
preparation of subqueries to check uniqueness of names. If duplicate names
are found then error is raised.
sql/sql_derived.cc:
Fix bug #11864 non unique names are allowed in subquery
Added check for names uniqueness in select list.
sql/sql_view.cc:
Fix bug #11864 non unique names are allowed in subquery
Code for checking uniqueness of names in item list moved into separate function to make in available for use from other places.
sql/sql_view.h:
Fix bug #11864 non unique names are allowed in subquery
Added check_duplicate_names() function prototype.
mysql-test/t/derived.test:
Fixed test case results after bug fix #11864
Added test case for bug#11864 non unique names are allowed in subquery.
mysql-test/t/select_safe.test:
Fixed test case results after bug fix #11864
mysql-test/r/derived.result:
Added test case for bug #11864 non unique names are allowed in subquery.
Fixed test case results after bug fix #11864
mysql-test/r/select_safe.result:
Fixed test case results after bug fix #11864
Diffstat (limited to 'mysql-test/r/select_safe.result')
-rw-r--r-- | mysql-test/r/select_safe.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result index 5d458c40f34..feac9efcb13 100644 --- a/mysql-test/r/select_safe.result +++ b/mysql-test/r/select_safe.result @@ -84,7 +84,7 @@ set local max_join_size=8; select * from (select * from t1) x; ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay set local max_join_size=1; -select * from (select * from t1 a, t1 b) x; +select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x; ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay set local max_join_size=1; select * from (select 1 union select 2 union select 3) x; |