~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect.result

  • Committer: David Shrewsbury
  • Date: 2010-11-15 15:29:16 UTC
  • mto: (1932.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1933.
  • Revision ID: shrewsbury.dave@gmail.com-20101115152916-cowsgsfm3sibys30
Move transaction_reader from drizzled/message to transaction_log plugin; also pulled transaction_reader file operations out into separate class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
899
899
drop table t1,t2,t3;
900
900
#LIMIT is not supported now
901
901
#create table t1 (a float) ENGINE=MyISAM;
902
 
#--error ER_NOT_SUPPORTED_YET
 
902
#-- error 1235
903
903
#select 10.5 IN (SELECT * from t1 LIMIT 1);
904
 
#--error ER_NOT_SUPPORTED_YET
 
904
#-- error 1235
905
905
#select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
906
906
#drop table t1;
907
907
#
925
925
#select ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a');
926
926
#select ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a');
927
927
#select ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a');
928
 
#--error ER_NOT_SUPPORTED_YET
 
928
#-- error 1235
929
929
#select ROW(1, 1, 'a') IN (select b,a,c from t1 limit 2);
930
930
#drop table t1;
931
931
#test of uncacheable subqueries
1036
1036
# error in IN
1037
1037
#
1038
1038
select t1.Continent, t2.Name, t2.Population from t1 LEFT JOIN t2 ON t1.Code = t2.Country  where t2.Population IN (select max(t2.Population) AS Population from t2, t1 where t2.Country = t1.Code group by Continent);
1039
 
ERROR 42S02: Unknown table 'test.t1'
 
1039
ERROR 42S02: Table 'test.t1' doesn't exist
1040
1040
#
1041
1041
# complex subquery
1042
1042
#
1330
1330
#CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
1331
1331
#                 s2 CHAR(5) COLLATE latin1_swedish_ci) ENGINE=MyISAM;
1332
1332
#INSERT INTO t1 VALUES ('z','?');
1333
 
#--error ER_CANT_AGGREGATE_2COLLATIONS
 
1333
#-- error 1267
1334
1334
#select * from t1 where s1 > (select max(s2) from t1);
1335
 
#--error ER_CANT_AGGREGATE_2COLLATIONS
 
1335
#-- error 1267
1336
1336
#select * from t1 where s1 > any (select max(s2) from t1);
1337
1337
#drop table t1;
1338
1338
#
2889
2889
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2890
2890
1       PRIMARY t1      const   PRIMARY PRIMARY 4       const   1       Using index
2891
2891
1       PRIMARY r       const   PRIMARY PRIMARY 4       const   1       
2892
 
2       DEPENDENT SUBQUERY      t2      ref     b       b       5               3       Using where; Using index
 
2892
2       DEPENDENT SUBQUERY      t2      ref     b       b       5               1       Using where; Using index
2893
2893
SELECT t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r 
2894
2894
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' 
2895
2895
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
4524
4524
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
4525
4525
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 't1a ON 1' at line 1
4526
4526
SELECT * FROM t1 JOIN  (t1 t1a)  ON 1;
4527
 
ERROR HY000: Implicit cartesian join attempted.
 
4527
a       a
 
4528
1       1
 
4529
1       2
 
4530
2       1
 
4531
2       2
4528
4532
SELECT * FROM t1 JOIN ((t1 t1a)) ON 1;
4529
 
ERROR HY000: Implicit cartesian join attempted.
 
4533
a       a
 
4534
1       1
 
4535
2       1
 
4536
1       2
 
4537
2       2
4530
4538
SELECT * FROM (t1 t1a);
4531
4539
a
4532
4540
1