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
7629c6ea
Commit
7629c6ea
authored
Sep 07, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (Bug #5432: Is this a leak in mysql console client?)
parent
0275ada8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
client/mysql.cc
client/mysql.cc
+4
-4
No files found.
client/mysql.cc
View file @
7629c6ea
...
...
@@ -2220,7 +2220,9 @@ com_use(String *buffer __attribute__((unused)), char *line)
under our feet, for example if DROP DATABASE or RENAME DATABASE
(latter one not yet available by the time the comment was written)
*/
current_db
=
0
;
// Let's reset current_db, assume it's gone
/* Let's reset current_db, assume it's gone */
my_free
(
current_db
,
MYF
(
MY_ALLOW_ZERO_PTR
));
current_db
=
0
;
/*
We don't care about in case of an error below because current_db
was just set to 0.
...
...
@@ -2229,10 +2231,8 @@ com_use(String *buffer __attribute__((unused)), char *line)
(
res
=
mysql_use_result
(
&
mysql
)))
{
row
=
mysql_fetch_row
(
res
);
if
(
row
[
0
]
&&
(
!
current_db
||
cmp_database
(
current_db
,
row
[
0
])))
if
(
row
[
0
])
{
my_free
(
current_db
,
MYF
(
MY_ALLOW_ZERO_PTR
));
current_db
=
my_strdup
(
row
[
0
],
MYF
(
MY_WME
));
}
(
void
)
mysql_fetch_row
(
res
);
// Read eof
...
...
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