diff options
author | unknown <timour@mysql.com> | 2005-08-23 18:08:04 +0300 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-08-23 18:08:04 +0300 |
commit | fe24add743df9dc2f8d72352e777c0f6f495d5fb (patch) | |
tree | 4cde988a40d008a8de1756cb6ac8fa97ea3fe6e3 /mysql-test/r/null_key.result | |
parent | e39656fb3b526faf10940339f0cc17452724f524 (diff) | |
download | mariadb-git-fe24add743df9dc2f8d72352e777c0f6f495d5fb.tar.gz |
WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
coalesced columns. The patch allows such columns to be qualified
with a table (and db) name, as it is in 4.1.
Based on a patch from Monty.
* Adjusted tests accordingly to test both backwards compatible name
resolution of qualified columns, and ANSI-style resolution of
non-qualified columns.
For this, each affected test has two versions - one with qualified
columns, and one without.
mysql-test/include/ps_query.inc:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/bdb.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/innodb.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_nested.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_outer.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/null_key.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/order_by.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_2myisam.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_3innodb.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_4heap.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_5merge.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_6bdb.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_7ndb.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/select.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/subselect.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/type_ranges.result:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/bdb.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/innodb.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_nested.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_outer.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/null_key.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/order_by.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/select.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/subselect.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/type_ranges.test:
Put back old tests to test that coalesced columns of natural joins can be qualified.
sql/sql_base.cc:
* Applied Monty's patch for backwards compatible name resolution
of qualified columns. The idea is:
- When a column is qualified, search for the column in all
tables/views underlying each natural join. In this case
natural joins are *not* considered leaves.
- If a column is not qualified, then consider natural joins
as leaves, thus directly search the result columns of
natural joins.
* Simplified 'find_field_in_tables()' - unified two similar
loops into one.
sql/table.cc:
- Removed method & members not needed after Monty's patch.
sql/table.h:
- Removed method & members not needed after Monty's patch.
tests/mysql_client_test.c:
Put back old tests to test that coalesced columns of natural joins can be qualified.
Diffstat (limited to 'mysql-test/r/null_key.result')
-rw-r--r-- | mysql-test/r/null_key.result | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 5c2141befa6..7f746a3dbd8 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -313,16 +313,12 @@ INSERT INTO t1 (order_id, product_id, product_type) VALUES ('9d9aad7764b5b2c53004348ef8d34500',2315652, 3); INSERT INTO t2 (order_id, product_id, product_type) VALUES ('9d9aad7764b5b2c53004348ef8d34500',2315652, 3); -select t1.* from t1 left join t2 -on (t1.order_id = t2.order_id and -t1.product_id = t2.product_id and -t1.product_type = t2.product_type) -where t2.order_id = NULL; +select t1.* from t1 +left join t2 using(order_id, product_id, product_type) +where t2.order_id=NULL; order_id product_id product_type -select t1.* from t1 left join t2 -on (t1.order_id = t2.order_id and -t1.product_id = t2.product_id and -t1.product_type = t2.product_type) +select t1.* from t1 +left join t2 using(order_id, product_id, product_type) where t2.order_id is NULL; order_id product_id product_type 3d7ce39b5d4b3e3d22aaafe9b633de51 1206029 3 |