mariadb/mysql-test/suite/funcs_1/storedproc
Dmitry Lenev eaae675279 Fix for bug#57061 "User without privilege on routine can
discover its existence".

The problem was that user without any privileges on 
routine was able to find out whether it existed or not.
DROP FUNCTION and DROP PROCEDURE statements were 
checking if routine being dropped existed and reported 
ER_SP_DOES_NOT_EXIST error/warning before checking 
if user had enough privileges to drop it.

This patch solves this problem by changing code not to 
check if routine exists before checking if user has enough 
privileges to drop it. Moreover we no longer perform this 
check using a separate call instead we rely on 
sp_drop_routine() returning SP_KEY_NOT_FOUND if routine 
doesn't exist.

This change also simplifies one of upcoming patches
refactoring global read lock implementation.

mysql-test/r/grant.result:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence". Removed
  DROP PROCEDURE/FUNCTION statements which have started to
  fail after this fix (correctly). There is no need in
  dropping routines in freshly created database anyway.
mysql-test/r/sp-security.result:
  Added new test case for bug#57061 "User without privilege
  on routine can discover its existence". Updated existing
  tests according to new behaviour.
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence".
  Now we drop routines under user which has enough
  privileges to do so.
mysql-test/suite/funcs_1/r/memory_storedproc_06.result:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence".
  Now we drop routines under user which has enough
  privileges to do so.
mysql-test/suite/funcs_1/r/myisam_storedproc_06.result:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence".
  Now we drop routines under user which has enough
  privileges to do so.
mysql-test/suite/funcs_1/storedproc/storedproc_06.inc:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence".
  Now we drop routines under user which has enough
  privileges to do so.
mysql-test/t/grant.test:
  Updated test case after fixing bug#57061 "User without
  privilege on routine can discover its existence". Removed
  DROP PROCEDURE/FUNCTION statements which have started to
  fail after this fix (correctly). There is no need in
  dropping routines in freshly created database anyway.
mysql-test/t/sp-security.test:
  Added new test case for bug#57061 "User without privilege
  on routine can discover its existence". Updated existing
  tests according to new behaviour.
sql/sp.cc:
  Removed sp_routine_exists_in_table() which is no longer
  used.
sql/sp.h:
  Removed sp_routine_exists_in_table() which is no longer
  used.
sql/sql_parse.cc:
  When dropping routine we no longer check if routine exists 
  before checking if user has enough privileges to do so. 
  Moreover we no longer perform this check using a separate 
  call instead we rely on sp_drop_routine() returning 
  SP_KEY_NOT_FOUND if routine doesn't exist.
2010-10-07 20:01:17 +04:00
..
cleanup_sp_tb.inc Fix for 2008-03-31 19:48:02 +02:00
load_sp_tb.inc Rename std_data_ln to std_data. 2009-01-31 17:22:59 -02:00
param_check.inc Bug#40177: Test funcs_1.storedproc failing on Pushbuild 2008-12-03 21:44:07 -05:00
storedproc_02.inc Bug#36721 - Test funcs1.<engine>_func_view failing for multiple engines 2008-05-27 19:30:07 -04:00
storedproc_03.inc Fix for 2008-03-31 19:48:02 +02:00
storedproc_06.inc Fix for bug#57061 "User without privilege on routine can 2010-10-07 20:01:17 +04:00
storedproc_07.inc WL#4203 Reorganize and fix the data dictionary tests of 2008-03-07 17:33:07 +01:00
storedproc_08.inc WL#4203 Reorganize and fix the data dictionary tests of 2008-03-07 17:33:07 +01:00
storedproc_08_show.inc backported: 2010-01-15 15:42:15 +04:00
storedproc_10.inc Fixed many funcs_1 tests after 43588 2010-03-19 09:56:26 +01:00