Commit graph

31 commits

Author SHA1 Message Date
unknown
31a7a0d646 Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case
mysql-test/r/alter_table.result:
  Update test result
mysql-test/r/analyse.result:
  Update test result
mysql-test/r/archive.result:
  Update test result
mysql-test/r/archive_bitfield.result:
  Update test result
mysql-test/r/archive_gis.result:
  Update test result
mysql-test/r/bdb.result:
  Update test result
mysql-test/r/bdb_gis.result:
  Update test result
mysql-test/r/bigint.result:
  Update test result
mysql-test/r/binary.result:
  Update test result
mysql-test/r/case.result:
  Update test result
mysql-test/r/cast.result:
  Update test result
mysql-test/r/constraints.result:
  Update test result
mysql-test/r/create.result:
  Update test result
mysql-test/r/ctype_collate.result:
  Update test result
mysql-test/r/ctype_create.result:
  Update test result
mysql-test/r/ctype_latin1_de.result:
  Update test result
mysql-test/r/ctype_many.result:
  Update test result
mysql-test/r/ctype_mb.result:
  Update test result
mysql-test/r/ctype_recoding.result:
  Update test result
mysql-test/r/ctype_sjis.result:
  Update test result
mysql-test/r/ctype_tis620.result:
  Update test result
mysql-test/r/ctype_ucs.result:
  Update test result
mysql-test/r/ctype_ujis.result:
  Update test result
mysql-test/r/ctype_utf8.result:
  Update test result
mysql-test/r/default.result:
  Update test result
mysql-test/r/events.result:
  Update test result
mysql-test/r/federated.result:
  Update test result
mysql-test/r/fulltext.result:
  Update test result
mysql-test/r/func_gconcat.result:
  Update test result
mysql-test/r/func_group.result:
  Update test result
mysql-test/r/func_math.result:
  Update test result
mysql-test/r/func_misc.result:
  Update test result
mysql-test/r/func_str.result:
  Update test result
mysql-test/r/func_system.result:
  Update test result
mysql-test/r/gis-rtree.result:
  Update test result
mysql-test/r/heap.result:
  Update test result
mysql-test/r/index_merge_innodb.result:
  Update test result
mysql-test/r/information_schema.result:
  Update test result
mysql-test/r/innodb.result:
  Update test result
mysql-test/r/innodb_gis.result:
  Update test result
mysql-test/r/key.result:
  Update test result
mysql-test/r/merge.result:
  Update test result
mysql-test/r/myisam.result:
  Update test result
mysql-test/r/mysqldump-max.result:
  Update test result
mysql-test/r/mysqldump.result:
  Update test result
mysql-test/r/ndb_bitfield.result:
  Update test result
mysql-test/r/ndb_gis.result:
  Update test result
mysql-test/r/ndb_partition_key.result:
  Update test result
mysql-test/r/null.result:
  Update test result
mysql-test/r/partition.result:
  Update test result
mysql-test/r/partition_02myisam.result:
  Update test result
mysql-test/r/partition_mgm_err.result:
  Update test result
mysql-test/r/partition_range.result:
  Update test result
mysql-test/r/ps_2myisam.result:
  Update test result
mysql-test/r/ps_3innodb.result:
  Update test result
mysql-test/r/ps_4heap.result:
  Update test result
mysql-test/r/ps_5merge.result:
  Update test result
mysql-test/r/ps_6bdb.result:
  Update test result
mysql-test/r/rpl_mixed_ddl_dml.result:
  Update test result
mysql-test/r/rpl_multi_engine.result:
  Update test result
mysql-test/r/rpl_ndb_UUID.result:
  Update test result
mysql-test/r/show_check.result:
  Update test result
mysql-test/r/sp-vars.result:
  Update test result
mysql-test/r/sp.result:
  Update test result
mysql-test/r/sql_mode.result:
  Update test result
mysql-test/r/strict.result:
  Update test result
mysql-test/r/subselect.result:
  Update test result
