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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d0d375c4
Commit
d0d375c4
authored
Jan 28, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed memory leak in ROW code (SCRUM 577)
parent
d39a2c0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+14
-5
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-0
No files found.
sql/item_cmpfunc.cc
View file @
d0d375c4
...
...
@@ -1078,8 +1078,9 @@ in_string::in_string(uint elements,qsort_cmp cmp_func)
in_string
::~
in_string
()
{
for
(
uint
i
=
0
;
i
<
count
;
i
++
)
((
String
*
)
base
)[
i
].
free
();
if
(
base
)
for
(
uint
i
=
0
;
i
<
count
;
i
++
)
((
String
*
)
base
)[
i
].
free
();
}
void
in_string
::
set
(
uint
pos
,
Item
*
item
)
...
...
@@ -1100,12 +1101,20 @@ byte *in_string::get_value(Item *item)
in_row
::
in_row
(
uint
elements
,
Item
*
item
)
{
DBUG_ENTER
(
"in_row::in_row"
);
base
=
(
char
*
)
new
cmp_item_row
[
elements
];
base
=
(
char
*
)
new
cmp_item_row
[
count
=
elements
];
size
=
sizeof
(
cmp_item_row
);
compare
=
(
qsort_cmp
)
cmp_row
;
tmp
.
store_value
(
item
);
DBUG_VOID_RETURN
;
}
in_row
::~
in_row
()
{
if
(
base
)
{
cmp_item_row
*
arr
=
(
cmp_item_row
*
)
base
;
for
(
uint
i
=
0
;
i
<
count
;
i
++
)
arr
[
i
].
~
cmp_item_row
();
}
}
byte
*
in_row
::
get_value
(
Item
*
item
)
...
...
sql/item_cmpfunc.h
View file @
d0d375c4
...
...
@@ -557,6 +557,7 @@ class in_row :public in_vector
cmp_item_row
tmp
;
public:
in_row
(
uint
elements
,
Item
*
);
~
in_row
();
void
set
(
uint
pos
,
Item
*
item
);
byte
*
get_value
(
Item
*
item
);
};
...
...
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