Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f715d82a
Commit
f715d82a
authored
Oct 06, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testcase for bug#5736
fix of changed clo to mysql-test-run
parent
b9b86607
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
1 deletion
+81
-1
mysql-test/r/ndb_subquery.result
mysql-test/r/ndb_subquery.result
+42
-0
mysql-test/t/ndb_subquery.test
mysql-test/t/ndb_subquery.test
+38
-0
ndb/test/run-test/atrt-mysql-test-run
ndb/test/run-test/atrt-mysql-test-run
+1
-1
No files found.
mysql-test/r/ndb_subquery.result
0 → 100644
View file @
f715d82a
drop table if exists t1;
drop table if exists t2;
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);
explain select * from t2 where p NOT IN (select p from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index
select * from t2 where p NOT IN (select p from t1);
p u o
4 4 4
5 5 5
explain select * from t2 where p NOT IN (select u from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func 1 Using index
select * from t2 where p NOT IN (select u from t1);
p u o
4 4 4
5 5 5
explain select * from t2 where p NOT IN (select o from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func 1 Using index
select * from t2 where p NOT IN (select o from t1);
p u o
4 4 4
5 5 5
explain select * from t2 where p NOT IN (select p+0 from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where
select * from t2 where p NOT IN (select p+0 from t1);
p u o
4 4 4
5 5 5
drop table t1;
drop table t2;
mysql-test/t/ndb_subquery.test
0 → 100644
View file @
f715d82a
#-- source include/have_ndb.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
explain
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
);
# Use unique index
explain
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
);
# Use ordered index
explain
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
);
# Use scan
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
);
drop
table
t1
;
drop
table
t2
;
# bug#5367
##########
ndb/test/run-test/atrt-mysql-test-run
View file @
f715d82a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
set
-x
set
-x
p
=
`
pwd
`
p
=
`
pwd
`
cd
$MYSQL_BASE_DIR
/mysql-test
cd
$MYSQL_BASE_DIR
/mysql-test
./mysql-test-run
--with-ndbcluster
--ndbconnectstring
=
$NDB_CONNECTSTRING
$*
|
tee
$p
/output.txt
./mysql-test-run
--with-ndbcluster
--ndb
-
connectstring
=
$NDB_CONNECTSTRING
$*
|
tee
$p
/output.txt
f
=
`
grep
-c
fail
$p
/output.txt
`
f
=
`
grep
-c
fail
$p
/output.txt
`
o
=
`
grep
-c
pass
$p
/output.txt
`
o
=
`
grep
-c
pass
$p
/output.txt
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment