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
d7b021a3
Commit
d7b021a3
authored
Nov 27, 2003
by
konstantin@oak.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memory leak (no delete for query= new String) fixed
parent
9702a402
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sql/sql_prepare.cc
sql/sql_prepare.cc
+6
-6
No files found.
sql/sql_prepare.cc
View file @
d7b021a3
...
...
@@ -426,8 +426,10 @@ static bool insert_params_withlog(PREP_STMT *stmt, uchar *pos, uchar *read_pos)
Item_param
*
param
;
DBUG_ENTER
(
"insert_params_withlog"
);
String
str
,
*
res
,
*
query
=
new
String
(
stmt
->
query
->
alloced_length
());
query
->
copy
(
*
stmt
->
query
);
String
str
,
query
,
*
res
;
if
(
query
.
copy
(
*
stmt
->
query
))
DBUG_RETURN
(
1
);
ulong
param_no
=
0
;
uint32
length
=
0
;
...
...
@@ -451,16 +453,14 @@ static bool insert_params_withlog(PREP_STMT *stmt, uchar *pos, uchar *read_pos)
res
=
param
->
query_val_str
(
&
str
);
}
}
if
(
query
->
replace
(
param
->
pos_in_query
+
length
,
1
,
*
res
))
if
(
query
.
replace
(
param
->
pos_in_query
+
length
,
1
,
*
res
))
DBUG_RETURN
(
1
);
length
+=
res
->
length
()
-
1
;
param_no
++
;
}
if
(
alloc_query
(
stmt
->
thd
,
(
char
*
)
query
->
ptr
(),
query
->
length
()
+
1
))
if
(
alloc_query
(
thd
,
(
char
*
)
query
.
ptr
(),
query
.
length
()
+
1
))
DBUG_RETURN
(
1
);
query
->
free
();
DBUG_RETURN
(
0
);
}
...
...
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