summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-05-29 10:39:45 +0200
committerunknown <andrey@lmy004.>2006-05-29 10:39:45 +0200
commitbdda01167579c5b846524d595b35027522d0f1ff (patch)
treeb5f8f9d86c6ec5a1912796534ba3ae361f6f2d8b /scripts
parentc4c26017c95ad50024c249168a803f6b6940e23b (diff)
downloadmariadb-git-bdda01167579c5b846524d595b35027522d0f1ff.tar.gz
Fix for bug #17394 - Events namespace is wrong
mysql-test/lib/init_db.sql: remove definer from PK mysql-test/r/events.result: update results mysql-test/r/system_mysql_db.result: update results mysql-test/t/events.test: remove I_S.EVENTS test and move it to events_grant.test scripts/mysql_fix_privilege_tables.sql: change table definition sql/event.cc: make events non-user specific (namespace change) sql/event.h: make events non-user specific (namespace change) sql/event_priv.h: make events non-user specific (namespace change) sql/event_scheduler.cc: make events non-user specific (namespace change) sql/event_timed.cc: make events non-user specific (namespace change) sql/sql_parse.cc: make events non-user specific (namespace change) sql/sql_show.cc: SHOW EVENTS is available to everyone who has EVENT on specific schema. No additional privileges are needed to see others' events. - user A has events in db1 and db2 - user B has events in db1 and db3 A will see all his events from db1 and db2 as well as B's events from db1 but not from db3. B will see her events from db1 and db3. In addition B will see only A's events from db1 but not db2.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_fix_privilege_tables.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 5b3cab16db2..f3c0c7f13be 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -570,7 +570,7 @@ DROP PROCEDURE create_log_tables;
CREATE TABLE event (
db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
- name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
+ name char(64) CHARACTER SET utf8 NOT NULL default '',
body longblob NOT NULL,
definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
execute_at DATETIME default NULL,
@@ -636,7 +636,7 @@ SELECT @hadEventPriv :=1 FROM user WHERE Event_priv LIKE '%';
ALTER TABLE user add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
ALTER TABLE db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
ALTER TABLE event DROP PRIMARY KEY;
-ALTER TABLE event ADD PRIMARY KEY(definer, db, name);
+ALTER TABLE event ADD PRIMARY KEY(db, name);
ALTER TABLE event ADD sql_mode
set('REAL_AS_FLOAT',
'PIPES_AS_CONCAT',