diff options
author | unknown <ramil@mysql.com> | 2005-09-29 19:34:21 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-09-29 19:34:21 +0500 |
commit | 7acbea3f3ff5c9f8db8ea8bb7c805b83ca1e7ada (patch) | |
tree | b92888cf8a6e56a3a35f5b0f954106c5152500a8 /mysql-test/r/join_nested.result | |
parent | 35598ff536006eeedcc2263926d0ccee328d4b21 (diff) | |
download | mariadb-git-7acbea3f3ff5c9f8db8ea8bb7c805b83ca1e7ada.tar.gz |
fix for bug #13545: Server crash caused by select query.
sql/sql_base.cc:
fix for bug #13545: Server crash caused by select query.
- compare table qualifier only with tables which are not nested joins.
- perform recursion accordingly.
- DBUG_ASSERT(table_list->table); added before the find_field_in_table() call.
Diffstat (limited to 'mysql-test/r/join_nested.result')
-rw-r--r-- | mysql-test/r/join_nested.result | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index f9a25898a6f..9d514be76e8 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -1375,3 +1375,31 @@ groupid price 6 9900 DROP VIEW v1,v2; DROP TABLE t1,t2,t3,t4; +CREATE TABLE t1(a int); +CREATE TABLE t2(b int); +CREATE TABLE t3(c int, d int); +CREATE TABLE t4(d int); +CREATE TABLE t5(e int, f int); +CREATE TABLE t6(f int); +CREATE VIEW v1 AS +SELECT e FROM t5 JOIN t6 ON t5.e=t6.f; +CREATE VIEW v2 AS +SELECT e FROM t5 NATURAL JOIN t6; +SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); +a +SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c JOIN t4 USING(d); +ERROR 42S22: Unknown column 't1.x' in 'field list' +SELECT t1.a FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; +a +SELECT t1.x FROM t1 JOIN t2 ON a=b JOIN t3 ON a=c NATURAL JOIN t4; +ERROR 42S22: Unknown column 't1.x' in 'field list' +SELECT v1.e FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); +e +SELECT v1.x FROM v1 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); +ERROR 42S22: Unknown column 'v1.x' in 'field list' +SELECT v2.e FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); +e +SELECT v2.x FROM v2 JOIN t2 ON e=b JOIN t3 ON e=c JOIN t4 USING(d); +ERROR 42S22: Unknown column 'v2.x' in 'field list' +DROP VIEW v1, v2; +DROP TABLE t1, t2, t3, t4, t5, t6; |