Fix bug #12812 create view calling a function works without execute right on function
Execution rigths on function was checked just before function execution, thus it was unknown on prepare stage whether user have right to execute particular function. Added access rights checking function which is called right after fixing Item_func_sp. This have additional effect that if user don't have rights for execution query will fail on earlier stage and will not waste resources on optimizing with failing on execution stage. sql/item_func.h: Fix bug#12812 create view calling a function works without execute right on function sql/item_func.cc: Fix bug#12812 create view calling a function works without execute right on function Added function Item_func_sp::check_access() which checks access rights. Added function Item_func_sp::fix_field() which calls check_access() after fixing. Item_func_sp::execute() now calls to check_access() to check access rights. mysql-test/t/sp.test: Test case for bug#12812 create view calling a function works without execute right on function mysql-test/r/sp.result: Test case for bug#12812 create view calling a function works without execute right on function
Showing
Please register or sign in to comment