Skip to content

Core/DB Declare DEFINER as CURRENT_USER in stored procedures #9077

@Kline-

Description

@Kline-

Currently all stored procedures are written with DEFINER='root'@'localhost'. Declaring the definer as root causes errors for anyone using a non-root SQL user unless the user is granted the SUPER privilege. This should be rewritten as CURRENT_USER().

From the MySQL manual: http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html

The default DEFINER value is the user who executes the CREATE PROCEDURE or CREATE FUNCTION or statement. This is the same as specifying DEFINER = CURRENT_USER explicitly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions