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
f39f36c6
Commit
f39f36c6
authored
Jul 16, 2009
by
Joerg Bruehe
Browse files
Options
Browse Files
Download
Plain Diff
Merge main 5.0 into 5.0-build
parents
67ffeccf
47d1a69a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
2 deletions
+49
-2
BUILD/check-cpu
BUILD/check-cpu
+7
-2
mysql-test/r/bug46080.result
mysql-test/r/bug46080.result
+14
-0
mysql-test/t/bug46080-master.opt
mysql-test/t/bug46080-master.opt
+1
-0
mysql-test/t/bug46080.test
mysql-test/t/bug46080.test
+22
-0
sql/item_sum.cc
sql/item_sum.cc
+5
-0
No files found.
BUILD/check-cpu
View file @
f39f36c6
...
...
@@ -44,8 +44,13 @@ check_cpu () {
model_name
=
`
sysctl
-n
hw.model
`
;;
Darwin
)
cpu_family
=
`
uname
-p
`
model_name
=
`
machine
`
cpu_family
=
`
sysctl
-n
machdep.cpu.vendor
`
model_name
=
`
sysctl
-n
machdep.cpu.brand_string
`
if
[
-z
"
$cpu_family
"
-o
-z
"
$model_name
"
]
then
cpu_family
=
`
uname
-p
`
model_name
=
`
machine
`
fi
;;
*
)
cpu_family
=
`
uname
-m
`
;
...
...
mysql-test/r/bug46080.result
0 → 100644
View file @
f39f36c6
#
# Bug #46080: group_concat(... order by) crashes server when
# sort_buffer_size cannot allocate
#
CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');
SET @@SESSION.sort_buffer_size=5*16*1000000;
SET @@SESSION.max_heap_table_size=5*1000000;
# Must not crash.
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
DROP TABLE t1;
SET @@SESSION.sort_buffer_size=default;
SET @@SESSION.max_heap_table_size=default;
End of 5.0 tests
mysql-test/t/bug46080-master.opt
0 → 100644
View file @
f39f36c6
--skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=4000000
mysql-test/t/bug46080.test
0 → 100644
View file @
f39f36c6
--
echo
#
--
echo
# Bug #46080: group_concat(... order by) crashes server when
--
echo
# sort_buffer_size cannot allocate
--
echo
#
CREATE
TABLE
t1
(
a
CHAR
(
255
));
INSERT
INTO
t1
VALUES
(
'a'
);
SET
@@
SESSION
.
sort_buffer_size
=
5
*
16
*
1000000
;
SET
@@
SESSION
.
max_heap_table_size
=
5
*
1000000
;
--
echo
# Must not crash.
--
disable_result_log
--
error
0
,
5
SELECT
GROUP_CONCAT
(
a
ORDER
BY
a
)
FROM
t1
GROUP
BY
a
;
--
enable_result_log
DROP
TABLE
t1
;
SET
@@
SESSION
.
sort_buffer_size
=
default
;
SET
@@
SESSION
.
max_heap_table_size
=
default
;
--
echo
End
of
5.0
tests
sql/item_sum.cc
View file @
f39f36c6
...
...
@@ -3291,8 +3291,13 @@ bool Item_func_group_concat::add()
TREE_ELEMENT
*
el
=
0
;
// Only for safety
if
(
row_eligible
&&
tree
)
{
el
=
tree_insert
(
tree
,
table
->
record
[
0
]
+
table
->
s
->
null_bytes
,
0
,
tree
->
custom_arg
);
/* check if there was enough memory to insert the row */
if
(
!
el
)
return
1
;
}
/*
If the row is not a duplicate (el->count == 1)
we can dump the row here in case of GROUP_CONCAT(DISTINCT...)
...
...
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