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
cea01c73
Commit
cea01c73
authored
Jan 13, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
02570c20
3e23d458
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/r/select.result
mysql-test/r/select.result
+11
-0
mysql-test/t/select.test
mysql-test/t/select.test
+13
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/r/select.result
View file @
cea01c73
...
...
@@ -3337,6 +3337,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t3 const PRIMARY PRIMARY 8 const,const 1
DROP TABLE t1,t2,t3;
create table t1 (f1 int);
insert into t1 values(1),(2);
create table t2 (f2 int, f3 int, key(f2));
insert into t2 values(1,1),(2,2);
create table t3 (f4 int not null);
insert into t3 values (2),(2),(2);
select f1,(select count(*) from t2,t3 where f2=f1 and f3=f4) as count from t1;
f1 count
1 0
2 3
drop table t1,t2,t3;
create table t1 (f1 int unique);
create table t2 (f2 int unique);
create table t3 (f3 int unique);
...
...
mysql-test/t/select.test
View file @
cea01c73
...
...
@@ -2806,6 +2806,19 @@ EXPLAIN SELECT t2.key_a,foo
DROP
TABLE
t1
,
t2
,
t3
;
#
# Bug#15347 Wrong result of subselect when records cache and set functions
# are involved
#
create
table
t1
(
f1
int
);
insert
into
t1
values
(
1
),(
2
);
create
table
t2
(
f2
int
,
f3
int
,
key
(
f2
));
insert
into
t2
values
(
1
,
1
),(
2
,
2
);
create
table
t3
(
f4
int
not
null
);
insert
into
t3
values
(
2
),(
2
),(
2
);
select
f1
,(
select
count
(
*
)
from
t2
,
t3
where
f2
=
f1
and
f3
=
f4
)
as
count
from
t1
;
drop
table
t1
,
t2
,
t3
;
#
# Bug #15633 Evaluation of Item_equal for non-const table caused wrong
# select result
...
...
sql/sql_select.cc
View file @
cea01c73
...
...
@@ -9896,6 +9896,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skip_last)
int
error
;
READ_RECORD
*
info
;
join_tab
->
table
->
null_row
=
0
;
if
(
!
join_tab
->
cache
.
records
)
return
NESTED_LOOP_OK
;
/* Nothing to do */
if
(
skip_last
)
...
...
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