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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
cb538e45
Commit
cb538e45
authored
Nov 28, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-merge fix
parent
96729c62
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
31 deletions
+9
-31
mysql-test/r/select.result
mysql-test/r/select.result
+9
-29
mysql-test/t/select.test
mysql-test/t/select.test
+0
-2
No files found.
mysql-test/r/select.result
View file @
cb538e45
...
...
@@ -2353,38 +2353,22 @@ select * from t2,t3 where t2.s = t3.s;
s s
two two
drop table t1, t2, t3;
CREATE TABLE t1 (
i int(11) NOT NULL default '0',
c char(10) NOT NULL default '',
PRIMARY KEY (i),
UNIQUE KEY c (c)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'a');
INSERT INTO t1 VALUES (2,'b');
INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
EXPLAIN SELECT i FROM t1 WHERE i=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
create table t1 (a integer, b integer, index(a), index(b));
create table t2 (c integer, d integer, index(c), index(d));
insert into t1 values (1,2), (2,2), (3,2), (4,2);
insert into t2 values (1,3), (2,3), (3,4), (4,4);
explain select * from t1 left join t2 on a=c where d in (4);
table type possible_keys key key_len ref rows Extra
t2 ref c,d d 5 const 2 Using where
t1 ALL a NULL NULL NULL 3 Using where
id select_type
table type possible_keys key key_len ref rows Extra
1 SIMPLE
t2 ref c,d d 5 const 2 Using where
1 SIMPLE
t1 ALL a NULL NULL NULL 3 Using where
select * from t1 left join t2 on a=c where d in (4);
a b c d
3 2 3 4
4 2 4 4
explain select * from t1 left join t2 on a=c where d = 4;
table type possible_keys key key_len ref rows Extra
t2 ref c,d d 5 const 2 Using where
t1 ALL a NULL NULL NULL 3 Using where
id select_type
table type possible_keys key key_len ref rows Extra
1 SIMPLE
t2 ref c,d d 5 const 2 Using where
1 SIMPLE
t1 ALL a NULL NULL NULL 3 Using where
select * from t1 left join t2 on a=c where d = 4;
a b c d
3 2 3 4
...
...
@@ -2395,15 +2379,11 @@ i int(11) NOT NULL default '0',
c char(10) NOT NULL default '',
PRIMARY KEY (i),
UNIQUE KEY c (c)
)
TYP
E=MyISAM;
)
ENGIN
E=MyISAM;
INSERT INTO t1 VALUES (1,'a');
INSERT INTO t1 VALUES (2,'b');
INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
>>>>>>>
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
mysql-test/t/select.test
View file @
cb538e45
...
...
@@ -1929,6 +1929,4 @@ INSERT INTO t1 VALUES (3,'c');
EXPLAIN
SELECT
i
FROM
t1
WHERE
i
=
1
;
EXPLAIN
SELECT
i
FROM
t1
WHERE
i
=
1
;
DROP
TABLE
t1
;
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