mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
1e55b8dd46
mysql-test/r/ndb_basic.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/r/ndb_blob.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/r/ndb_charset.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/r/ndb_condition_pushdown.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/r/ndb_dd_sql_features.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/r/ndb_subquery.result: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_basic.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_blob.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_charset.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_condition_pushdown.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_dd_sql_features.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count mysql-test/t/ndb_subquery.test: replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
69 lines
1.6 KiB
Text
69 lines
1.6 KiB
Text
-- source include/have_ndb.inc
|
|
-- source include/not_embedded.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
drop table if exists t2;
|
|
--enable_warnings
|
|
|
|
##########
|
|
# bug#5367
|
|
create table t1 (p int not null primary key, u int not null, o int not null,
|
|
unique (u), key(o)) engine=ndb;
|
|
|
|
create table t2 (p int not null primary key, u int not null, o int not null,
|
|
unique (u), key(o)) engine=ndb;
|
|
|
|
insert into t1 values (1,1,1),(2,2,2),(3,3,3);
|
|
insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5);
|
|
|
|
# Use pk
|
|
--replace_column 9 #
|
|
explain select * from t2 where p NOT IN (select p from t1);
|
|
select * from t2 where p NOT IN (select p from t1) order by p;
|
|
|
|
# Use unique index
|
|
--replace_column 9 #
|
|
explain select * from t2 where p NOT IN (select u from t1);
|
|
select * from t2 where p NOT IN (select u from t1) order by p;
|
|
|
|
# Use ordered index
|
|
--replace_column 9 #
|
|
explain select * from t2 where p NOT IN (select o from t1);
|
|
select * from t2 where p NOT IN (select o from t1) order by p;
|
|
|
|
# Use scan
|
|
--replace_column 9 #
|
|
explain select * from t2 where p NOT IN (select p+0 from t1);
|
|
select * from t2 where p NOT IN (select p+0 from t1) order by p;
|
|
|
|
drop table t1;
|
|
drop table t2;
|
|
# bug#5367
|
|
##########
|
|
|
|
# End of 4.1 tests
|
|
|
|
#
|
|
# bug#11205
|
|
#
|
|
create table t1 (p int not null primary key, u int not null) engine=ndb;
|
|
insert into t1 values (1,1),(2,2),(3,3);
|
|
|
|
create table t2 as
|
|
select t1.*
|
|
from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8
|
|
where t1.u = t2.u
|
|
and t2.u = t3.u
|
|
and t3.u = t4.u
|
|
and t4.u = t5.u
|
|
and t5.u = t6.u
|
|
and t6.u = t7.u
|
|
and t7.u = t8.u;
|
|
|
|
select * from t2 order by 1;
|
|
|
|
drop table t1;
|
|
drop table t2;
|
|
|
|
|