Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
Fixed some memory leaks
configure.in:
Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
mysql-test/t/disabled.def:
Disabled ndb_load, as it is in 5.0
(Fails randomly in binlog_close_connection())
mysql-test/t/log_tables.test:
Update error numbers
mysql-test/t/ndb_config.test:
Moved test depending on SHM to ndb_config2.test
mysql-test/t/ndb_partition_error.test:
Update error numbers
sql/event_timed.cc:
Removed not needed line
sql/ha_berkeley.cc:
Fixed compiler warning
sql/ha_heap.cc:
Fixed compiler warning
sql/ha_innodb.cc:
Fixed compiler warning
sql/ha_myisam.cc:
Fixed compiler warning
sql/ha_myisammrg.cc:
Fixed compiler warning
sql/ha_ndbcluster.cc:
Fixed compiler warning
sql/ha_partition.cc:
Fixed compiler warning
sql/mysql_priv.h:
After merge fix
sql/mysqld.cc:
Fixed memory leak in skip_grant.test
sql/share/errmsg.txt:
Removed wrong error messages
sql/sql_lex.cc:
More debugging
Faster lex_end()
sql/sql_partition.cc:
Fixed memory leak
sql/sql_view.cc:
Fixed memory leak
mysql-test/r/ndb_config2.result:
New BitKeeper file ``mysql-test/r/ndb_config2.result''
mysql-test/t/ndb_config2.test:
New BitKeeper file ``mysql-test/t/ndb_config2.test''
supplied inside a /*!VERSION event-text */ segment. (Fixes Bug#18078
mysql-test/t/disabled.def:
Enabling 'mysqldump' test because events should load normally now.
mysql-test/t/mysqldump.test:
Add spaces and tabs to the end of statements, to prove trimming of
whitespace.
sql/event_timed.cc:
Remove */ close-comment characters at the end, just as sp_head does.
The parser should be smarter about not giving us text that jumps semantic
levels, but that's an issue for another day.
sql/event_timed.cc:
- fix 100% cpu usage problem. If time_now==last_exec then don't schedule
the event for time_now but increase the multiplier
- if time_now is between STARTS and ENDS (the latter is set) or after STARTS
(ENDS is not set) and there was no previous execution (imagine disabled
scheduler being started) then don't schedule for time_now but for STARTS
and then get_next_time() will find the correct time.
mysql-test/r/events.result:
Auto merged
sql/event.cc:
Auto merged
sql/event_timed.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_show.cc:
Auto merged
This also should fix 17493 and 17346, and probably 16397 (not tested).
WL#1034 (Internal CRON)
(post-review commit)
mysql-test/r/events.result:
update result
mysql-test/t/events.test:
update test
sql/event.cc:
seems we get a crash if we compile it this way. better let the worker thread do it,
this increases the stability.
sql/event_executor.cc:
kick in more often
sql/event_timed.cc:
- don't NULLify last_executed
- implement (fix) better get_next_time() which does not use last_executed as basis
but STARTS. STARTS is used as basis and the next point of time which is before ENDS,
if set, is being found. The point > now and (point-starts) % interval_expression == 0.
sql/item_timefunc.cc:
move calc_time_diff to time.cc as it can be reused in other parts of the
server code (see event_timed.cc)
sql/mysql_priv.h:
export calc_time_diff() moved to time.cc from item_timefunc.cc
sql/sql_show.cc:
- fix presenting of LAST_EXECUTED
- cleanup a bit
sql/time.cc:
- move calc_time_diff() from item_timefunc.cc to here
into calliope.local:/Users/cmiller/work/src/mysql-5.1-new__cleanup_mysqldump
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/event_timed.cc:
Auto merged
the '-E' or '--events' flag. (Closes Bug#16853 and Bug#17714.)
WARNING:
At present, these tests fail due to b*g number 18078.
client/mysqldump.c:
Added code to dump events, when asked to do so via the --events parameter.
Also cleaned up some surrounding code.
mysql-test/r/mysqldump.result:
Added a test to create an event, dump it, restore it, add more events, dump
all of them, and restore all of them.
mysql-test/t/mysqldump.test:
Added a test to create an event, dump it, restore it, add more events, dump
all of them, and restore all of them.
sql/event_timed.cc:
No longer qualify SHOW CREATE EVENT names with the database name.
BitKeeper/etc/ignore:
Removing accidentally 'ignored' bogus file entry.
WL#1034 (Internal CRON)
timestamps does not support > y2038
mysql-test/r/events_bugs.result:
update results
mysql-test/t/events_bugs.test:
add tests
sql/event_timed.cc:
fix for bug #16396: Events: Distant-future dates become past dates.
WL#1034
mysql-test/t/events_logs_tests-master.opt:
Rename: mysql-test/t/events_slow_query-master.opt -> mysql-test/t/events_logs_tests-master.opt
sql/event_timed.cc:
ask the anonymous SP to log general statements
sql/sp_head.cc:
save the OPTION_LOG_OFF and restore it after execution
sql/sp_head.h:
add a new flag for general log
mysql-test/r/events_logs_tests.result:
update result file
mysql-test/t/events_logs_tests.test:
add test for general log
Events: Event-caused statements don't appear in the slow query log
WL#1034
sql/event_executor.cc:
enable slow logging
sql/event_timed.cc:
enable slow logging for the anonymous SP
sql/sp_head.cc:
allow thd->enable_slow_log to be TRUE if only
m_flags & sp_head::LOG_SLOW_STATEMENTS
Because usually enable_slow_log is 1 in user mode, this second
check is needed backup the mode otherwise.
sql/sp_head.h:
add a new constant for slow queries. SP by default does not log slow queries in the
body just the whole CALL could be considered as slow if taking too much time and
called directly from the user
sql/sql_parse.cc:
let us see in the the trace log
Error: Freeing unallocated data at line 900, 'sql_db.cc'
(
DROP DATABASE frees thd->db for everything but thd->slave_thread=1
however we are not slave thread and more bugs could appear if we
pretend to be, then we will be good boys and just strdup the value.
If not DROP DATABASE then THD::~THD() will free the value.
)
sql/event_timed.cc:
fix problem
Error: Freeing unallocated data at line 900, 'sql_db.cc'
(
DROP DATABASE frees thd->db for everything but thd->slave_thread=1
however we are not slave thread and more bugs could appear if we
pretend to be, then we will be good boys and just strdup the value.
If not DROP DATABASE then THD::~THD() will free the value.
)
- fix also a bad message
the warnings came from MSFT compiler (output of pushbuild)
sql/event.cc:
fix compiler warnings: precision loses, unused vars
sql/event_executor.cc:
fix compiler warnings: precision loses, unused vars
sql/event_timed.cc:
fix compiler warnings: precision loses, unused vars
fix for bug#17793 (Scheduler uses class event_timed should be Event_timed)
sql/event.cc:
class event_timed -> Event_timed
sql/event.h:
class event_timed -> Event_timed
sql/event_executor.cc:
class event_timed -> Event_timed
sql/event_priv.h:
class event_timed -> Event_timed
sql/event_timed.cc:
class event_timed -> Event_timed
sql/sql_lex.h:
class event_timed -> Event_timed
sql/sql_show.cc:
class event_timed -> Event_timed
sql/sql_yacc.yy:
class event_timed -> Event_timed
(post-review pre-push changes)
coding style (mostly trailing spaces removed)
mysql-test/r/events.result:
fix result file
sql/event.cc:
- remove trailing spaces
- add a missing initializer (gcc warning)
- C++ to C comments
sql/event_executor.cc:
- fix coding style (C++ to C comments, remove trailing spaces)
- fix wrong indexing buggie not found till now (queue indexing is 0 based,
not 1 based)
sql/event_timed.cc:
- fix coding style
mysql-test/r/events.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/event.cc:
Auto merged
sql/event.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
- now when the event is created and STARTS is omitted then STARTS is implicitly
CURRENT_TIMESTAMP
- This CS also fixed incorrect presentation of STARTS/ENDS in I_S.EVENTS
(incorporated review changes)
mysql-test/r/events.result:
results of new test cases
mysql-test/t/events.test:
new test cases for bug #16537 (Events: mysql.event.starts is null)
sql/event.cc:
- check whether event_timed::starts_null only in case
event_timed::expression is set, so for recurring events only
- disable binlogging of CREATE EVENT statement. It should not be
replicated but the result of the execution. Still the replication is
untouched topic.
sql/event.h:
- add flags whether starts, ends and execute_at are null or not
sql/event_executor.cc:
- check whether xxx_null instead of !xxxx.year
sql/event_timed.cc:
- introduce xxx_null and change the usage of xxx.year to !xxx_null
sql/sql_show.cc:
- don't show 0000-00-00 in I_S.EVENTS when the value is NULL
sql/sql_yacc.yy:
- if STARTS is omitted default to current_timestamp
mysql-test/r/events.result:
Auto merged
sql/event.cc:
Auto merged
sql/event.h:
Auto merged
sql/event_executor.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/event_timed.cc:
manual merge
post-review fixes
mysql-test/r/events_bugs.result:
fix result
sql/event.cc:
fix compilation problem on windows
sql/event_executor.cc:
show the right host in show processlist (should be event_scheduler@localhost)
sql/event_timed.cc:
a bit more debug infor
fix a problem introduced with previous push :( . clean everything that's whitespace.
found because of new test cases which were crashing.
sql/sql_show.cc:
fix compile problem on windows
WL#1032
sql_mode setting was disregarded during create/alter event and wasn't set during
event execution.
(post-review small fixes)
sql/event.cc:
store the sql_mode when the body is stored
- always on create event
- during alter event if the user changes the body
sql/event.h:
add sql_mode as member variable
sql/event_timed.cc:
- exchange thd->variables.sql_mode before and after execution
- set the sql_mode of the anonymous SP -> event_timed::sphead
sql/sql_show.cc:
- show real content in I_S.EVENTS.SQL_MODE , disallow NULL
WL#1034
mysql-test/r/events.result:
output fix
sql/event.cc:
- handle also INTERVAL_MICROSECOND, was missing.
- use renamed ER_ code which is generic
sql/event.h:
add new error code
sql/event_executor.cc:
- use new ER_ code name
- handle EVEX_MICROSECOND_UNSUP error code
sql/event_timed.cc:
forbid MICROSECOND intervals for events
sql/share/errmsg.txt:
rename error code, it's generic
sql/sql_show.cc:
use new error code name
sql/sql_yacc.yy:
bail out if any MICROSECOND interval is specified
this problem affects only debug builds
mysql-test/r/events.result:
update results
mysql-test/t/events.test:
tests for bug#17543 Creating Event crash the server
sql/event_timed.cc:
the delimiter between DO and the body could be not only a space
but any other recognized white space, so use proper macro.
| INTERVAL_VALUE | INTERVAL_FIELD |
| 20 | 20 MINUTE |
the second one should be without the value
mysql-test/r/events.result:
update test result to be as they should be
sql/event_timed.cc:
manually append the name of the interval because it's no more appended
by reconstruct_value
(pre-push)
mysql-test/r/events.result:
update result
mysql-test/t/events.test:
few more tests
sql/event.cc:
fix compilation failure after big merge
sql/event.h:
initialize s_ctx to be the context to be used.
don't use sphead->m_security_ctx but we will copy
the initted ctx to there
sql/event_timed.cc:
-initialize s_ctx to be the context to be used.
don't use sphead->m_security_ctx but we will copy
the initted ctx to there
- first init the context
- then compile the event
- and then copy the context
- don't use mysql_change_db() for now change_security_context() gets the
right context info
WL#1034
- This changeset also changes the executor so its quite more stable now.
Stressing test case added that executes ~800 events per second and dropping
hundreds of events at once using DROP DATABASE.
(with fixes after review of JimW)
(with fixes after review of Serg)
mysql-test/r/events.result:
update results after TRIGGER_ACL was added
mysql-test/t/events.test:
-redundant line
sql/event.cc:
Implemented evex_db_drop_events() which drops all events
from a specific database. Needed for SQLCOM_DROP_DATABASE
sql/event.h:
- protect the event better (see the changes to event_executor.cc
and event.cc). An event object could be used in a spawned thread
before it's executed but till now the object is marked as being
executed when the anonymous sp_head is executed. However, there are
timeframes before and after that during which the event is not marked
as executed and other thread may delete the object -> so we end with
a nirvana pointer.
sql/event_executor.cc:
- extract some of the code executed in the main thread to a function. Too long
functions are bad for the overview.
- prepend all information/error messages to the console with "SCHEDULER:" for
better overview, and easied searching in the log tables.
sql/event_priv.h:
- change the name, of evex_db_find_event_by_name() and don't
used C++ features like function overloading
- define consts for result returned from event_timed::spawn_now()
sql/event_timed.cc:
- add few methods related to event execution.
now the event spawns the worker thread and
passes itself as parameter. This way it locks itself for exectution
first and then spawning -> no race condition. When the worker thread
has finished working with the reference it calls back
event_timed::spawn_thread_finish() to unlock itself.
sql/sql_db.cc:
- call evex_drop_db_events() on DROP DATABASE
sql/event.cc:
- make this not unsigned. gcc complains
sql/event_timed.cc:
acl_getroot_no_password() is not there in libmysqld, disable it's usage
in this case.
sql/set_var.cc:
fix for the broken build of Serg. gcc seems to be pretty happy without
the return and returns the value of the last statement
into lmy004.:/work/mysql-5.1-bug17289
mysql-test/r/events.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/event.h:
Auto merged
sql/event_executor.cc:
Auto merged
sql/event_timed.cc:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/event.h:
Auto merged
sql/event_executor.cc:
Auto merged
sql/event_timed.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
- fix for bug#16423 (Events: SHOW CREATE EVENT doesn't work)
- this Changeset commits makes CREATE/UPDATE/DELETE EVENT real DDL statements
by committing the currently open transaction before they are executed.
- this Changeset also fixes a trailing space problem since the very early days
of the internal cron
- adds sophisticated checking of whether mysql.event was tampered accidentally
or with purpose by an user.
- adds a lot of inline function documentation - documents everything left
uncodumented
- INTERVAL_XXXX to XXX in I_S.EVENTS.INTERVAL_FIELD
WL#1034 (Internal CRON)
mysql-test/r/events.result:
update result
mysql-test/t/events.test:
add test cases for SHOW CREATE EVENT
add test cases where the structure of mysql.event is changed and error reporting in this case
sql/event.cc:
- do a lot more checking on mysql.event whether it's valid
introduced generic function table_check_intact() which can be used also
for checking whether a system table (mysql.*) has been tampered by user
and report an error in this case. The checking is quite strict, thus
maybe some mechanism can be added later that loosens this like some
session variable, for instance, i_am_aware_that_i_can_damage_my_data
so the table will be opened nevertheless we think that it's not valid.
- add evex_show_create_event(THD *thd, sp_name *spn, LEX_STRING definer)
- document a loooot. not a single function left undocumented.
sql/event.h:
- add evex_show_create_event(THD *thd, sp_name *spn, LEX_STRING definer)
- change get_show_create_event() to get_create_event()
- add TABLE_FIELD_W_TYPE used by table_check_intact()
- add event_timed::sql_mode so it can be used by show create event. currently
always 0, will be fixed by a patch for another bug. At least makes the code
of show create event complete.
sql/event_executor.cc:
- add evex_check_system_tables() that checks on boot and event
main thread startup that mysql.db and mysql.user tables are correct.
- document everything!
sql/event_priv.h:
remove a line
sql/event_timed.cc:
- implement SHOW CREATE EVENT
- document undocumented functions!
sql/share/errmsg.txt:
- fix an error message and add two new
sql/sql_acl.cc:
- add mysql.db table definition to use by table_check_intact()
- exchange some of the positions by numbers from mysql.db to enum names (see sql_acl.h)
sql/sql_acl.h:
- define the structure of mysql.db table
sql/sql_parse.cc:
- handle SQLCOM_SHOW_CREATE_EVENT
- end the current transaction becase CREATE/UPDATE/DELETE EVENT is a DDL
statement
sql/sql_show.cc:
- remove interval_type_to_name
- use common function event_reconstruct_interval_expression()
that reconstructs the expression given at create/alter, to some
extent - interval of 2:62 MINUTE_SECOND will be reconstructed as
interval of 3:02 MINUTE_SECOND!
sql/sql_yacc.yy:
init the definer of event_timed also when doing SHOW CREATE EVENT
because it's needed for checking into mysql.event
sql/table.cc:
- remove stale code. only mysql.event should be a 'system_table'
- add table_check_intact() to check the consistency of a table.
mostly usable with mysql.xxx tables.
sql/table.h:
- export TABLE_FIELD_W_TYPE and table_check_intact() which are used for
checking the structure of a table. mostly usable for mysql.xxx tables.
Events were executed with all privileges possible on planet Earth :(
WL#1034
mysql-test/r/events.result:
update test results
mysql-test/t/events.test:
test for bug#17289 Events: missing privilege check for drop database
sql/event.h:
-add two new methods to event_timed to change and restore
the security context
sql/event_executor.cc:
- move code regarding privilieges checking to event_timed::execute()
- add a new function evex_print_warnings() which prints the notes/warnings/errors
to the console (easily capturable with logs-into-tables) so one can see what
has happened if there was an error of some sort!
sql/event_timed.cc:
- fix documentation
- add a new error code -99, EVENT was revoked from the user on the DB
- set_sec_ctx, execute, restore_sex_ctx
sql/sql_error.cc:
- make warning_level_names public to be used in event_executor.cc
- change from 2 arrays to a LEX_STRING array
WL#1034 (Internal CRON)
(with post-review fix)
mysql-test/r/events.result:
update the result
mysql-test/t/events.test:
use --sleep instead of select sleep()
enable some scheduler related tests. They were disabled because of a hang that
happened. The hang is fixed with this bugfix.
sql/event.cc:
- evex_remove_from_cache reports back whether the in_memory
object was deleted or was scheduled. In case scheduling then
don't delete it from outside but let it do it itself
- move out db interaction code out of evex_drop_event to db_drop_event
so it can be called from outter space :)
sql/event_priv.h:
- export the new function db_drop_event()
sql/event_timed.cc:
- use db_drop_event() and don't implement the dropping ourselves
sql/sql_parse.cc:
- some debug info about the status code returned.
into mysql.com:/usr/local/mysql/x/mysql-5.1-new
VC++Files/sql/mysqld.vcproj:
Auto merged
sql/event.h:
Auto merged
sql/event_executor.cc:
Auto merged
sql/event_timed.cc:
Auto merged
sql/handler.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
VC++Files/client/mysqldump.vcproj:
Manual merge.
WL#1034 (Internal CRON)
mysql-test/r/events.result:
fix result of t/events (post-merge fix of bug #16642)
mysql-test/r/system_mysql_db.result:
fix result(post-merge fix of bug #16642)
mysql-test/t/events.test:
fix test, use --echo instead of select, fix failing create event statement
sql/event_timed.cc:
add a bit more debug information
mysql-test/lib/init_db.sql:
Auto merged
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/event.cc:
Auto merged
sql/event.h:
Auto merged
sql/event_executor.cc:
Auto merged
sql/event_priv.h:
Auto merged
sql/event_timed.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/events.result:
manual merge
mysql-test/r/system_mysql_db.result:
manual merge
mysql-test/t/events.test:
manual merge
post-review change - use pointer instead of copy on the stack.
WL#1034 (Internal CRON)
This patch adds INFORMATION_SCHEMA.EVENTS table with the following format:
EVENT_CATALOG - MYSQL_TYPE_STRING (Always NULL)
EVENT_SCHEMA - MYSQL_TYPE_STRING (the database)
EVENT_NAME - MYSQL_TYPE_STRING (the name)
DEFINER - MYSQL_TYPE_STRING (user@host)
EVENT_BODY - MYSQL_TYPE_STRING (the body from mysql.event)
EVENT_TYPE - MYSQL_TYPE_STRING ("ONE TIME" | "RECURRING")
EXECUTE_AT - MYSQL_TYPE_TIMESTAMP (set for "ONE TIME" otherwise NULL)
INTERVAL_VALUE - MYSQL_TYPE_LONG (set for RECURRING otherwise NULL)
INTERVAL_FIELD - MYSQL_TYPE_STRING (set for RECURRING otherwise NULL)
SQL_MODE - MYSQL_TYPE_STRING (for now NULL)
STARTS - MYSQL_TYPE_TIMESTAMP (starts from mysql.event)
ENDS - MYSQL_TYPE_TIMESTAMP (ends from mysql.event)
STATUS - MYSQL_TYPE_STRING (ENABLED | DISABLED)
ON_COMPLETION - MYSQL_TYPE_STRING (NOT PRESERVE | PRESERVE)
CREATED - MYSQL_TYPE_TIMESTAMP
LAST_ALTERED - MYSQL_TYPE_TIMESTAMP
LAST_EXECUTED - MYSQL_TYPE_TIMESTAMP
EVENT_COMMENT - MYSQL_TYPE_STRING
SQL_MODE is NULL for now, because the value is still not stored in mysql.event .
Support will be added as a fix for another bug.
This patch also adds SHOW [FULL] EVENTS [FROM db] [LIKE pattern]
1. SHOW EVENTS shows always only the events on the same user,
because the PK of mysql.event is (definer, db, name) several
users may have event with the same name -> no information disclosure.
2. SHOW FULL EVENTS - shows the events (in the current db as SHOW EVENTS)
of all users. The user has to have PROCESS privilege, if not then
SHOW FULL EVENTS behave like SHOW EVENTS.
3. If [FROM db] is specified then this db is considered.
4. Event names can be filtered with LIKE pattern.
SHOW EVENTS returns table with the following columns, which are subset of
the data which is returned by SELECT * FROM I_S.EVENTS
Db
Name
Definer
Type
Execute at
Interval value
Interval field
Starts
Ends
Status
mysql-test/lib/init_db.sql:
change the PK - (definer, db, name)
quicker searches when SHOW EVENTS;
allow also different users to have events with the same name ->
no information disclosure
mysql-test/r/events.result:
result of new tests
mysql-test/r/information_schema.result:
result of new tests
mysql-test/r/information_schema_db.result:
result of new tests
mysql-test/r/system_mysql_db.result:
result of new tests
mysql-test/t/events.test:
new tests for information_schema.events
scripts/mysql_create_system_tables.sh:
change the PK of mysql.event to (definer, db, name)
scripts/mysql_fix_privilege_tables.sql:
change the PK of mysql.event to (definer, db, name)
sql/event.cc:
pass around the definer of the event because of the new PK
which is (definer, db, name). It's needed for index searching.
sql/event.h:
- make enum evex_table_field again public so it can be used
in sql_show.cc
- make created and modified ulonglong, because they should be such
- make public evex_open_event_table so it can be used in sql_show.cc
sql/event_executor.cc:
- cosmetics
sql/event_priv.h:
- moved enum evex_table_field and evex_open_event_table()
to event.h (made them therefore public)
sql/event_timed.cc:
- in event_timed::init_definer() always fill this.definer with
the concatenated value of definer_user@definer_host. Makes
later the work easier.
- pass around the definer wherever is needed for searching
(new prototype of evex_db_find_evex_aux)
sql/mysqld.cc:
- add counter for SHOW EVENTS
sql/sql_lex.h:
- register SHOW EVENTS as command
sql/sql_parse.cc:
- handle SCH_EVENTS (I_S.EVENTS like SCH_TRIGGERS)
- make additional check in case of SHOW EVENTS (check for EVENT on
the current database. if it is null check_access() gives appropriate
message back.
sql/sql_show.cc:
- add INFORMATION_SCHEMA.EVENTS and SHOW EVENTS
- I_S.EVENTS.SQL_MODE is NULL for now -> not implemented. Trudy
asked to be added so bug #16642 can be completely closed. There
is another bug report which will fix the lack of storage of
SQL_MODE during event creation.
sql/sql_yacc.yy:
- always call event_timed::init_definer() when CREATE/ALTER/DROP
EVENT but not when just compiling the body of the event because
in this case this operation is not needed, it takes memory and
CPU time and at the end the result is not used. event_timed::definer
is used only on SQLCOM_CREATE/ALTER/DROP_EVENT execution not on
statement compilation.
- add SHOW [FULL] EVENTS [FROM db] [LIKE pattern]
in case of FULL and the user has PROCESS privilege then he will see
also others' events in the current database, otherwise the output
is the same as of SHOW EVENTS. Because the events are per DB only
the events from the current database are shown. pattern is applied
against event name. FROM db is self explanatory.
sql/table.h:
add SCH_EVENTS as part of INFORMATION_SCHEMA
VC++Files/client/mysqldump.vcproj:
Add missing source file.
VC++Files/mysql.sln:
Fix configuration mismatch.
VC++Files/sql/mysqld.vcproj:
Enable row-based replication.
Add missing source files.
scripts/make_win_src_distribution.sh:
Add copying of missing directory.
sql/event.h:
Fix type conflict only visible on Windows.
sql/event_executor.cc:
Fix non-portable thread stuff.
sql/event_timed.cc:
Fix type conflict only visible on Windows.
sql/ha_archive.cc:
Add cast needed for Windows.
sql/handler.h:
Fix Windows byte * <-> char * mismatch.
sql/opt_range.cc:
Fix Windows byte * <-> char * mismatch.
sql/set_var.cc:
BUG#16811
Fix Windows compilation by making the cast-away of volatile implicit
(Windows linker does not like volatile <-> non-volatile mismatch, in
contrast to Unix)
sql/sql_partition.cc:
Fix Windows byte * <-> char * mismatch.