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
ca541b9c
Commit
ca541b9c
authored
Oct 14, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.0
into moonbone.local:/work/13855-bug-4.0-mysql
parents
74121f46
0390de86
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
mysql-test/r/select.result
mysql-test/r/select.result
+8
-0
mysql-test/t/select.test
mysql-test/t/select.test
+9
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/r/select.result
View file @
ca541b9c
...
...
@@ -2477,3 +2477,11 @@ a b c d
1 2 2 1
1 2 3 1
DROP TABLE IF EXISTS t1, t2;
create table t1 (f1 int primary key, f2 int);
create table t2 (f3 int, f4 int, primary key(f3,f4));
insert into t1 values (1,1);
insert into t2 values (1,1),(1,2);
select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1;
count(f2) >0
1
drop table t1,t2;
mysql-test/t/select.test
View file @
ca541b9c
...
...
@@ -2013,3 +2013,12 @@ SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2,t1
WHERE
t2
.
a
=
t1
.
a
AND
t2
.
b
=
t1
.
b
GROUP
BY
a
,
b
,
c
;
DROP
TABLE
IF
EXISTS
t1
,
t2
;
#
# Bug #13855 select distinct with group by caused server crash
#
create
table
t1
(
f1
int
primary
key
,
f2
int
);
create
table
t2
(
f3
int
,
f4
int
,
primary
key
(
f3
,
f4
));
insert
into
t1
values
(
1
,
1
);
insert
into
t2
values
(
1
,
1
),(
1
,
2
);
select
distinct
count
(
f2
)
>
0
from
t1
left
join
t2
on
f1
=
f3
group
by
f1
;
drop
table
t1
,
t2
;
sql/sql_select.cc
View file @
ca541b9c
...
...
@@ -626,6 +626,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
{
order
=
0
;
// The output has only one row
simple_order
=
1
;
select_distinct
=
0
;
// No need in distinct for 1 row
}
calc_group_buffer
(
&
join
,
group
);
...
...
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