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
79d08e68
Commit
79d08e68
authored
Dec 07, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup: udf_init()/udf_free() calls
parent
859a7369
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
sql/mysqld.cc
sql/mysqld.cc
+2
-12
sql/sql_udf.cc
sql/sql_udf.cc
+3
-1
sql/sql_udf.h
sql/sql_udf.h
+3
-0
No files found.
sql/mysqld.cc
View file @
79d08e68
...
...
@@ -1813,12 +1813,7 @@ void clean_up(bool print_message)
item_user_lock_free
();
lex_free
();
/* Free some memory */
item_create_cleanup
();
if
(
!
opt_noacl
)
{
#ifdef HAVE_DLOPEN
udf_free
();
#endif
}
udf_free
();
table_def_start_shutdown
();
plugin_shutdown
();
ha_end
();
...
...
@@ -5005,12 +5000,7 @@ int mysqld_main(int argc, char **argv)
if
(
!
opt_bootstrap
)
servers_init
(
0
);
if
(
!
opt_noacl
)
{
#ifdef HAVE_DLOPEN
udf_init
();
#endif
}
udf_init
();
init_status_vars
();
if
(
opt_bootstrap
)
/* If running with bootstrap, do not start replication. */
...
...
sql/sql_udf.cc
View file @
79d08e68
...
...
@@ -142,7 +142,7 @@ void udf_init()
DBUG_ENTER
(
"ufd_init"
);
char
db
[]
=
"mysql"
;
/* A subject to casednstr, can't be constant */
if
(
initialized
)
if
(
initialized
||
opt_noacl
)
DBUG_VOID_RETURN
;
#ifdef HAVE_PSI_INTERFACE
...
...
@@ -267,6 +267,8 @@ void udf_free()
{
/* close all shared libraries */
DBUG_ENTER
(
"udf_free"
);
if
(
opt_noacl
)
DBUG_VOID_RETURN
;
for
(
uint
idx
=
0
;
idx
<
udf_hash
.
records
;
idx
++
)
{
udf_func
*
udf
=
(
udf_func
*
)
my_hash_element
(
&
udf_hash
,
idx
);
...
...
sql/sql_udf.h
View file @
79d08e68
...
...
@@ -143,5 +143,8 @@ udf_func *find_udf(const char *name, uint len=0,bool mark_used=0);
void
free_udf
(
udf_func
*
udf
);
int
mysql_create_function
(
THD
*
thd
,
udf_func
*
udf
);
int
mysql_drop_function
(
THD
*
thd
,
const
LEX_STRING
*
name
);
#else
static
inline
void
udf_init
(
void
)
{
}
static
inline
void
udf_free
(
void
)
{
}
#endif
#endif
/* SQL_UDF_INCLUDED */
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