WL #1034 (Internal CRON)
mysql-test/r/events.result:
fix the results
mysql-test/t/disabled.def:
make it enabled
mysql-test/t/events.test:
- comment out some tests (having problems now)
- add test for fix for bug#16548
sql/sql_yacc.yy:
- fix for bug#16548 (Events: can't alter clause for preserve)
- prefix optional non-terminals with opt_
- add a bit more debug messages
- disable events.test for now due to a bug
mysql-test/r/events.result:
fix result
mysql-test/t/disabled.def:
make it disabled
mysql-test/t/events.test:
disable show processlist
sql/event_executor.cc:
a bit more debug messages
- various fixes of test cases
(hopefully the last pre-push update before the push)
mysql-test/include/system_db_struct.inc:
extend test case to include testing for event system table
mysql-test/r/events.result:
results of events test
mysql-test/r/system_mysql_db.result:
more testing - add structure of event system table
mysql-test/t/events.test:
test case for events (internal CRON)
mysql-test/t/system_mysql_db_fix.test:
drop event table and leave the test database empty
scripts/mysql_create_system_tables.sh:
add missing create table statement
scripts/mysql_fix_privilege_tables.sql:
don't specify the database. this fixes a failing test case which creates the
tables not on mysql but on a test database and then tests again mysql.
sql/event_executor.cc:
if asked to stop -> stop.
- fixed test results
- fixed bug caught by information_schema.test . Bison temporal
variables are very nice but extremely error-prone (Count one more
time just to be sure).
mysql-test/r/connect.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/events.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/grant.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/information_schema.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/lowercase_table_grant.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/ps.result:
fix result for WL#1034 (internal CRON)
mysql-test/r/system_mysql_db.result:
fix result for WL#1034 (internal CRON)
mysql-test/t/events.test:
fix result for WL#1034 (internal CRON)
sql/sql_yacc.yy:
- fix bug introduced by me when making usage of temporal
bison variables. COUNT 7 times then write!
- fix EVENT_ACL problem that GRANT ALL on some_db.* to someone@somewhere did not get to mysql.db
- fix crash when the following is executed :
CREATE EVENT P() CREATE EVENT E ON SCHEDULER 1 SECOND DO ROLLBACK;
(creation works as well as calling P() which creates the event).
mysql-test/lib/init_db.sql:
- fix init_db.sql so add Event_priv to the database privs, many tests failed because of that
ommision
- remove the quotes from the column names
mysql-test/t/events.test:
- fix the small test, don't create own db
scripts/mysql_fix_privilege_tables.sql:
- fix that
sql/event.cc:
- be defensive and don't crash if outside has already has opened some table
sql/event_executor.cc:
- show in SHOW PROCESSLIST - "event_scheduler" as name of the user of the main thread
- use "localhost" as the host where event_scheduler comes from
- comment out some debug info, fix other debug info
sql/event_timed.cc:
- enable EVENT creation inside SP. sphead from lex->sphead goes to et->sphead. it's there only
if we compile the event. OTOH when doing
CREATE PROCEDURE PROC() CREATE EVENT SOME_EV ON SCHEDULE EVERY 1 SECOND DO ROLLBACK;
I have only to get the body of the event which is anonymous SP. Before it being "compiled"
but then freed without being used because a bit later it is compiled one more time before
being put in the events cache. So it was good that the memory structures weren't reused but
scrapped out. Now lex->sphead is not needed during event creation but only where the event's
body starts and where it ends so to be able at later stage to compile this anonymous SP (the
body of the event).
sql/sp_head.cc:
- copy over a fix to a crash
sql/sql_acl.h:
- fix privileges.
There was _NO_ documentation about that. Another CHUNK had to be created to so EVENT_ACL gets shifted to
it's place in the db table. So how this is calculated? EVENT_ACL is 1 << 26. Remember 26, see which poistion
in the db table is EVENT_ACL, it's 17, counted from 0. 26 - 17 = 9, then shift it with 9.
CHUNKS are created because in some cases some privileges are in chunks and they are shifted at once. There are
few chunks of such privileges which has to be shifted to get to exactly the structure of mysql.db table.
sql/sql_parse.cc:
- ok, we don't care anymore about lex->sphead because our sphead is lex->et->sphead
sql/sql_yacc.yy:
- bail out if new event_timed returns 0x0
- enable creation of an event inside a SP
CREATE PROCEDURE P() CREATE EVENT E ON SCHEDULE EVERY 1 SECOND DO SELECT 1;