607
606
insert into t2 select @v:=A.a+10*B.a, @v from t1 A, t1 B;
609
608
explain select * from t1;
611
609
show status like '%cost%';
612
610
select 'The cost of accessing t1 (dont care if it changes' '^';
614
612
select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z;
616
614
explain select * from t1, t2 A, t2 B where A.a = t1.a and B.a=A.b;
618
615
show status like '%cost%';
619
616
select '^^: The above should be ~= 20 + cost(select * from t1). Value less than 20 is an error' Z;