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
0868446b
Commit
0868446b
authored
Sep 19, 2003
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCRUM
embedded library missed memory freeing added
parent
cda32e12
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
libmysqld/embedded_priv.h
libmysqld/embedded_priv.h
+1
-0
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+10
-0
libmysqld/libmysqld.c
libmysqld/libmysqld.c
+3
-0
No files found.
libmysqld/embedded_priv.h
View file @
0868446b
...
@@ -26,6 +26,7 @@ C_MODE_START
...
@@ -26,6 +26,7 @@ C_MODE_START
extern
void
lib_connection_phase
(
NET
*
net
,
int
phase
);
extern
void
lib_connection_phase
(
NET
*
net
,
int
phase
);
extern
void
init_embedded_mysql
(
MYSQL
*
mysql
,
int
client_flag
,
char
*
db
);
extern
void
init_embedded_mysql
(
MYSQL
*
mysql
,
int
client_flag
,
char
*
db
);
extern
void
*
create_embedded_thd
(
int
client_flag
,
char
*
db
);
extern
void
*
create_embedded_thd
(
int
client_flag
,
char
*
db
);
extern
void
free_embedded_thd
(
MYSQL
*
mysql
);
extern
MYSQL_METHODS
embedded_methods
;
extern
MYSQL_METHODS
embedded_methods
;
void
free_old_query
(
MYSQL
*
mysql
);
void
free_old_query
(
MYSQL
*
mysql
);
extern
my_bool
server_inited
;
extern
my_bool
server_inited
;
...
...
libmysqld/lib_sql.cc
View file @
0868446b
...
@@ -474,6 +474,16 @@ void *create_embedded_thd(int client_flag, char *db)
...
@@ -474,6 +474,16 @@ void *create_embedded_thd(int client_flag, char *db)
return
thd
;
return
thd
;
}
}
void
free_embedded_thd
(
MYSQL
*
mysql
)
{
THD
*
thd
=
(
THD
*
)
mysql
->
thd
;
if
(
!
thd
)
return
;
if
(
thd
->
data
)
free_rows
(
thd
->
data
);
delete
thd
;
}
C_MODE_END
C_MODE_END
bool
Protocol
::
send_fields
(
List
<
Item
>
*
list
,
uint
flag
)
bool
Protocol
::
send_fields
(
List
<
Item
>
*
list
,
uint
flag
)
...
...
libmysqld/libmysqld.c
View file @
0868446b
...
@@ -289,6 +289,9 @@ void STDCALL mysql_close(MYSQL *mysql)
...
@@ -289,6 +289,9 @@ void STDCALL mysql_close(MYSQL *mysql)
#endif
/* HAVE_OPENSSL */
#endif
/* HAVE_OPENSSL */
if
(
mysql
->
free_me
)
if
(
mysql
->
free_me
)
my_free
((
gptr
)
mysql
,
MYF
(
0
));
my_free
((
gptr
)
mysql
,
MYF
(
0
));
free_embedded_thd
(
mysql
);
}
}
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
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