summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/plugin_not_embedded.test
blob: a9126053f18246aa708ffd5923325c11b72655c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--source include/not_embedded.inc
--source include/have_example_plugin.inc

--echo #
--echo # Bug#51770: UNINSTALL PLUGIN requires no privileges
--echo #

CREATE USER bug51770@localhost;
GRANT INSERT ON mysql.plugin TO bug51770@localhost;
connect(con1,localhost,bug51770,,);
--replace_regex /\.dll/.so/
eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
--error ER_TABLEACCESS_DENIED_ERROR
UNINSTALL PLUGIN example;
connection default;
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
connection con1;
UNINSTALL PLUGIN example;
disconnect con1;
connection default;
DROP USER bug51770@localhost;

# 
# BUG#58246: INSTALL PLUGIN not secure & crashable
#
# The bug consisted of not recognizing / on Windows, so checking / on
# all platforms should cover this case.

let $path = `select CONCAT_WS('/', '..', '$HA_EXAMPLE_SO')`;
--replace_regex /\.dll/.so/
--error ER_UDF_NO_PATHS
eval INSTALL PLUGIN example SONAME '$path';

#
# Bug#27302459: EMPTY VALUE IN MYSQL.PLUGIN TABLE CAUSES SERVER TO EXIT ON STARTUP
#
insert mysql.plugin values ();
source include/restart_mysqld.inc;
delete from mysql.plugin where name = '';

--echo # End of 5.5 tests