Skip to content

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

Kline- opened this Issue Jan 28, 2013 · 1 comment

2 participants

Kline- commented Jan 28, 2013

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:

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.

TrinityCore member
DDuarte commented Jan 28, 2013

Ups, I forgot to remove those references to root from the full .sql like in the 30 previous DBs...

I put my blame on mysqldump.

@DDuarte DDuarte added a commit that closed this issue Feb 15, 2013
@DDuarte DDuarte TDB 335.51 - 2013/02/14
Ref #8947
Closes #9077
@DDuarte DDuarte closed this in e685b7b Feb 15, 2013
@DDuarte DDuarte added a commit to raczman/TrinityCore that referenced this issue Apr 20, 2014
@DDuarte DDuarte TDB 335.51 - 2013/02/14
Ref #8947
Closes #9077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.