mirror of
https://github.com/MariaDB/server.git
synced 2025-10-31 15:50:51 +03:00
"Process NATURAL and USING joins according to SQL:2003".
* Some of the main problems fixed by the patch:
- in "select *" queries the * expanded correctly according to
ANSI for arbitrary natural/using joins
- natural/using joins are correctly transformed into JOIN ... ON
for any number/nesting of the joins.
- column references are correctly resolved against natural joins
of any nesting and combined with arbitrary other joins.
* This patch also contains a fix for name resolution of items
inside the ON condition of JOIN ... ON - in this case items must
be resolved only against the JOIN operands. To support such
'local' name resolution, the patch introduces a stack of
name resolution contexts used at parse time.
NOTICE:
- This patch is not complete in the sense that
- there are 2 test cases that still do not pass -
one in join.test, one in select.test. Both are marked
with a comment "TODO: WL#2486".
- it does not include a new test specific for the task
34 lines
685 B
Plaintext
34 lines
685 B
Plaintext
#
|
|
# Test some error conditions
|
|
#
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
--error 1146
|
|
insert into t1 values(1);
|
|
--error 1146
|
|
delete from t1;
|
|
--error 1146
|
|
update t1 set a=1;
|
|
create table t1 (a int);
|
|
--error 1054
|
|
select count(test.t1.b) from t1;
|
|
--error 1054
|
|
select count(not_existing_database.t1) from t1;
|
|
--error 1054
|
|
select count(not_existing_database.t1.a) from t1;
|
|
--error 1044,1146
|
|
select count(not_existing_database.t1.a) from not_existing_database.t1;
|
|
--error 1054
|
|
select 1 from t1 order by 2;
|
|
--error 1054
|
|
select 1 from t1 group by 2;
|
|
--error 1054
|
|
select 1 from t1 order by t1.b;
|
|
--error 1054
|
|
select count(*),b from t1;
|
|
drop table t1;
|
|
|
|
# End of 4.1 tests
|