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
c9ff25f5
Commit
c9ff25f5
authored
Jan 09, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-3985 crash: uninstall soname 'a'
parent
a128c50a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
mysql-test/r/plugin.result
mysql-test/r/plugin.result
+2
-0
mysql-test/t/plugin.test
mysql-test/t/plugin.test
+12
-6
sql/sql_plugin.cc
sql/sql_plugin.cc
+13
-5
No files found.
mysql-test/r/plugin.result
View file @
c9ff25f5
...
...
@@ -69,6 +69,8 @@ UNINSTALL PLUGIN EXAMPLE;
ERROR 42000: PLUGIN EXAMPLE does not exist
UNINSTALL PLUGIN non_exist;
ERROR 42000: PLUGIN non_exist does not exist
UNINSTALL SONAME 'non_exist';
ERROR 42000: SONAME non_exist.so does not exist
#
# Bug#32034: check_func_enum() does not check correct values but set it
# to impossible int val
...
...
mysql-test/t/plugin.test
View file @
c9ff25f5
...
...
@@ -4,14 +4,14 @@
CREATE
TABLE
t1
(
a
int
)
ENGINE
=
EXAMPLE
;
DROP
TABLE
t1
;
eval
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
--
replace_regex
/
\
.
dll
/.
so
/
--
error
1125
eval
INSTALL
PLUGIN
EXAMPLE
SONAME
'ha_example'
;
INSTALL
PLUGIN
EXAMPLE
SONAME
'ha_example'
;
UNINSTALL
PLUGIN
example
;
eval
INSTALL
SONAME
'ha_example'
;
INSTALL
SONAME
'ha_example'
;
--
replace_column
5
#
--
replace_regex
/
\
.
dll
/.
so
/
--
query_vertical
select
*
from
information_schema
.
plugins
where
plugin_library
like
'ha_example%'
...
...
@@ -28,7 +28,7 @@ set global example_enum_var= e1;
show
status
like
'example%'
;
show
variables
like
'example%'
;
eval
UNINSTALL
SONAME
'ha_example'
;
UNINSTALL
SONAME
'ha_example'
;
--
replace_column
5
#
--
replace_regex
/
\
.
dll
/.
so
/
--
query_vertical
select
*
from
information_schema
.
plugins
where
plugin_library
like
'ha_example%'
...
...
@@ -41,12 +41,18 @@ UNINSTALL PLUGIN EXAMPLE;
--
error
1305
UNINSTALL
PLUGIN
non_exist
;
#
# MDEV-3985 crash: uninstall soname 'a'
#
--
replace_regex
/
\
.
dll
/.
so
/
--
error
1305
UNINSTALL
SONAME
'non_exist'
;
--
echo
#
--
echo
# Bug#32034: check_func_enum() does not check correct values but set it
--
echo
# to impossible int val
--
echo
#
eval
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
SET
GLOBAL
example_enum_var
=
e1
;
SET
GLOBAL
example_enum_var
=
e2
;
...
...
@@ -60,7 +66,7 @@ UNINSTALL PLUGIN example;
#
# Bug #32757 hang with sql_mode set when setting some global variables
#
eval
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
INSTALL
PLUGIN
example
SONAME
'ha_example'
;
select
@@
session
.
sql_mode
into
@
old_sql_mode
;
...
...
sql/sql_plugin.cc
View file @
c9ff25f5
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
Copyright (c) 2010, 201
1
, Monty Program Ab
Copyright (c) 2010, 201
3
, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -2260,11 +2260,19 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name,
{
fix_dl_name
(
thd
->
mem_root
,
&
dl
);
st_plugin_dl
*
plugin_dl
=
plugin_dl_find
(
&
dl
);
struct
st_maria_plugin
*
plugin
;
for
(
plugin
=
plugin_dl
->
plugins
;
plugin
->
info
;
plugin
++
)
if
(
plugin_dl
)
{
LEX_STRING
str
=
{
const_cast
<
char
*>
(
plugin
->
name
),
strlen
(
plugin
->
name
)
};
error
|=
do_uninstall
(
thd
,
table
,
&
str
);
for
(
struct
st_maria_plugin
*
plugin
=
plugin_dl
->
plugins
;
plugin
->
info
;
plugin
++
)
{
LEX_STRING
str
=
{
const_cast
<
char
*>
(
plugin
->
name
),
strlen
(
plugin
->
name
)
};
error
|=
do_uninstall
(
thd
,
table
,
&
str
);
}
}
else
{
my_error
(
ER_SP_DOES_NOT_EXIST
,
MYF
(
0
),
"SONAME"
,
dl
.
str
);
error
=
true
;
}
}
reap_plugins
();
...
...
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