Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c326d965
Commit
c326d965
authored
Jan 11, 2006
by
andrey@lmy004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL #1034 (Internal CRON) pre-push fixes
after another merge fixes.
parent
8515610f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
144 additions
and
12 deletions
+144
-12
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+2
-2
mysql-test/r/mysqlcheck.result
mysql-test/r/mysqlcheck.result
+2
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+2
-0
sql/event.cc
sql/event.cc
+5
-5
sql/event_timed.cc
sql/event_timed.cc
+2
-2
sql/share/errmsg.txt
sql/share/errmsg.txt
+32
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+99
-3
No files found.
mysql-test/r/information_schema.result
View file @
c326d965
...
@@ -728,7 +728,7 @@ CREATE TABLE t_crashme ( f1 BIGINT);
...
@@ -728,7 +728,7 @@ CREATE TABLE t_crashme ( f1 BIGINT);
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*)
count(*)
10
5
10
6
drop view a2, a1;
drop view a2, a1;
drop table t_crashme;
drop table t_crashme;
select table_schema,table_name, column_name from
select table_schema,table_name, column_name from
...
@@ -811,7 +811,7 @@ flush privileges;
...
@@ -811,7 +811,7 @@ flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*)
table_schema count(*)
information_schema 19
information_schema 19
mysql 1
8
mysql 1
9
create table t1 (i int, j int);
create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row
create trigger trg1 before insert on t1 for each row
begin
begin
...
...
mysql-test/r/mysqlcheck.result
View file @
c326d965
mysql.columns_priv OK
mysql.columns_priv OK
mysql.db OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.func OK
mysql.help_category OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_keyword OK
...
@@ -18,6 +19,7 @@ mysql.time_zone_transition_type OK
...
@@ -18,6 +19,7 @@ mysql.time_zone_transition_type OK
mysql.user OK
mysql.user OK
mysql.columns_priv OK
mysql.columns_priv OK
mysql.db OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.func OK
mysql.help_category OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_keyword OK
...
...
mysql-test/r/sp.result
View file @
c326d965
...
@@ -2116,6 +2116,7 @@ Create view Tables To create new views
...
@@ -2116,6 +2116,7 @@ Create view Tables To create new views
Create user Server Admin To create new users
Create user Server Admin To create new users
Delete Tables To delete existing rows
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
Drop Databases,Tables To drop databases, tables, and views
Event Server Admin Creation, alteration, deletion and execution of events.
Execute Functions,Procedures To execute stored routines
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
...
@@ -2170,6 +2171,7 @@ Create view Tables To create new views
...
@@ -2170,6 +2171,7 @@ Create view Tables To create new views
Create user Server Admin To create new users
Create user Server Admin To create new users
Delete Tables To delete existing rows
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
Drop Databases,Tables To drop databases, tables, and views
Event Server Admin Creation, alteration, deletion and execution of events.
Execute Functions,Procedures To execute stored routines
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
...
...
sql/event.cc
View file @
c326d965
...
@@ -413,7 +413,7 @@ db_create_event(THD *thd, event_timed *et, my_bool create_if_not,
...
@@ -413,7 +413,7 @@ db_create_event(THD *thd, event_timed *et, my_bool create_if_not,
if
((
ret
=
evex_fill_row
(
thd
,
table
,
et
,
false
)))
if
((
ret
=
evex_fill_row
(
thd
,
table
,
et
,
false
)))
goto
err
;
goto
err
;
if
(
table
->
file
->
write_row
(
table
->
record
[
0
]))
if
(
table
->
file
->
ha_
write_row
(
table
->
record
[
0
]))
{
{
my_error
(
ER_EVENT_STORE_FAILED
,
MYF
(
0
),
et
->
name
.
str
,
ret
);
my_error
(
ER_EVENT_STORE_FAILED
,
MYF
(
0
),
et
->
name
.
str
,
ret
);
goto
err
;
goto
err
;
...
@@ -423,8 +423,8 @@ db_create_event(THD *thd, event_timed *et, my_bool create_if_not,
...
@@ -423,8 +423,8 @@ db_create_event(THD *thd, event_timed *et, my_bool create_if_not,
{
{
thd
->
clear_error
();
thd
->
clear_error
();
/* Such a statement can always go directly to binlog, no trans cache */
/* Such a statement can always go directly to binlog, no trans cache */
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
,
FALSE
);
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
mysql_bin_log
.
write
(
&
qinfo
);
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
*
rows_affected
=
1
;
*
rows_affected
=
1
;
...
@@ -522,7 +522,7 @@ db_update_event(THD *thd, event_timed *et, sp_name *new_name)
...
@@ -522,7 +522,7 @@ db_update_event(THD *thd, event_timed *et, sp_name *new_name)
store
(
new_name
->
m_name
.
str
,
new_name
->
m_name
.
length
,
system_charset_info
);
store
(
new_name
->
m_name
.
str
,
new_name
->
m_name
.
length
,
system_charset_info
);
}
}
if
((
ret
=
table
->
file
->
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
if
((
ret
=
table
->
file
->
ha_
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
{
{
my_error
(
ER_EVENT_STORE_FAILED
,
MYF
(
0
),
et
->
name
.
str
,
ret
);
my_error
(
ER_EVENT_STORE_FAILED
,
MYF
(
0
),
et
->
name
.
str
,
ret
);
goto
err
;
goto
err
;
...
@@ -853,7 +853,7 @@ evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
...
@@ -853,7 +853,7 @@ evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
if
(
!
(
ret
=
evex_db_find_event_aux
(
thd
,
et
->
dbname
,
et
->
name
,
table
)))
if
(
!
(
ret
=
evex_db_find_event_aux
(
thd
,
et
->
dbname
,
et
->
name
,
table
)))
{
{
if
((
ret
=
table
->
file
->
delete_row
(
table
->
record
[
0
])))
if
((
ret
=
table
->
file
->
ha_
delete_row
(
table
->
record
[
0
])))
{
{
my_error
(
ER_EVENT_CANNOT_DELETE
,
MYF
(
0
));
my_error
(
ER_EVENT_CANNOT_DELETE
,
MYF
(
0
));
goto
done
;
goto
done
;
...
...
sql/event_timed.cc
View file @
c326d965
...
@@ -737,7 +737,7 @@ event_timed::drop(THD *thd)
...
@@ -737,7 +737,7 @@ event_timed::drop(THD *thd)
if
(
evex_db_find_event_aux
(
thd
,
dbname
,
name
,
table
))
if
(
evex_db_find_event_aux
(
thd
,
dbname
,
name
,
table
))
DBUG_RETURN
(
-
2
);
DBUG_RETURN
(
-
2
);
if
((
ret
=
table
->
file
->
delete_row
(
table
->
record
[
0
])))
if
((
ret
=
table
->
file
->
ha_
delete_row
(
table
->
record
[
0
])))
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
...
@@ -790,7 +790,7 @@ event_timed::update_fields(THD *thd)
...
@@ -790,7 +790,7 @@ event_timed::update_fields(THD *thd)
status_changed
=
false
;
status_changed
=
false
;
}
}
if
((
table
->
file
->
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
if
((
table
->
file
->
ha_
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
ret
=
EVEX_WRITE_ROW_FAILED
;
ret
=
EVEX_WRITE_ROW_FAILED
;
done:
done:
...
...
sql/share/errmsg.txt
View file @
c326d965
...
@@ -5747,3 +5747,35 @@ ER_BINLOG_ROW_WRONG_TABLE_DEF
...
@@ -5747,3 +5747,35 @@ ER_BINLOG_ROW_WRONG_TABLE_DEF
eng "Table definition on master and slave does not match"
eng "Table definition on master and slave does not match"
ER_BINLOG_ROW_RBR_TO_SBR
ER_BINLOG_ROW_RBR_TO_SBR
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
ER_EVENT_ALREADY_EXISTS
eng "Event '%-.64s' already exists"
ER_EVENT_STORE_FAILED
eng "Failed to store event %s. Error code %d from storage engine."
ER_EVENT_DOES_NOT_EXIST
eng "Unknown event '%-.64s'"
ER_EVENT_CANT_ALTER
eng "Failed to alter event '%-.64s'"
ER_EVENT_DROP_FAILED
eng "Failed to drop %s"
ER_EVENT_INTERVAL_NOT_POSITIVE
eng "INTERVAL must be positive"
ER_EVENT_ENDS_BEFORE_STARTS
eng "ENDS must be after STARTS"
ER_EVENT_EXEC_TIME_IN_THE_PAST
eng "Activation (AT) time is in the past"
ER_EVENT_OPEN_TABLE_FAILED
eng "Failed to open mysql.event"
ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
eng "No datetime expression provided"
ER_EVENT_COL_COUNT_DOESNT_MATCH
eng "Column count of %s.%s is wrong. Table probably corrupted"
ER_EVENT_CANNOT_LOAD_FROM_TABLE
eng "Cannot load from mysql.event. Table probably corrupted"
ER_EVENT_CANNOT_DELETE
eng "Failed to delete the event from mysql.event"
ER_EVENT_COMPILE_ERROR
eng "Error during compilation of event's body"
ER_EVENT_SAME_NAME
eng "Same old and new event name"
ER_EVENT_DATA_TOO_LONG
eng "Data for column '%s' too long"
sql/sql_yacc.yy
View file @
c326d965
...
@@ -1404,6 +1404,93 @@ create:
...
@@ -1404,6 +1404,93 @@ create:
lex->alter_tablespace_info->ts_cmd_type= CREATE_TABLESPACE;
lex->alter_tablespace_info->ts_cmd_type= CREATE_TABLESPACE;
}
}
;
;
ev_schedule_time: EVERY_SYM expr interval
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
{
switch (lex->et->init_interval(YYTHD , $2, $3)) {
case EVEX_PARSE_ERROR:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
break;
case EVEX_BAD_PARAMS:
my_error(ER_EVENT_INTERVAL_NOT_POSITIVE, MYF(0));
YYABORT;
break;
}
}
}
ev_starts
ev_ends
| AT_SYM expr
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
{
switch (lex->et->init_execute_at(YYTHD, $2)) {
case EVEX_PARSE_ERROR:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
break;
case EVEX_BAD_PARAMS:
my_error(ER_EVENT_EXEC_TIME_IN_THE_PAST, MYF(0));
YYABORT;
break;
}
}
}
;
ev_status: /* empty */ {$<ulong_num>$= 0;}
| ENABLED_SYM
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
lex->et->status= MYSQL_EVENT_ENABLED;
$<ulong_num>$= 1;
}
| DISABLED_SYM
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
lex->et->status= MYSQL_EVENT_DISABLED;
$<ulong_num>$= 1;
}
;
ev_starts: /* empty */
| STARTS_SYM expr
{
LEX *lex= Lex;
if (!lex->et_compile_phase)
lex->et->init_starts(YYTHD, $2);
}
;
ev_ends: /* empty */
| ENDS_SYM expr
{
LEX *lex= Lex;
if (!lex->et_compile_phase)
{
switch (lex->et->init_ends(YYTHD, $2)) {
case EVEX_PARSE_ERROR:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
break;
case EVEX_BAD_PARAMS:
my_error(ER_EVENT_ENDS_BEFORE_STARTS, MYF(0));
YYABORT;
break;
}
}
}
;
ev_on_completion: /* empty */ {$<ulong_num>$= 0;}
ev_on_completion: /* empty */ {$<ulong_num>$= 0;}
| ON COMPLETION_SYM PRESERVE_SYM
| ON COMPLETION_SYM PRESERVE_SYM
{
{
...
@@ -1420,6 +1507,7 @@ ev_on_completion: /* empty */ {$<ulong_num>$= 0;}
...
@@ -1420,6 +1507,7 @@ ev_on_completion: /* empty */ {$<ulong_num>$= 0;}
$<ulong_num>$= 1;
$<ulong_num>$= 1;
}
}
;
;
ev_comment: /* empty */ {$<ulong_num>$= 0;}
ev_comment: /* empty */ {$<ulong_num>$= 0;}
| COMMENT_SYM TEXT_STRING_sys
| COMMENT_SYM TEXT_STRING_sys
{
{
...
@@ -1502,6 +1590,7 @@ ev_sql_stmt_inner:
...
@@ -1502,6 +1590,7 @@ ev_sql_stmt_inner:
| sp_proc_stmt_close
| sp_proc_stmt_close
;
;
clear_privileges:
clear_privileges:
/* Nothing */
/* Nothing */
{
{
...
@@ -4603,7 +4692,6 @@ alter:
...
@@ -4603,7 +4692,6 @@ alter:
Recursive events are not possible because recursive SPs
Recursive events are not possible because recursive SPs
are not also possible. lex->sp_head is not stacked.
are not also possible. lex->sp_head is not stacked.
*/
*/
// ToDo Andrey : Change the error message
my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "EVENT");
my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "EVENT");
YYABORT;
YYABORT;
}
}
...
@@ -4672,6 +4760,7 @@ alter:
...
@@ -4672,6 +4760,7 @@ alter:
}
}
;
;
ev_on_schedule: /* empty */ { $<ulong_num>$= 0;}
ev_on_schedule: /* empty */ { $<ulong_num>$= 0;}
| ON SCHEDULE_SYM ev_schedule_time
| ON SCHEDULE_SYM ev_schedule_time
{
{
...
@@ -4688,6 +4777,13 @@ ev_rename_to: /* empty */ { $<ulong_num>$= 0;}
...
@@ -4688,6 +4777,13 @@ ev_rename_to: /* empty */ { $<ulong_num>$= 0;}
$<ulong_num>$= 1;
$<ulong_num>$= 1;
}
}
;
;
ev_opt_sql_stmt: /* empty*/ { $<ulong_num>$= 0;}
| DO_SYM ev_sql_stmt
{
$<ulong_num>$= 1;
}
;
ident_or_empty:
ident_or_empty:
...
@@ -8106,8 +8202,8 @@ show_param:
...
@@ -8106,8 +8202,8 @@ show_param:
{
{
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
Lex->spname= $3;
Lex->spname= $3;
}
;
}
;
;
show_engine_param:
show_engine_param:
STATUS_SYM
STATUS_SYM
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment