Commit graph

29 commits

Author SHA1 Message Date
knielsen@mysql.com
56d44ff1f9 Merge mysql.com:/usr/local/mysql/mysql-5.1-win-fixes
into  mysql.com:/usr/local/mysql/x/mysql-5.1-new
2006-01-30 17:57:20 +01:00
andrey@lmy004.
08892be32d post-merge fixes of fix for bug#16642 (No I_S.EVENTS table)
WL#1034 (Internal CRON)
2006-01-30 17:12:30 +01:00
andrey@lmy004.
9d7d8767dd post-commit merge 2006-01-30 14:28:48 +01:00
andrey@lmy004.
d847ac54ca fix for bug#16642 (Events: No INFORMATION_SCHEMA.EVENTS table)
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
2006-01-30 13:15:23 +01:00
knielsen@mysql.com
899fc2653d Windows compile fixes in preparation for 5.1.6 beta. 2006-01-30 13:09:08 +01:00
andrey@lmy004.
8188f77c17 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-bug16434
2006-01-27 01:07:34 +01:00
andrey@lmy004.
8e4578a5db Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-bug16434
2006-01-26 22:10:12 +01:00
andrey@lmy004.
19cd9da7f1 fix for bug#16434 (Events: Illegal dates don't cause errors)
(post-review commit)
WL#1034 (Internal CRON)
2006-01-26 22:01:34 +01:00
andrey@lmy004.
d4321d9b7c fix for bug#16419 (Events: can't use timestamp in the schedule)
WL #1034 (Internal CRON)
2006-01-26 21:21:21 +01:00
andrey@lmy004.
a6494fbe31 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-tt-copy-works
2006-01-23 16:13:46 +01:00
andrey@lmy004.
7740652961 fix for bug#16431 (Events: An event which alters itself disappears)
WL#1034 (Internal CRON)
2006-01-20 22:24:58 +01:00
andrey@lmy004.
0322cb1df8 - fix bug #16435 (Weekly events execute every second) (WL#1034 Internal CRON)
Before the interval expression was considered to be in seconds, now it is
just a number and the type of interval is considered.

- this changeset introduces also fix for bug#16432 (Events: error re interval
  misrepresents the facts)
  the code of event_timed::set_interval() was refactored anyway so it is meaningful to
  fix the bug in the same changeset.
2006-01-18 20:41:22 +01:00
andrey@lmy004.
e385a68fc0 WL #1034 (Internal CRON) post-push update
- fix compile failure on QNX and FreeBSD
2006-01-12 16:51:45 +01:00
andrey@lmy004.
c326d96535 WL #1034 (Internal CRON) pre-push fixes
after another merge fixes.
2006-01-11 12:49:56 +01:00
andrey@lmy004.
fa9f2a773b WL #1034 update
- fix one bug found by PeterG, namely bug #51

#there is a major problem currently after removing the specialised DYNAMIC_ARRAY as 
  storage for the events. I have to reintroduce similar storage, this time probably some
  linked list or maybe some API on top of DYNAMIC_ARRAY.
2005-12-20 14:21:02 +02:00
andrey@lmy004.
67a8172207 WL #1034 update
- handle crashes where the table definition has been changed
  (different number of fields)
2005-12-16 12:42:39 +01:00
andrey@lmy004.
533180d76c WL#1034 update
- 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).
2005-12-15 14:12:28 +01:00
andrey@lmy004.
831569cb2d WL#1034 (update)
- fixed silly bug, the main thread restarted but did not execute events,
  Quite currious why many calls to pthread_mutex_init() do not lead to abort()
2005-12-13 23:10:29 +01:00
andrey@lmy004.
ba79f499e6 WL#1034 update
(cleanups, leaks fixed)
2005-12-13 19:16:00 +01:00
andrey@lmy004.
854d2d4bcd WL#1034 update
cleanup before throwin away DYNAMIC_ARRAY for event storage,
once reallocated I get dangling pointers so that's not good.
solution will be found however ;)
2005-12-13 13:21:11 +01:00
andrey@lmy004.
d94bae3a21 WL#1034 update
QUEUE implementation working now. this should be ready more or less
for testing once the debug output is being cleaned and some things
around DYNAMIC_ARRAY are cleaned
- fix handling in case of errors that lead to crashes, now no more crashes
  in case of table corruption and such.
2005-12-12 21:19:19 +01:00
andrey@lmy004.
56db09cfe6 WL #1034 update
- handle better non-latin1 identifiers
2005-12-08 20:37:54 +01:00
andrey@lmy004.
0797be8aef - last bits of unneeded error checking in sql_parse.cc thrown away
- fix a bug introduced with last commit ALTER EVENT a RENAME TO b; failed
- misc
2005-12-08 15:34:11 +01:00
andrey@lmy004.
3d85464143 WL #1034 updates after review
(strip m_ as prefix from member variables' names)
2005-12-08 00:17:05 +01:00
andrey@lmy004.
b7578df06c WL #1034 updates after review 2005-12-07 22:29:00 +01:00
andrey@lmy004.
bee8598784 WL#1034 ongoing updates after review 2005-12-07 19:26:44 +01:00
andrey@lmy004.
efeb286e78 WL#1034
make more independent of SP
2005-12-06 16:46:29 +01:00
andrey@lmy004.
fcafcff181 WL#1034
updated sources
2005-12-06 16:15:29 +01:00
andrey@lmy004.
7120d43c36 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
2005-12-05 11:45:04 +01:00