• unknown's avatar
    Fixed BUG#6030: Stored procedure has no appropriate DROP privilege. · 1239d3e6
    unknown authored
      ...and no ALTER privilege either.
      For now, only the definer and root can drop or alter an SP.
    
    
    include/mysqld_error.h:
      New access denied error code when dropping/altering stored procedures.
    include/sql_state.h:
      New access denied error code when dropping/altering stored procedures.
    mysql-test/r/sp-error.result:
      Removed warning for "unitialized variable", as this popped up in unexpected
      places after the access control for drop/alter SPs was added. (And the warning
      was wrong and planned to be removed anyway.)
    mysql-test/r/sp-security.result:
      Added tests for access control on who's allowed to drop and alter SPs.
    mysql-test/r/sp.result:
      Updated results. (Warning removed.)
    mysql-test/t/sp-error.test:
      Removed warning for "unitialized variable", as this popped up in unexpected
      places after the access control for drop/alter SPs was added. (And the warning
      was wrong and planned to be removed anyway.)
    mysql-test/t/sp-security.test:
      Added tests for access control on who's allowed to drop and alter SPs.
    sql/share/czech/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/danish/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/dutch/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/english/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/estonian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/french/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/german/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/greek/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/hungarian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/italian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/japanese/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/korean/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/norwegian-ny/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/norwegian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/polish/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/portuguese/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/romanian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/russian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/serbian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/slovak/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/spanish/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/swedish/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/share/ukrainian/errmsg.txt:
      New access denied error message when dropping/altering stored procedures.
    sql/sql_parse.cc:
      Added minimal access control for DROP/ALTER PROCEDURE/FUNCTION. Only the definer
      and root are allowed to do this.
    sql/sql_yacc.yy:
      Removed warning for "unitialized variable", as this popped up in unexpected
      places after the access control for drop/alter SPs was added. (And the warning
      was wrong and planned to be removed anyway.)
    1239d3e6
sql_yacc.yy 198 KB