mariadb/scripts
unknown 6aaed7330c Fix for BUG#9412: Triggers: should have trigger privilege.
Implement table-level TRIGGER privilege to control access to triggers.
Before this path global SUPER privilege was used for this purpose, that
was the big security problem.

In details, before this patch SUPER privilege was required:
  - for the user at CREATE TRIGGER time to create a new trigger;
  - for the user at DROP TRIGGER time to drop the existing trigger;
  - for the definer at trigger activation time to execute the trigger (if the
    definer loses SUPER privilege, all its triggers become unavailable);

This patch changes the behaviour in the following way:
  - TRIGGER privilege on the subject table for trigger is required:
    - for the user at CREATE TRIGGER time to create a new trigger;
    - for the user at DROP TRIGGER time to drop the existing trigger;
    - for the definer at trigger activation time to execute the trigger
      (if the definer loses TRIGGER privilege on the subject table, all its
      triggers on this table become unavailable).
  - SUPER privilege is still required:
    - for the user at CREATE TRIGGER time to explicitly set the trigger
      definer to the user other than CURRENT_USER().

When the server works with database of the previous version (w/o TRIGGER
privilege), or if the database is being upgraded from the previous versions,
TRIGGER privilege is granted to whose users, who have CREATE privilege.


mysql-test/r/grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/information_schema.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/lowercase_table_grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/ps.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/sp.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/trigger-compat.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/trigger-grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/t/trigger-compat.test:
  Grant table-level TRIGGER privilege instead of global SUPER one.
mysql-test/t/trigger-grant.test:
  1. Grant table-level TRIGGER privilege instead of global SUPER one.
  2. Updated the test case to check that SUPER is required to specify
  the user other than the current as a definer.
scripts/mysql_create_system_tables.sh:
  Added TRIGGER privilege.
scripts/mysql_fix_privilege_tables.sql:
  Added TRIGGER privilege.
sql/sql_acl.cc:
  Added TRIGGER privilege.
sql/sql_acl.h:
  Added TRIGGER privilege.
sql/sql_show.cc:
  Added TRIGGER privilege.
sql/sql_trigger.cc:
  Check TRIGGER privilege instead of SUPER.
sql/sql_yacc.yy:
  Added TRIGGER privilege.
2006-02-01 13:28:45 +03:00
..
.cvsignore
fill_func_tables.sh Hack to ensure that CHAR's created in 5.0 are not converted to VARCHAR even if 2005-03-22 21:52:01 +01:00
fill_help_tables.sh - added copyright header on top of the fill_help_tables.sql file (BUG#5772) 2005-02-09 17:40:10 +01:00
fill_help_tables.sql More changes to reflect the removal of manual.texi from the sources: 2005-04-13 18:29:23 +02:00
make_binary_distribution.sh Test files in new subdirectory "mysql-test/extra" need to be propagated into binary distribution. 2006-01-03 14:36:31 +01:00
make_sharedlib_distribution.sh - match shared library file name suffixes on Mac OS X (.dylib) 2004-07-23 12:44:09 +02:00
make_win_src_distribution.sh Merge bk-internal:/home/bk/mysql-5.1-new 2006-01-30 22:35:46 +01:00
Makefile.am Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0 2005-11-23 14:57:00 +02:00
msql2mysql.sh
mysql_config.sh mysql_config.sh: 2005-09-28 13:39:28 +02:00
mysql_convert_table_format.sh
mysql_create_system_tables.sh Fix for BUG#9412: Triggers: should have trigger privilege. 2006-02-01 13:28:45 +03:00
mysql_explain_log.sh
mysql_find_rows.sh Fix skipp -> skip once and for all. 2004-06-03 11:52:54 -05:00
mysql_fix_extensions.sh
mysql_fix_privilege_tables.sh Make mysql_fix_privilege_tables.sh not dependent on the current directory. 2005-10-05 01:08:22 +04:00
mysql_fix_privilege_tables.sql Fix for BUG#9412: Triggers: should have trigger privilege. 2006-02-01 13:28:45 +03:00
mysql_install_db.sh Manual merge of fix for bug #9913 into 5.0 tree. 2005-05-09 16:21:57 +04:00
mysql_prepare_privilege_tables_for_5.sql
mysql_secure_installation.sh
mysql_setpermission.sh
mysql_zap.sh Minor tweaks to help message of obscure script. 2004-04-04 18:48:41 -05:00
mysqlaccess.conf
mysqlaccess.sh Merge serg.mylan:/usr/home/serg/Abk/mysql-4.0 2005-01-13 11:12:00 +01:00
mysqlbug.sh merge with 3.23 2004-03-25 22:05:09 +02:00
mysqld_multi.sh Manual merge of the fix for bug#16106. 2006-01-16 16:48:05 +01:00
mysqld_safe-watch.sh
mysqld_safe.sh Merge mysql.com:/home/jimw/my/mysql-4.1-clean 2005-11-01 12:15:08 -08:00
mysqldumpslow.sh mysqldumpslow.sh: 2005-03-09 15:00:40 +01:00
mysqlhotcopy.sh Don't try to mysqlhotcopy the INFORMATION_SCHEMA database. (Bug #14610) 2005-11-10 17:05:36 -08:00