mysql-test/r/symlink.result:
  Update test result
mysql-test/r/synchronization.result:
  Update test result
mysql-test/r/system_mysql_db.result:
  Update test result
mysql-test/r/temp_table.result:
  Update test result
mysql-test/r/trigger.result:
  Update test result
mysql-test/r/type_binary.result:
  Update test result
mysql-test/r/type_bit.result:
  Update test result
mysql-test/r/type_bit_innodb.result:
  Update test result
mysql-test/r/type_blob.result:
  Update test result
mysql-test/r/type_decimal.result:
  Update test result
mysql-test/r/type_enum.result:
  Update test result
mysql-test/r/type_float.result:
  Update test result
mysql-test/r/type_nchar.result:
  Update test result
mysql-test/r/type_newdecimal.result:
  Update test result
mysql-test/r/type_set.result:
  Update test result
mysql-test/r/type_timestamp.result:
  Update test result
mysql-test/r/type_varchar.result:
  Update test result
mysql-test/r/union.result:
  Update test result
mysql-test/r/user_var.result:
  Update test result
mysql-test/r/variables.result:
  Update test result
sql/sql_show.cc:
  Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
2006-02-22 10:09:59 +01:00
unknown
5c9afee608 fixed result
mysql-test/r/events.result:
  result fixed
2006-02-21 03:17:53 +01:00
unknown
5e00b327cd Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-bug16406


mysql-test/r/events.result:
  Auto merged
