mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
482d60082f
The check_global_access() function was made available to InnoDB, but was not defined in the embedded server library. InnoDB, as a plugin, is not recompiled when the embedded server is built. This caused a link failure when compiling applications which use the embedded server. The fix here is to always define check_global_access() externally; in the embedded server case, it is defined to just return OK. Also, don't run the test case for this bug in embedded server. mysql-test/t/innodb_bug34053.test: Disable this test on embedded server - it tests privilege checks which are not in place there. sql/mysql_priv.h: Since check_global_access() may be used from some storage engine plugins (InnoDB, currently), and the plugins are not recompiled for the embedded server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS. sql/sql_parse.cc: Since check_global_access() may be used from some storage engine plugins (InnoDB, currently), and the plugins are not recompiled for the embedded server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS.
50 lines
1.4 KiB
Text
50 lines
1.4 KiB
Text
#
|
|
# Make sure http://bugs.mysql.com/34053 remains fixed.
|
|
#
|
|
|
|
-- source include/not_embedded.inc
|
|
-- source include/have_innodb.inc
|
|
|
|
SET storage_engine=InnoDB;
|
|
|
|
# we do not really care about what gets printed, we are only
|
|
# interested in getting success or failure according to our
|
|
# expectations
|
|
-- disable_query_log
|
|
-- disable_result_log
|
|
|
|
GRANT USAGE ON *.* TO 'shane'@'localhost' IDENTIFIED BY '12345';
|
|
FLUSH PRIVILEGES;
|
|
|
|
-- connect (con1,localhost,shane,12345,)
|
|
|
|
-- connection con1
|
|
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
|
|
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
|
|
CREATE TABLE innodb_monitorx (a INT) ENGINE=INNODB;
|
|
DROP TABLE innodb_monitorx;
|
|
CREATE TABLE innodb_monito (a INT) ENGINE=INNODB;
|
|
DROP TABLE innodb_monito;
|
|
CREATE TABLE xinnodb_monitor (a INT) ENGINE=INNODB;
|
|
DROP TABLE xinnodb_monitor;
|
|
CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB;
|
|
DROP TABLE nnodb_monitor;
|
|
|
|
-- connection default
|
|
CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
|
|
CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
|
|
|
|
-- connection con1
|
|
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
DROP TABLE innodb_monitor;
|
|
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
DROP TABLE innodb_mem_validate;
|
|
|
|
-- connection default
|
|
DROP TABLE innodb_monitor;
|
|
DROP TABLE innodb_mem_validate;
|
|
DROP USER 'shane'@'localhost';
|
|
|
|
-- disconnect con1
|