Bug #111303 | MySQL Server crashes when executing query | ||
---|---|---|---|
Submitted: | 6 Jun 2023 20:58 | Modified: | 19 Jul 2023 21:51 |
Reporter: | Yu Liang | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S6 (Debug Builds) |
Version: | 8.0.33 | OS: | Ubuntu (20.04 LTS) |
Assigned to: | CPU Architecture: | x86 (Intel(R) Core(TM) i7-10700) |
[6 Jun 2023 20:58]
Yu Liang
[7 Jun 2023 5:13]
MySQL Verification Team
Hello Yu Liang, Thank you for the report and test case. Observed that 8.0.33 debug build is affected. regards, Umesh
[7 Jun 2023 5:15]
MySQL Verification Team
- 8.0.33 debug build affected ./mtr bug111303 --nocheck-testcases --debug-server Logging: ./mtr bug111303 --nocheck-testcases --debug-server MySQL Version 8.0.33 Checking supported features - Binaries are debug compiled Using 'all' suites Collecting tests Checking leftover processes Removing old var directory - WARNING: Using the 'mysql-test/var' symlink Creating var directory '/export/home/tmp/ushastry/mysql-8.0.33/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ drop database if exists test123; Warnings: Note 1008 Can't drop database 'test123'; database doesn't exist create database test123; use test123; create table v0(c1 INT); CREATE OR REPLACE DEFINER = 'role_abc' VIEW any_view_name AS TABLE v0 WITH CASCADED CHECK OPTION ; Warnings: Note 1449 The user specified as a definer ('role_abc'@'%') does not exist DROP ROLE IF EXISTS 'role_abc' ; [ 50%] main.bug111303 [ fail ] Test ended at 2023-06-07 07:12:44 CURRENT_TEST: main.bug111303 mysqltest: At line 6: Query 'DROP ROLE IF EXISTS 'role_abc' ' failed. ERROR 2013 (HY000): Lost connection to MySQL server during query - 8.0.33 release build not affected ./mtr bug111303 --nocheck-testcases Logging: ./mtr bug111303 --nocheck-testcases MySQL Version 8.0.33 Checking supported features Using 'all' suites Collecting tests Checking leftover processes Removing old var directory - WARNING: Using the 'mysql-test/var' symlink Creating var directory '/export/home/tmp/ushastry/mysql-8.0.33/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ drop database if exists test123; Warnings: Note 1008 Can't drop database 'test123'; database doesn't exist create database test123; use test123; create table v0(c1 INT); CREATE OR REPLACE DEFINER = 'role_abc' VIEW any_view_name AS TABLE v0 WITH CASCADED CHECK OPTION ; Warnings: Note 1449 The user specified as a definer ('role_abc'@'%') does not exist DROP ROLE IF EXISTS 'role_abc' ; Warnings: Warning 4005 User 'role_abc'@'%' is referenced as a definer account in a view. Note 3162 Authorization ID 'role_abc'@'%' does not exist. [ 50%] main.bug111303 [ pass ] 11 [100%] shutdown_report [ pass ] ------------------------------------------------------------------------------ The servers were restarted 0 times The servers were reinitialized 0 times Spent 0.011 of 7 seconds executing testcases Completed: All 2 tests were successful.
[19 Jul 2023 21:51]
Jon Stephens
Documented fix as follows in the MySQL 8.0.35 and 8.2.0 changelogs: CREATE ROLE and DROP ROLE statements were not handled correctly when checking for orphaned SQL objects. Closed.