2006-02-20 20:57:44 +01:00
unknown
b4c13a79ca fix the output. now only 1 space in PK definition 2006-02-20 11:20:31 +01:00
unknown
f39aca3f86 fix for bug#17543 Creating Event crash the server
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.
2006-02-16 16:11:02 +01:00
unknown
c80a0d7171 fix bug in show events which shows
| 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
2006-02-16 13:11:16 +01:00
unknown
89f598eea9 small post-merge fixes for bug#16406
(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
2006-02-16 05:21:02 +01:00
unknown
8fd74f314b merging before test + push
mysql-test/r/events.result:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/event.h:
  Auto merged
sql/event_timed.cc:
  manual merge
2006-02-15 21:51:57 +01:00
unknown
c6e5c2bcfb cosmetic post-review changes
mysql-test/r/events.result:
  result fixed
sql/event_executor.cc:
  cosmetic changes to show the definer of the event
2006-02-15 21:40:38 +01:00
unknown
2557f80fd1 fix for bug#16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
WL#1034 (Internal CRON)
(post-post-review updates)



mysql-test/r/events.result:
  update results file
mysql-test/t/events.test:
  add test for Bug #16410  Events: CREATE EVENT is legal in a CREATE TRIGGER statement
sql/sp_head.cc:
  CREATE/ALTER/DROP event mean explicit commit, so they are not allowed in
  a FUNCTION/TRIGGER. Fixes bug#16410
sql/sql_parse.cc:
  - end active transaction for CREATE/ALTER/DROP EVENT because
    they are DDL statements.
2006-02-15 17:12:27 +01:00
unknown
ee1b893f99 manual merge
mysql-test/t/events.test:
  Auto merged
2006-02-14 20:27:42 +01:00
unknown
99526f2efb post-merge fixes of bug 16548
mysql-test/r/events.result:
  post-merge fixes
mysql-test/t/events.test:
  post-merge fixes
sql/event.cc:
  post-merge fixes
sql/share/errmsg.txt:
  post-merge fixes
sql/table.cc:
  post-merge fixes
2006-02-14 20:10:51 +01:00
unknown
1161b5213d Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
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
2006-02-14 19:44:10 +01:00
unknown
752cadd453 manual merge
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
2006-02-14 17:05:36 +01:00
unknown
8d4f74be2d - final fixes for bug#16431 (Events: An event which alters itself disappears)
- 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.
2006-02-14 16:20:48 +01:00
unknown
5b497b163a fix for bug #17289 Events: missing privilege check for drop database
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
2006-02-10 15:02:57 +01:00
unknown
5f5dee66d3 from fix for bug#16414 (Events: Crash or hang if event drops itself)
WL #1034 


mysql-test/r/events.result:
  update result after pull
mysql-test/t/events.test:
  comment
2006-02-09 23:15:47 +01:00
unknown
99eb6eb661 - fix for bug #16414 (Events: Crash or hang if event drops itself)
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.
2006-02-07 19:28:33 +01:00
unknown
e5eea47c67 post-merge fixes of fix for bug#16642 (No I_S.EVENTS table)
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
2006-01-30 17:12:30 +01:00
unknown
2272e140fd post-commit merge
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
2006-01-30 14:28:48 +01:00
unknown
c3542cebf9 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


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
2006-01-30 13:15:23 +01:00
unknown
cf54bc182d post-commit fix of fix for bug#16419
WL#1034 (Internal CRON)
(not interesting for the Changelog)


mysql-test/r/events.result:
  update result
mysql-test/t/events.test:
  update test after pull after comit of fix for bug 16419
2006-01-26 22:18:40 +01:00
unknown
c0161265cc Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-bug16419


mysql-test/r/events.result:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-01-26 21:26:19 +01:00
unknown
3881218dc9 fix for bug#16419 (Events: can't use timestamp in the schedule)
WL #1034 (Internal CRON)


mysql-test/r/events.result:
  update test result
mysql-test/t/events.test:
  add tests
sql/event_timed.cc:
  - remove stupid check of val_int()
  - fix for bug #16419 (Events: can't use timestamp in the schedule)
    => don't use val_int() but only get_date() and use the date!
sql/share/errmsg.txt:
  - fix an error message, one more "einen"
sql/sql_yacc.yy:
  - handle new return value of event_timed::init_execute_at()
2006-01-26 21:21:21 +01:00
unknown
679aef1ba1 fix for bug#16404 (Events: keyword is ENABLED rather than ENABLE)
WL#1034 (Internal CRON)


mysql-test/r/events.result:
  fix results file
mysql-test/t/events.test:
  change test for the fix of bug#16404
sql/lex.h:
  enabled/disabled were only for events, going back to enable/disable
  fix for bug#16404
sql/sql_yacc.yy:
  ENABLED -> ENABLE
  DISABLED -> DISABLE
  fix for bug#16404 (Events: keyword is ENABLED rather than ENABLE)
2006-01-24 16:04:35 +01:00
unknown
3a8e50e082 fix for bug#16431 (Events: An event which alters itself disappears)
WL#1034 (Internal CRON)


mysql-test/r/events.result:
  add a test for to test bug #16431
mysql-test/t/events.test:
  results of new tests
sql/event.cc:
  - more debug info
  - pass info to evex_remove_from_cache() whether the operation 
    was drop or alter. this fixes possible bug that may lead to dropping
    of an event when it's altered. also fix for bug#16431
sql/event_executor.cc:
  be more verbose and throw more errors
sql/event_timed.cc:
  - add ` around the names of the db and the event_name and not
  their concatenation. remove ; from the end - unneeded. this fixes bug #16431,
  which was failing because after some recursion the query was ending on ;;
  which is normally an error in the parser because that's the delimiter
  
  - more debug info
  - don't execute lex_end() two times when there's a parse error or thd->is_fatal_error
2006-01-20 22:24:58 +01:00
unknown
2dc2a43006 fix for bug#16548 (Events: can't alter clause for preserve)
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_
2006-01-20 16:12:44 +01:00
unknown
af6d402627 WL #1034
- 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
2006-01-11 19:31:21 +01:00
unknown
2fc956fae9 WL #1034 (Internal CRON) pre-push updates
- 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.
2006-01-11 18:09:05 +01:00
unknown
1ef97f1f3b WL #1034 (Internal CRON) pre-push updates
- 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!
2006-01-10 19:16:58 +01:00
unknown
48405ec751 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).


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;
2005-12-15 14:12:28 +01:00