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
299d243f
Commit
299d243f
authored
Sep 29, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/20503-bug-5.0-mysql
parents
dead2e0f
e0461067
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
mysql-test/r/select.result
mysql-test/r/select.result
+6
-0
mysql-test/t/select.test
mysql-test/t/select.test
+10
-1
sql/sql_select.cc
sql/sql_select.cc
+12
-0
No files found.
mysql-test/r/select.result
View file @
299d243f
...
...
@@ -3517,3 +3517,9 @@ id a b c d e
2 NULL NULL NULL 2 40
2 NULL NULL NULL 2 50
DROP TABLE t1,t2,t3;
create table t1 (c1 varchar(1), c2 int, c3 int, c4 int, c5 int, c6 int,
c7 int, c8 int, c9 int, fulltext key (`c1`));
select distinct match (`c1`) against ('z') , c2, c3, c4,c5, c6,c7, c8
from t1 where c9=1 order by c2, c2;
match (`c1`) against ('z') c2 c3 c4 c5 c6 c7 c8
drop table t1;
mysql-test/t/select.test
View file @
299d243f
...
...
@@ -2996,5 +2996,14 @@ SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
t2
.
b
=
t1
.
a
INNER
JOIN
t3
ON
t3
.
d
=
t1
.
id
WHERE
t1
.
id
=
2
;
DROP
TABLE
t1
,
t2
,
t3
;
#
# Bug#20503: Server crash due to the ORDER clause isn't taken into account
# while space allocation
#
create
table
t1
(
c1
varchar
(
1
),
c2
int
,
c3
int
,
c4
int
,
c5
int
,
c6
int
,
c7
int
,
c8
int
,
c9
int
,
fulltext
key
(
`c1`
));
select
distinct
match
(
`c1`
)
against
(
'z'
)
,
c2
,
c3
,
c4
,
c5
,
c6
,
c7
,
c8
from
t1
where
c9
=
1
order
by
c2
,
c2
;
drop
table
t1
;
sql/sql_select.cc
View file @
299d243f
...
...
@@ -13513,7 +13513,19 @@ bool JOIN::alloc_func_list()
disctinct->group_by optimization
*/
if
(
select_distinct
)
{
group_parts
+=
fields_list
.
elements
;
/*
If the ORDER clause is specified then it's possible that
it also will be optimized, so reserve space for it too
*/
if
(
order
)
{
ORDER
*
ord
;
for
(
ord
=
order
;
ord
;
ord
=
ord
->
next
)
group_parts
++
;
}
}
/* This must use calloc() as rollup_make_fields depends on this */
sum_funcs
=
(
Item_sum
**
)
thd
->
calloc
(
sizeof
(
Item_sum
**
)
*
(
func_count
+
1
)
+
...
...
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