mysqldump temporary views missing definer

Description

I have two views:
create DEFINER=test@'%' SQL SECURITY INVOKER VIEW test.v0 AS SELECT 1;
create DEFINER=test@'%' SQL SECURITY INVOKER VIEW test.v1 AS SELECT 1 FROM test.v0;

mysql root user is removed.
Trying to import dump to a just created server and getting surprising error:
ERROR 1449 (HY000) at line 938: The user specified as a definer ('root'@'localhost') does not exist

5.5 - not affected, because it uses temporary myisam table
5.6, 5.7 and 8.0 (requires longer sleeps) producing:
ERROR 1449 (HY000) at line 974: The user specified as a definer ('root'@'localhost') does not exist

Different versions have a slightly different line containing statement:
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`test`@`%` SQL SECURITY INVOKER */
/*!50001 VIEW `v0` AS select 1 AS `1` from `v1` */;

At this moment, temporary view defined as:
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `1`*/;

Environment

 

AFFECTED CS IDs

239475

Smart Checklist

Activity

Julia Vural March 4, 2025 at 9:02 PM

It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.

Won't Do

Details

Assignee

Reporter

Labels

Upstream Bug URL

Affects versions

Priority

Smart Checklist

Created November 9, 2018 at 11:01 AM
Updated March 4, 2025 at 9:02 PM
Resolved March 4, 2025 at 9:02 PM