mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
WL#1034 updated
- split into several files
- forbid parallel execution (before analyse is done how to make it possible)
because the same sp_head instance cannot be executed in parallel
- added GPL headers
- changed EVENT_ACL to be per DB variable
- fixed minor problems
mysql-test/lib/init_db.sql:
WL#1034 updated
- add Event_priv to mysql.user (update test)
- add updated mysql.event table struct
scripts/mysql_fix_privilege_tables.sql:
WL#1034 updated
add updated mysql.event structure
sql/Makefile.am:
split event.cc into
- event.cc (create/alter/drop)
- event_executor.cc (main and worker threads)
- event_timed.cc (class event_timed)
- event_priv.h (some definitions used internally by the module)
sql/event.cc:
- added GPL header
- split into few files
- fixed some issues after code review
- now using SP routines for opening/traversing/closing tables
(will be reverted)
sql/event.h:
- add GPL header
- remove two methods - inline them in sql_yacc.yy
- don't use absolute values for EVEX_ defines but the SP_ equivalents (have to move 100% to SP_
defines and as later step to not transfer messages upwards in the stack but
report them at the place they occur)
- updated reference table definition
- move default mem_root param from event.cc to the header
sql/mysqld.cc:
WL#1034
rename --event-executor to --event-scheduler
executor sounds a bit scary :)
sql/set_var.cc:
rename internal variable name from event_executor to event_scheduler
(ppl won't be scarried anymore :)
sql/share/errmsg.txt:
omit one %s - not needed
sql/sp_head.cc:
disable this DBUG_PRINT for a bit. m_next_cached_sp is 0x0 and I get crash here...
sql/sp_head.h:
remove m_old_cmq, a temporal variable is used in sql_yacc.yy (Serg's idea)
to keep the previous state.
$<ulong_val>$ = ....
YYTHD->client_capabilites != $<ulong_val>4;
(the same is done also for class event_timed)
sql/sql_acl.cc:
handle pre-5.1.4 table and give the user EVENT_ACL if he had CREATE_ACL
sql/sql_acl.h:
fix the bitmask
sql/sql_parse.cc:
- move from EVENT_ACL being global to EVENT_ACL being per DB like
CREATE_PROC_ACL
- lex->m_qname dropped, because not needed, fix code therefore
- add comment that SHOW CREATE EVENT has to be implemented
sql/sql_yacc.yy:
- use temporal variable of Bison to store a short lived value
- fix indentation
- inline 2 class event_timed methods in the parser
sql/tztime.h:
be more expressive - it's already extern
This commit is contained in:
@@ -89,6 +89,7 @@ CREATE TABLE user (
|
||||
Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
|
||||
Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
|
||||
Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
|
||||
Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
|
||||
ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
|
||||
ssl_cipher BLOB NOT NULL,
|
||||
x509_issuer BLOB NOT NULL,
|
||||
@@ -103,9 +104,9 @@ CHARACTER SET utf8 COLLATE utf8_bin
|
||||
comment='Users and global privileges';
|
||||
|
||||
|
||||
INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
INSERT INTO user VALUES ('@HOSTNAME@%' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
INSERT INTO user VALUES ('@HOSTNAME@%' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
|
||||
INSERT INTO user (host,user) VALUES ('localhost','');
|
||||
INSERT INTO user (host,user) VALUES ('@HOSTNAME@%','');
|
||||
|
||||
@@ -566,3 +567,29 @@ CREATE TABLE proc (
|
||||
comment char(64) collate utf8_bin DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (db,name,type)
|
||||
) character set utf8 comment='Stored Procedures';
|
||||
|
||||
|
||||
CREATE TABLE event (
|
||||
'db' VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
|
||||
'name' VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
|
||||
'body' longblob NOT NULL,
|
||||
'definer' VARCHAR(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
|
||||
'execute_at' DATETIME default NULL,
|
||||
'transient_expression' int(11) default NULL,
|
||||
'interval_type' ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK',
|
||||
'SECOND','MICROSECOND', 'YEAR_MONTH','DAY_HOUR',
|
||||
'DAY_MINUTE','DAY_SECOND',
|
||||
'HOUR_MINUTE','HOUR_SECOND',
|
||||
'MINUTE_SECOND','DAY_MICROSECOND',
|
||||
'HOUR_MICROSECOND','MINUTE_MICROSECOND',
|
||||
'SECOND_MICROSECOND') default NULL,
|
||||
'created' TIMESTAMP NOT NULL default '0000-00-00 00:00:00',
|
||||
'modified' TIMESTAMP NOT NULL default '0000-00-00 00:00:00',
|
||||
'last_executed' DATETIME default NULL,
|
||||
'starts' DATETIME default NULL,
|
||||
'ends' DATETIME default NULL,
|
||||
'status' ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
|
||||
'on_completion' ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
|
||||
'comment' varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
|
||||
PRIMARY KEY ('db','name')
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
|
||||
|
||||
Reference in New Issue
Block a user