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
b8af3bd4
Commit
b8af3bd4
authored
Sep 15, 2013
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.3->5.5
parents
a784d62d
996f6194
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+13
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+20
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-1
No files found.
mysql-test/r/func_group.result
View file @
b8af3bd4
...
...
@@ -2126,6 +2126,19 @@ select z from (select count(*) as z from t1) v group by 1;
z
4
drop table t1;
CREATE TABLE t1 (i1 int, INDEX(i1));
INSERT INTO t1 VALUES (9),(8);
CREATE TABLE t2 (i2 int);
INSERT INTO t2 VALUES (8),(4);
CREATE TABLE t3 (i3 int, INDEX(i3));
INSERT INTO t3 VALUES (9),(8);
SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND ( 0 OR t3.i3 = t2.i2 );
MAX(t3.i3)
8
SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND t3.i3 = t2.i2;
MAX(t3.i3)
8
DROP TABLE t1,t2,t3;
# end of 5.3 tests
#
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
...
...
mysql-test/t/func_group.test
View file @
b8af3bd4
...
...
@@ -1403,6 +1403,26 @@ select z from (select count(*) as z from t1) v;
select
z
from
(
select
count
(
*
)
as
z
from
t1
)
v
group
by
1
;
drop
table
t1
;
#
# Bug mdev-5015: Degenerate OR condition in an aggregated join
#
CREATE
TABLE
t1
(
i1
int
,
INDEX
(
i1
));
INSERT
INTO
t1
VALUES
(
9
),(
8
);
CREATE
TABLE
t2
(
i2
int
);
INSERT
INTO
t2
VALUES
(
8
),(
4
);
CREATE
TABLE
t3
(
i3
int
,
INDEX
(
i3
));
INSERT
INTO
t3
VALUES
(
9
),(
8
);
SELECT
MAX
(
t3
.
i3
)
FROM
t3
,
t2
,
t1
WHERE
t1
.
i1
=
t2
.
i2
AND
(
0
OR
t3
.
i3
=
t2
.
i2
);
SELECT
MAX
(
t3
.
i3
)
FROM
t3
,
t2
,
t1
WHERE
t1
.
i1
=
t2
.
i2
AND
t3
.
i3
=
t2
.
i2
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
# end of 5.3 tests
--
echo
#
...
...
sql/sql_select.cc
View file @
b8af3bd4
...
...
@@ -13875,6 +13875,7 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
if
(
!
(
cond
=
internal_remove_eq_conds
(
thd
,
cond
,
cond_value
)))
return
cond
;
}
should_fix_fields
=
1
;
}
if
(
should_fix_fields
)
cond
->
update_used_tables
();
...
...
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