diff options
author | unknown <pem@mysql.comhem.se> | 2004-10-22 20:29:06 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-10-22 20:29:06 +0200 |
commit | a50cd5c53dcdaad4202cdb4626372fd85eda6cb7 (patch) | |
tree | 7a873eb1cff12b1f55c60118cf16a838f3ac0488 /mysql-test/t/sp-security.test | |
parent | 35588c9dd0aef7db1c89731b0c4899b41576df9c (diff) | |
download | mariadb-git-a50cd5c53dcdaad4202cdb4626372fd85eda6cb7.tar.gz |
Fixed BUG#6030: Stored procedure has no appropriate DROP privilege.
...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.)
Diffstat (limited to 'mysql-test/t/sp-security.test')
-rw-r--r-- | mysql-test/t/sp-security.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test index 4804d44e63a..2b53bbc528a 100644 --- a/mysql-test/t/sp-security.test +++ b/mysql-test/t/sp-security.test @@ -180,8 +180,32 @@ use db2; call q(); select * from t2; -# Clean up + +# +# BUG#6030: Stored procedure has no appropriate DROP privilege +# (or ALTER for that matter) + +# still connection con2user1 in db2 + +# This should work: +alter procedure p modifies sql data; +drop procedure p; + +# This should NOT work +--error 1370 +alter procedure q modifies sql data; +--error 1370 +drop procedure q; + connection con1root; +use db2; +# But root always can +alter procedure q modifies sql data; +drop procedure q; + + +# Clean up +#Still connection con1root; use test; select type,db,name from mysql.proc; drop database db1_secret; |