-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-24815 Add 'allow-suspicious-udfs' and 'skip-grant-tables' to sys…
…tem variables Make two existing command line options "allow-suspicious-udfs" and "skip-grant-tables" visible as global system variables. Both options have security implications, but users were not able to check their states in the server prior to this change. This was a security issue, as the user may not be aware if the options are enabled. By adding them into system variables, it increases users’ visibility into their security configurations. Create new MTR tests to verify that the system variables align with the command line options. Minor adjustments to the existing MTR due to the new members in system variables. Before: mysql> SHOW VARIABLES WHERE Variable_Name LIKE 'allow_suspicious_udfs' OR Variable_Name LIKE 'skip_grant_tables'; Empty set (0.000 sec) After: mysql> SHOW VARIABLES WHERE Variable_Name LIKE 'allow_suspicious_udfs' OR Variable_Name LIKE 'skip_grant_tables'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | allow_suspicious_udfs | OFF | | skip_grant_tables | OFF | +-----------------------+-------+ All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
- Loading branch information
1 parent
3cc8539
commit b3df1ec
Showing
11 changed files
with
123 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# MDEV-24815 Show "--allow-suspicious-udfs" state in SYSTEM VARIABLES | ||
# | ||
SELECT @@allow_suspicious_udfs AS EXPECT_0; | ||
EXPECT_0 | ||
0 | ||
# restart: --allow-suspicious-udfs | ||
SELECT @@allow_suspicious_udfs AS EXPECT_1; | ||
EXPECT_1 | ||
1 | ||
# restart: --skip-allow-suspicious-udfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--echo # | ||
--echo # MDEV-24815 Show "--allow-suspicious-udfs" state in SYSTEM VARIABLES | ||
--echo # | ||
|
||
SELECT @@allow_suspicious_udfs AS EXPECT_0; | ||
|
||
# Restart the server the server with "--allow-suspicious-udfs" option | ||
--let $restart_parameters = "--allow-suspicious-udfs" | ||
--source include/restart_mysqld.inc | ||
SELECT @@allow_suspicious_udfs AS EXPECT_1; | ||
|
||
# Disable "--allow-suspicious-udfs" to restore the original state | ||
--let $restart_parameters = "--skip-allow-suspicious-udfs" | ||
--source include/restart_mysqld.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters