67
67
count int DEFAULT '0' NOT NULL,
69
69
phone char(1) DEFAULT '' NOT NULL,
70
timestamp_arg datetime,
72
72
KEY token (token(15)),
73
KEY timestamp (timestamp),
73
KEY timestamp_arg (timestamp_arg),
74
74
UNIQUE token_2 (token(75),count,phone)
489
489
# Negative tests (tests for errors)
490
490
#--------------------------------------------------------------------
491
491
# works in Oracle - bug
492
--error ER_NON_UNIQ_ERROR
492
493
select * from t1 natural join (t3 cross join t4);
493
494
# works in Oracle - bug
495
--error ER_NON_UNIQ_ERROR
494
496
select * from (t3 cross join t4) natural join t1;
497
--error ER_NON_UNIQ_ERROR
495
498
select * from t1 join (t2, t3) using (b);
496
select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6;
497
select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6;
499
--error ER_NON_UNIQ_ERROR
500
select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6;
501
--error ER_NON_UNIQ_ERROR
502
select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6;
503
--error ER_NON_UNIQ_ERROR
498
504
select * from t6 natural join ((t1 natural join t2), (t3 natural join t4));
505
--error ER_NON_UNIQ_ERROR
499
506
select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4);
507
--error ER_NON_UNIQ_ERROR
500
508
select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b);
501
509
# this one is OK, the next equivalent one is incorrect (bug in Oracle)
510
--error ER_NON_UNIQ_ERROR
502
511
select * from (t3 join (t4 natural join t5) on (b < z))
504
513
(t1 natural join t2);
514
--error ER_NON_UNIQ_ERROR
505
515
select * from (t1 natural join t2) natural join (t3 join (t4 natural join t5) on (b < z));