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
c29f45ce
Commit
c29f45ce
authored
Jun 29, 2021
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25481 Memory leak in Cached_item_str::Cached_item_str WITH TIES involving a blob
Make sure to call cached item's destructors.
parent
63e9a054
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
mysql-test/main/fetch_first.result
mysql-test/main/fetch_first.result
+10
-0
mysql-test/main/fetch_first.test
mysql-test/main/fetch_first.test
+10
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/main/fetch_first.result
View file @
c29f45ce
...
...
@@ -1368,3 +1368,13 @@ f
1
1
drop table t1;
#
# MDEV-25481: Memory leak upon query WITH TIES involving a blob
#
CREATE TABLE t (a TEXT);
INSERT INTO t VALUES ('foo'),('bar');
SELECT a FROM t ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
a
bar
foo
DROP TABLE t;
mysql-test/main/fetch_first.test
View file @
c29f45ce
...
...
@@ -1046,3 +1046,13 @@ SELECT SQL_BUFFER_RESULT 1 AS f FROM t1 ORDER BY f FETCH NEXT 2 ROW WITH TIES;
SELECT
1
AS
f
FROM
t1
ORDER
BY
f
FETCH
NEXT
2
ROW
WITH
TIES
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-25481: Memory leak upon query WITH TIES involving a blob
--
echo
#
CREATE
TABLE
t
(
a
TEXT
);
INSERT
INTO
t
VALUES
(
'foo'
),(
'bar'
);
SELECT
a
FROM
t
ORDER
BY
a
FETCH
FIRST
2
ROWS
WITH
TIES
;
# Cleanup
DROP
TABLE
t
;
sql/sql_select.cc
View file @
c29f45ce
...
...
@@ -14231,6 +14231,7 @@ void JOIN::cleanup(bool full)
// Run Cached_item DTORs!
group_fields
.
delete_elements
();
order_fields
.
delete_elements
();
/*
We can't call delete_elements() on copy_funcs as this will cause
...
...
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