MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:ahristov Date:February 27 2006 5:34pm
Subject:bk commit into 5.1 tree (andrey:1.2182)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2182 06/02/27 18:34:42 andrey@lmy004. +10 -0
  event_timed -> Event_timed

  sql/sql_yacc.yy
    1.468 06/02/27 18:34:32 andrey@lmy004. +6 -6
    event_timed -> Event_timed

  sql/sql_show.cc
    1.314 06/02/27 18:34:31 andrey@lmy004. +1 -1
    event_timed -> Event_timed

  sql/sql_lex.h
    1.217 06/02/27 18:34:31 andrey@lmy004. +2 -2
    event_timed -> Event_timed

  sql/event_timed.cc
    1.40 06/02/27 18:34:31 andrey@lmy004. +68 -68
    event_timed -> Event_timed

  sql/event_priv.h
    1.20 06/02/27 18:34:31 andrey@lmy004. +1 -1
    event_timed -> Event_timed

  sql/event_manager.h
    1.2 06/02/27 18:34:31 andrey@lmy004. +3 -3
    event_timed -> Event_timed

  sql/event_manager.cc
    1.2 06/02/27 18:34:31 andrey@lmy004. +6 -6
    event_timed -> Event_timed

  sql/event_executor.cc
    1.35 06/02/27 18:34:31 andrey@lmy004. +14 -14
    event_timed -> Event_timed

  sql/event.h
    1.26 06/02/27 18:34:31 andrey@lmy004. +13 -13
    event_timed -> Event_timed

  sql/event.cc
    1.34 06/02/27 18:34:31 andrey@lmy004. +31 -31
    event_timed -> Event_timed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	andrey
# Host:	lmy004.
# Root:	/work/mysql-5.1-bug17619

--- 1.216/sql/sql_lex.h	2006-02-13 08:53:42 +01:00
+++ 1.217/sql/sql_lex.h	2006-02-27 18:34:31 +01:00
@@ -27,7 +27,7 @@ class sp_instr;
 class sp_pcontext;
 class st_alter_tablespace;
 class partition_info;
-class event_timed;
+class Event_timed;
 
 #ifdef MYSQL_SERVER
 /*
@@ -932,7 +932,7 @@ typedef struct st_lex
 
   st_sp_chistics sp_chistics;
 
-  event_timed *et;
+  Event_timed *et;
   bool et_compile_phase;
 
   bool only_view;       /* used for SHOW CREATE TABLE/VIEW */

--- 1.313/sql/sql_show.cc	2006-02-27 17:45:49 +01:00
+++ 1.314/sql/sql_show.cc	2006-02-27 18:34:31 +01:00
@@ -3933,7 +3933,7 @@ fill_events_copy_to_schema_table(THD *th
   const char *wild= thd->lex->wild ? thd->lex->wild->ptr() : NullS;
   CHARSET_INFO *scs= system_charset_info;
   TIME time;
-  event_timed et;    
+  Event_timed et;    
   DBUG_ENTER("fill_events_copy_to_schema_tab");
 
   restore_record(sch_table, s->default_values);

--- 1.467/sql/sql_yacc.yy	2006-02-27 17:45:50 +01:00
+++ 1.468/sql/sql_yacc.yy	2006-02-27 18:34:32 +01:00
@@ -1343,7 +1343,7 @@ create:
 
             lex->create_info.options= $3;
 
-            if (!(lex->et= new event_timed())) // implicitly calls event_timed::init()
+            if (!(lex->et= new Event_timed())) // implicitly calls Event_timed::init()
               YYABORT;
 
             /*
@@ -4817,7 +4817,7 @@ alter:
           */
           {
             LEX *lex=Lex;
-            event_timed *et;
+            Event_timed *et;
 
             if (lex->et)
             {
@@ -4830,7 +4830,7 @@ alter:
             }
             lex->spname= 0;//defensive programming
 
-            if (!(et= new event_timed()))// implicitly calls event_timed::init()
+            if (!(et= new Event_timed()))// implicitly calls Event_timed::init()
               YYABORT;
             lex->et = et;
 
@@ -4903,7 +4903,7 @@ opt_ev_rename_to: /* empty */ { $$= 0;}
           {
             LEX *lex=Lex;
             lex->spname= $3; //use lex's spname to hold the new name
-	                     //the original name is in the event_timed object
+	                     //the original name is in the Event_timed object
             $$= 1;
           }
       ;
@@ -7726,7 +7726,7 @@ drop:
               YYABORT;
             }
 
-            if (!(lex->et= new event_timed()))
+            if (!(lex->et= new Event_timed()))
               YYABORT;
 	  
             if (!lex->et_compile_phase)
@@ -8447,7 +8447,7 @@ show_param:
           {
             Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
             Lex->spname= $3;
-            Lex->et= new event_timed();
+            Lex->et= new Event_timed();
             if (!Lex->et)
               YYABORT;
             Lex->et->init_name_and_definer(YYTHD, $3);

--- 1.33/sql/event.cc	2006-02-27 17:45:49 +01:00
+++ 1.34/sql/event.cc	2006-02-27 18:34:31 +01:00
@@ -49,11 +49,11 @@
  - Consider using conditional variable when doing shutdown instead of
    waiting till all worker threads end.
  
- - Make event_timed::get_show_create_event() work
+ - Make Event_timed::get_show_create_event() work
 
  - Add logging to file
 
- - Move comparison code to class event_timed
+ - Move comparison code to class Event_timed
 
 Warning:
  - For now parallel execution is not possible because the same sp_head cannot be
@@ -276,13 +276,13 @@ my_time_compare(TIME *a, TIME *b)
 
 
 /*
-  Compares the execute_at members of 2 event_timed instances
+  Compares the execute_at members of 2 Event_timed instances
   
   Synopsis
     event_timed_compare()
     
-      a - first event_timed object
-      b - second event_timed object
+      a - first Event_timed object
+      b - second Event_timed object
   
   RETURNS:
    -1   - a->execute_at < b->execute_at
@@ -294,14 +294,14 @@ my_time_compare(TIME *a, TIME *b)
 */
 
 int
-event_timed_compare(event_timed *a, event_timed *b)
+event_timed_compare(Event_timed *a, Event_timed *b)
 {
   return my_time_compare(&a->execute_at, &b->execute_at);
 }
 
 
 /*
-  Compares the execute_at members of 2 event_timed instances.
+  Compares the execute_at members of 2 Event_timed instances.
   Used as callback for the prioritized queue when shifting
   elements inside.
   
@@ -309,8 +309,8 @@ event_timed_compare(event_timed *a, even
     event_timed_compare()
   
       vptr - not used (set it to NULL)
-      a    - first event_timed object
-      b    - second event_timed object
+      a    - first Event_timed object
+      b    - second Event_timed object
   
   RETURNS:
    -1   - a->execute_at < b->execute_at
@@ -324,7 +324,7 @@ event_timed_compare(event_timed *a, even
 int 
 event_timed_compare_q(void *vptr, byte* a, byte *b)
 {
-  return event_timed_compare((event_timed *)a, (event_timed *)b);
+  return event_timed_compare((Event_timed *)a, (Event_timed *)b);
 }
 
 
@@ -601,7 +601,7 @@ evex_db_find_event_by_name(THD *thd, con
 */
 
 static int
-evex_fill_row(THD *thd, TABLE *table, event_timed *et, my_bool is_update)
+evex_fill_row(THD *thd, TABLE *table, Event_timed *et, my_bool is_update)
 {
   enum evex_table_field field_num;
   CHARSET_INFO *scs= system_charset_info;
@@ -722,7 +722,7 @@ trunc_err:
    SYNOPSIS
      db_create_event()
        thd             THD
-       et              event_timed object containing information for the event
+       et              Event_timed object containing information for the event
        create_if_not - if an warning should be generated in case event exists
        rows_affected - how many rows were affected
 
@@ -735,7 +735,7 @@ trunc_err:
 */
 
 static int
-db_create_event(THD *thd, event_timed *et, my_bool create_if_not,
+db_create_event(THD *thd, Event_timed *et, my_bool create_if_not,
                 uint *rows_affected)
 {
   int ret= 0;
@@ -859,7 +859,7 @@ err:
 */
 
 static int
-db_update_event(THD *thd, event_timed *et, sp_name *new_name)
+db_update_event(THD *thd, Event_timed *et, sp_name *new_name)
 {
   TABLE *table;
   int ret= EVEX_OPEN_TABLE_FAILED;
@@ -960,13 +960,13 @@ err:
 */
 
 static int
-db_find_event(THD *thd, sp_name *name, LEX_STRING *definer, event_timed **ett,
+db_find_event(THD *thd, sp_name *name, LEX_STRING *definer, Event_timed **ett,
               TABLE *tbl, MEM_ROOT *root)
 {
   TABLE *table;
   int ret;
   char *ptr;
-  event_timed *et=NULL;
+  Event_timed *et=NULL;
   DBUG_ENTER("db_find_event");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 
@@ -988,7 +988,7 @@ db_find_event(THD *thd, sp_name *name, L
     my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name->m_name.str);
     goto done;    
   }
-  et= new event_timed;
+  et= new Event_timed;
   
   /*
     1)The table should not be closed beforehand.  ::load_from_row() only loads
@@ -1039,7 +1039,7 @@ evex_load_and_compile_event(THD * thd, s
 {
   int ret= 0;
   MEM_ROOT *tmp_mem_root;
-  event_timed *ett;
+  Event_timed *ett;
   Open_tables_state backup;
 
   DBUG_ENTER("db_load_and_compile_event");
@@ -1096,7 +1096,7 @@ done:
        use_lock - whether to lock the mutex LOCK_event_arrays or not in case it
                   has been already locked outside
        is_drop  - if an event is currently being executed then we can also delete
-                  the event_timed instance, so we alarm the event that it should
+                  the Event_timed instance, so we alarm the event that it should
                   drop itself if this parameter is set to TRUE. It's false on
                   ALTER EVENT.
 
@@ -1122,7 +1122,7 @@ evex_remove_from_cache(LEX_STRING *db, L
 
   for (i= 0; i < evex_queue_num_elements(EVEX_EQ_NAME); ++i)
   {
-    event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, event_timed*);
+    Event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, Event_timed*);
     DBUG_PRINT("info", ("[%s.%s]==[%s.%s]?", db->str, name->str,
                         et->ident.dbname.str, et->ident.name.str));
     if (!sortcmp_lex_string(*name, et->ident.name, system_charset_info) &&
@@ -1175,7 +1175,7 @@ done:
 */
 
 int
-evex_create_event(THD *thd, event_timed *et, uint create_options,
+evex_create_event(THD *thd, Event_timed *et, uint create_options,
                   uint *rows_affected)
 {
   int ret = 0;
@@ -1219,7 +1219,7 @@ done:
 */
 
 int
-evex_update_event(THD *thd, event_timed *et, sp_name *new_name,
+evex_update_event(THD *thd, Event_timed *et, sp_name *new_name,
                   uint *rows_affected)
 {
   int ret, i;
@@ -1275,7 +1275,7 @@ done:
           
 */
 
-int db_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
+int db_drop_event(THD *thd, Event_timed *et, bool drop_if_exists,
                   uint *rows_affected)
 {
   TABLE *table;
@@ -1316,7 +1316,7 @@ int db_drop_event(THD *thd, event_timed 
 
 done:
   /*
-    evex_drop_event() is used by event_timed::drop therefore
+    evex_drop_event() is used by Event_timed::drop therefore
     we have to close our thread tables.
   */
   close_thread_tables(thd);
@@ -1338,7 +1338,7 @@ done:
 */
 
 int
-evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
+evex_drop_event(THD *thd, Event_timed *et, bool drop_if_exists,
                 uint *rows_affected)
 {
   TABLE *table;
@@ -1382,7 +1382,7 @@ int
 evex_show_create_event(THD *thd, sp_name *spn, LEX_STRING definer)
 {
   int ret;
-  event_timed *et= NULL;
+  Event_timed *et= NULL;
   Open_tables_state backup;
 
   DBUG_ENTER("evex_update_event");
@@ -1452,15 +1452,15 @@ evex_show_create_event(THD *thd, sp_name
     1. Go through the in-memory cache, if the scheduler is working
        and for every event whose dbname matches the database we drop
        check whether is currently in execution:
-       - event_timed::can_spawn() returns true -> the event is not
+       - Event_timed::can_spawn() returns true -> the event is not
          being executed in a child thread. The reason not to use
-         event_timed::is_running() is that the latter shows only if
+         Event_timed::is_running() is that the latter shows only if
          it is being executed, which is 99% of the time in the thread
          but there are some initiliazations before and after the
          anonymous SP is being called. So if we delete in this moment
          -=> *boom*, so we have to check whether the thread has been
          spawned and can_spawn() is the right method.
-       - event_timed::can_spawn() returns false -> being runned ATM
+       - Event_timed::can_spawn() returns false -> being runned ATM
          just set the flags so it should drop itself.
 
 */
@@ -1496,7 +1496,7 @@ evex_drop_db_events(THD *thd, char *db)
 
   for (i= 0; i < evex_queue_num_elements(EVEX_EQ_NAME); ++i)
   {
-    event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, event_timed*);
+    Event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, Event_timed*);
     if (sortcmp_lex_string(et->ident.dbname, db_lex, system_charset_info))
       continue;
 
@@ -1576,7 +1576,7 @@ skip_memory:
     LEX_STRING et_db_lex= {et_db, strlen(et_db)};
     if (!sortcmp_lex_string(et_db_lex, db_lex, system_charset_info))
     {
-      event_timed ett;
+      Event_timed ett;
       char *ptr;
       
       if ((ptr= get_field(thd->mem_root, table->field[EVEX_FIELD_STATUS]))

--- 1.25/sql/event.h	2006-02-27 17:45:49 +01:00
+++ 1.26/sql/event.h	2006-02-27 18:34:31 +01:00
@@ -78,15 +78,15 @@ enum evex_table_field
 
 
 int
-evex_create_event(THD *thd, event_timed *et, uint create_options,
+evex_create_event(THD *thd, Event_timed *et, uint create_options,
                   uint *rows_affected);
 
 int
-evex_update_event(THD *thd, event_timed *et, sp_name *new_name,
+evex_update_event(THD *thd, Event_timed *et, sp_name *new_name,
                   uint *rows_affected);
 
 int
-evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
+evex_drop_event(THD *thd, Event_timed *et, bool drop_if_exists,
                 uint *rows_affected);
 
 int
@@ -115,10 +115,10 @@ shutdown_events();
 
 // auxiliary
 int
-event_timed_compare(event_timed **a, event_timed **b);
+event_timed_compare(Event_timed **a, Event_timed **b);
 
 
-class event_timed;
+class Event_timed;
 
 class Event_timed_name : public Sql_alloc
 {
@@ -137,13 +137,13 @@ public:
 
   Event_timed_name(Event_timed_name *etn);
 
-  Event_timed_name(event_timed *et);
+  Event_timed_name(Event_timed *et);
   
   void
   init(LEX_STRING dbname_, LEX_STRING name_, LEX_STRING definer_);
   
   bool
-  same_name(event_timed *et);
+  same_name(Event_timed *et);
 
   bool
   same_name(Event_timed_name *etn)
@@ -162,10 +162,10 @@ public:
 };
 
 
-class event_timed
+class Event_timed
 {
-  event_timed(const event_timed &);	/* Prevent use of these */
-  void operator=(event_timed &);
+  Event_timed(const Event_timed &);	/* Prevent use of these */
+  void operator=(Event_timed &);
   my_bool in_spawned_thread;
   ulong locked_by_thread_id;
   my_bool running;
@@ -207,7 +207,7 @@ public:
   bool killed;
   ulong event_thread_id;
 
-  event_timed():in_spawned_thread(0),locked_by_thread_id(0),
+  Event_timed():in_spawned_thread(0),locked_by_thread_id(0),
                 running(0), status_changed(false),
                 last_executed_changed(false), ident(), expression(0), created(0),
                 modified(0), on_completion(MYSQL_EVENT_ON_COMPLETION_DROP),
@@ -221,7 +221,7 @@ public:
     init();
   }
 
-  ~event_timed()
+  ~Event_timed()
   {
     pthread_mutex_destroy(&this->LOCK_running);
     if (free_sphead_on_delete)
@@ -353,7 +353,7 @@ public:
   }
   
   bool
-  same_name(event_timed *et)
+  same_name(Event_timed *et)
   {
     return ident.same_name(et);
   }

--- 1.34/sql/event_executor.cc	2006-02-27 17:45:49 +01:00
+++ 1.35/sql/event_executor.cc	2006-02-27 18:34:31 +01:00
@@ -56,7 +56,7 @@ static int
 evex_load_events_from_db(THD *thd);
 
 bool
-evex_print_warnings(THD *thd, event_timed *et);
+evex_print_warnings(THD *thd, Event_timed *et);
 
 /*
   TODO Andrey: Check for command line option whether to start
@@ -326,7 +326,7 @@ init_event_thread(THD* thd)
 static int
 executor_wait_till_next_event_exec(THD *thd)
 {
-  event_timed *et;
+  Event_timed *et;
   TIME time_now;
   int t2sleep;
 
@@ -341,7 +341,7 @@ executor_wait_till_next_event_exec(THD *
     VOID(pthread_mutex_unlock(&LOCK_event_arrays));
     DBUG_RETURN(1);
   }
-  et= evex_queue_first_element(&EVEX_EQ_NAME, event_timed*);
+  et= evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*);
   DBUG_ASSERT(et);
   if (et->status == MYSQL_EVENT_DISABLED)
   {
@@ -372,7 +372,7 @@ executor_wait_till_next_event_exec(THD *
     */
     while (t2sleep-- && !thd->killed && event_executor_running_global_var &&
            evex_queue_num_elements(EVEX_EQ_NAME) &&
-           (evex_queue_first_element(&EVEX_EQ_NAME, event_timed*) == et)
+           (evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*) == et)
            && !et->killed)
     {
       DBUG_PRINT("evex main thread",("will sleep a bit more"));
@@ -383,7 +383,7 @@ executor_wait_till_next_event_exec(THD *
   int ret= 0;
   if (!evex_queue_num_elements(EVEX_EQ_NAME))
     ret= 1;
-  else if (evex_queue_first_element(&EVEX_EQ_NAME, event_timed*) != et)
+  else if (evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*) != et)
     ret= 2;
   if ((thd->killed || et->killed) && event_executor_running_global_var)
     ret= 3;
@@ -492,7 +492,7 @@ event_executor_main(void *arg)
   while (!thd->killed)
   {
     TIME time_now;
-    event_timed *et;
+    Event_timed *et;
     
     cnt++;
     DBUG_PRINT("info", ("EVEX External Loop %d thd->k", cnt));
@@ -541,7 +541,7 @@ restart_ticking:
       DBUG_PRINT("evex main thread",("empty queue"));
       continue;
     }
-    et= evex_queue_first_element(&EVEX_EQ_NAME, event_timed*);
+    et= evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*);
     DBUG_PRINT("evex main thread",("got event from the queue"));
       
     if (et->execute_at.year > 1969 &&
@@ -635,7 +635,7 @@ finish:
   VOID(pthread_mutex_lock(&LOCK_event_arrays));
   for (i= 0; i < evex_queue_num_elements(EVEX_EQ_NAME); ++i)
   {
-    event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, event_timed*);
+    Event_timed *et= evex_queue_element(&EVEX_EQ_NAME, i, Event_timed*);
     et->free_sp();
     delete et;
   }
@@ -681,14 +681,14 @@ err_no_thd:
 
    SYNOPSIS
      event_executor_worker()
-       arg - the event_timed object to be processed
+       arg - the Event_timed object to be processed
 */
 
 pthread_handler_t
 event_executor_worker(void *event_void)
 {
   THD *thd; /* needs to be first for thread_stack */
-  event_timed *event = (event_timed *) event_void;
+  Event_timed *event = (Event_timed *) event_void;
   MEM_ROOT worker_mem_root;
 
   DBUG_ENTER("event_executor_worker");
@@ -795,7 +795,7 @@ err_no_thd:
 /*
    Loads all ENABLED events from mysql.event into the prioritized
    queue. Called during scheduler main thread initialization. Compiles
-   the events. Creates event_timed instances for every ENABLED event
+   the events. Creates Event_timed instances for every ENABLED event
    from mysql.event.
 
    SYNOPSIS
@@ -832,8 +832,8 @@ evex_load_events_from_db(THD *thd)
   init_read_record(&read_record_info, thd, table ,NULL,1,0);
   while (!(read_record_info.read_record(&read_record_info)))
   {
-    event_timed *et;
-    if (!(et= new event_timed))
+    Event_timed *et;
+    if (!(et= new Event_timed))
     {
       DBUG_PRINT("evex_load_events_from_db", ("Out of memory"));
       ret= -1;
@@ -970,7 +970,7 @@ static sql_print_xxx_func sql_print_xxx_
 */
 
 bool
-evex_print_warnings(THD *thd, event_timed *et)
+evex_print_warnings(THD *thd, Event_timed *et)
 {  
   MYSQL_ERROR *err;
   DBUG_ENTER("evex_show_warnings");

--- 1.1/sql/event_manager.cc	2006-02-27 17:45:50 +01:00
+++ 1.2/sql/event_manager.cc	2006-02-27 18:34:31 +01:00
@@ -100,7 +100,7 @@ err:
 */
 
 bool
-Event_scheduler_manager::add_event(event_timed *et, bool check_existance)
+Event_scheduler_manager::add_event(Event_timed *et, bool check_existance)
 {
   DBUG_ENTER("Event_scheduler_manager::add_event");
   pthread_mutex_lock(&LOCK_mutex);
@@ -139,7 +139,7 @@ Event_scheduler_manager::drop_event(Even
                                     enum event_drop_mode drop_mode)
 {
   uint i;
-  event_timed *et;
+  Event_timed *et;
   DBUG_ENTER("Event_scheduler_manager::drop_event");
   pthread_mutex_lock(&LOCK_mutex);
   CHECK_SHUTDOWN(true);
@@ -173,7 +173,7 @@ Event_scheduler_manager::drop_event(Even
 */
 
 bool
-Event_scheduler_manager::replace_event(event_timed *et,
+Event_scheduler_manager::replace_event(Event_timed *et,
                                        enum event_drop_mode replace_mode)
 {
   DBUG_ENTER("Event_scheduler_manager::replace_event");
@@ -198,7 +198,7 @@ Event_scheduler_manager::replace_event(e
     otherwise address
 */
 
-event_timed *
+Event_timed *
 Event_scheduler_manager::find_event(Event_timed_name *etn, bool remove_from_q)
 {
   uint i;
@@ -206,7 +206,7 @@ Event_scheduler_manager::find_event(Even
 
   for (i= 0; i < queue.elements; ++i)
   {
-    event_timed *et= (event_timed*) queue_element(&queue, i);
+    Event_timed *et= (Event_timed*) queue_element(&queue, i);
 #ifdef DEBUG_EVENT_MANAGER
     DBUG_PRINT("info", ("[%s.%s]==[%s.%s]?",
                etn->dbname.str, etn->name.str,
@@ -339,7 +339,7 @@ evex_manager_tester()
 
   ERROR_W_MESSAGE(mgr->worker_func == evex_manager_tester_worker, "Callback");
 
-  event_timed et;
+  Event_timed et;
   et.ident.dbname.str= (char *)"dbname";
   et.ident.dbname.length= strlen("dbname");
   et.ident.name.str= (char *)"event_name";

--- 1.1/sql/event_manager.h	2006-02-27 17:45:51 +01:00
+++ 1.2/sql/event_manager.h	2006-02-27 18:34:31 +01:00
@@ -59,18 +59,18 @@ public:
   };
 
   bool
-  add_event(event_timed *et, bool check_existance);
+  add_event(Event_timed *et, bool check_existance);
   
   bool
   drop_event(Event_timed_name *etn, enum event_drop_mode drop_mode);
   
   bool
-  replace_event(event_timed *et, enum event_drop_mode replace_mode);
+  replace_event(Event_timed *et, enum event_drop_mode replace_mode);
   
   /*
     LOCKING PROTOCOL: Does not do any locking. You are responsible to lock
   */
-  event_timed *
+  Event_timed *
   find_event(Event_timed_name *etn, bool remove_from_q);
 
   bool

--- 1.19/sql/event_priv.h	2006-02-16 00:49:28 +01:00
+++ 1.20/sql/event_priv.h	2006-02-27 18:34:31 +01:00
@@ -44,7 +44,7 @@ evex_db_find_event_by_name(THD *thd, con
 int
 event_timed_compare_q(void *vptr, byte* a, byte *b);
 
-int db_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
+int db_drop_event(THD *thd, Event_timed *et, bool drop_if_exists,
                 uint *rows_affected);
 
 

--- 1.39/sql/event_timed.cc	2006-02-27 17:45:49 +01:00
+++ 1.40/sql/event_timed.cc	2006-02-27 18:34:31 +01:00
@@ -24,14 +24,14 @@ extern int yyparse(void *thd);
 
 
 /*
-  Constructs an object from event_timed object
+  Constructs an object from Event_timed object
 
   SYNOPSIS
     Event_timed_name::Event_timed_name()
       et  Event_timed_name object to copy
 */
 
-Event_timed_name::Event_timed_name(event_timed *et)
+Event_timed_name::Event_timed_name(Event_timed *et)
 {
   Event_timed_name(et->get_ident());
 }
@@ -72,15 +72,15 @@ Event_timed_name::init(LEX_STRING dbname
 
 
 /*
-  Checks whether the event_timed object has the same name
+  Checks whether the Event_timed object has the same name
 
   SYNOPSIS
     Event_timed_name::same_name()
-      et  The event_timed object to compare to.
+      et  The Event_timed object to compare to.
 */
 
 bool
-Event_timed_name::same_name(event_timed *et)
+Event_timed_name::same_name(Event_timed *et)
 {
   return same_name(&et->ident);    
 }
@@ -91,13 +91,13 @@ Event_timed_name::same_name(event_timed 
   Init all member variables
 
   SYNOPSIS
-    event_timed::init()
+    Event_timed::init()
 */
 
 void
-event_timed::init()
+Event_timed::init()
 {
-  DBUG_ENTER("event_timed::init");
+  DBUG_ENTER("Event_timed::init");
 
   set_zero_time(&starts, MYSQL_TIMESTAMP_DATETIME);
   set_zero_time(&ends, MYSQL_TIMESTAMP_DATETIME);
@@ -117,15 +117,15 @@ event_timed::init()
   Sets a name and definer of the event
 
   SYNOPSIS
-    event_timed::init_name_and_definer()
+    Event_timed::init_name_and_definer()
       thd   THD
       spn   the name extracted in the parser
 */
 
 void
-event_timed::init_name_and_definer(THD *thd, sp_name *spn)
+Event_timed::init_name_and_definer(THD *thd, sp_name *spn)
 {
-  DBUG_ENTER("event_timed::init_name_and_definer");
+  DBUG_ENTER("Event_timed::init_name_and_definer");
   uint n;                                      /* Counter for nul trimming */
   /* During parsing, we must use thd->mem_root */
   MEM_ROOT *root= thd->mem_root;
@@ -171,7 +171,7 @@ event_timed::init_name_and_definer(THD *
   Set body of the event - what should be executed.
 
   SYNOPSIS
-    event_timed::init_body()
+    Event_timed::init_body()
       thd   THD
 
   NOTE
@@ -180,9 +180,9 @@ event_timed::init_name_and_definer(THD *
 */
 
 void
-event_timed::init_body(THD *thd)
+Event_timed::init_body(THD *thd)
 {
-  DBUG_ENTER("event_timed::init_body");
+  DBUG_ENTER("Event_timed::init_body");
   DBUG_PRINT("info", ("body=[%s] body_begin=0x%ld end=0x%ld", body_begin,
              body_begin, thd->lex->ptr));
 
@@ -207,7 +207,7 @@ event_timed::init_body(THD *thd)
   Set time for execution for one time events.
 
   SYNOPSIS
-    event_timed::init_execute_at()
+    Event_timed::init_execute_at()
       expr   when (datetime)
 
   RETURN VALUE
@@ -218,14 +218,14 @@ event_timed::init_body(THD *thd)
 */
 
 int
-event_timed::init_execute_at(THD *thd, Item *expr)
+Event_timed::init_execute_at(THD *thd, Item *expr)
 {
   my_bool not_used;
   TIME ltime;
   my_time_t my_time_tmp;
 
   TIME time_tmp;
-  DBUG_ENTER("event_timed::init_execute_at");
+  DBUG_ENTER("Event_timed::init_execute_at");
 
   if (expr->fix_fields(thd, &expr))
     DBUG_RETURN(EVEX_PARSE_ERROR);
@@ -259,7 +259,7 @@ event_timed::init_execute_at(THD *thd, I
   Set time for execution for transient events.
 
   SYNOPSIS
-    event_timed::init_interval()
+    Event_timed::init_interval()
       expr      how much?
       new_interval  what is the interval
 
@@ -271,13 +271,13 @@ event_timed::init_execute_at(THD *thd, I
 */
 
 int
-event_timed::init_interval(THD *thd, Item *expr, interval_type new_interval)
+Event_timed::init_interval(THD *thd, Item *expr, interval_type new_interval)
 {
   longlong tmp;
   String value;
   INTERVAL interval;
 
-  DBUG_ENTER("event_timed::init_interval");
+  DBUG_ENTER("Event_timed::init_interval");
 
   if (expr->fix_fields(thd, &expr))
     DBUG_RETURN(EVEX_PARSE_ERROR);
@@ -356,7 +356,7 @@ event_timed::init_interval(THD *thd, Ite
   Set activation time.
 
   SYNOPSIS
-    event_timed::init_starts()
+    Event_timed::init_starts()
     expr      how much?
     interval  what is the interval
 
@@ -374,12 +374,12 @@ event_timed::init_interval(THD *thd, Ite
 */
 
 int
-event_timed::init_starts(THD *thd, Item *new_starts)
+Event_timed::init_starts(THD *thd, Item *new_starts)
 {
   my_bool not_used;
   TIME ltime, time_tmp;
 
-  DBUG_ENTER("event_timed::init_starts");
+  DBUG_ENTER("Event_timed::init_starts");
 
   if (new_starts->fix_fields(thd, &new_starts))
     DBUG_RETURN(EVEX_PARSE_ERROR);
@@ -412,7 +412,7 @@ event_timed::init_starts(THD *thd, Item 
   Set deactivation time.
 
   SYNOPSIS
-    event_timed::init_ends()
+    Event_timed::init_ends()
       thd       THD
       new_ends  when?
 
@@ -431,13 +431,13 @@ event_timed::init_starts(THD *thd, Item 
 */
 
 int
-event_timed::init_ends(THD *thd, Item *new_ends)
+Event_timed::init_ends(THD *thd, Item *new_ends)
 {
   TIME ltime;
   my_time_t my_time_tmp;
   my_bool not_used;
 
-  DBUG_ENTER("event_timed::init_ends");
+  DBUG_ENTER("Event_timed::init_ends");
 
   if (new_ends->fix_fields(thd, &new_ends))
     DBUG_RETURN(EVEX_PARSE_ERROR);
@@ -464,15 +464,15 @@ event_timed::init_ends(THD *thd, Item *n
   Sets comment.
 
   SYNOPSIS
-    event_timed::init_comment()
+    Event_timed::init_comment()
       thd      THD - used for memory allocation
       comment  the string.
 */
 
 void
-event_timed::init_comment(THD *thd, LEX_STRING *set_comment)
+Event_timed::init_comment(THD *thd, LEX_STRING *set_comment)
 {
-  DBUG_ENTER("event_timed::init_comment");
+  DBUG_ENTER("Event_timed::init_comment");
 
   comment.str= strmake_root(thd->mem_root, set_comment->str,
                               comment.length= set_comment->length);
@@ -485,7 +485,7 @@ event_timed::init_comment(THD *thd, LEX_
   Loads an event from a row from mysql.event
 
   SYNOPSIS
-    event_timed::load_from_row(MEM_ROOT *mem_root, TABLE *table)
+    Event_timed::load_from_row(MEM_ROOT *mem_root, TABLE *table)
 
   NOTES
     This method is silent on errors and should behave like that. Callers
@@ -494,16 +494,16 @@ event_timed::init_comment(THD *thd, LEX_
 */
 
 int
-event_timed::load_from_row(MEM_ROOT *mem_root, TABLE *table)
+Event_timed::load_from_row(MEM_ROOT *mem_root, TABLE *table)
 {
   longlong created;
   longlong modified;
   char *ptr;
-  event_timed *et;
+  Event_timed *et;
   uint len;
   bool res1, res2;
 
-  DBUG_ENTER("event_timed::load_from_row");
+  DBUG_ENTER("Event_timed::load_from_row");
 
   if (!table)
     goto error;
@@ -701,7 +701,7 @@ bool get_next_time(TIME *next, TIME *sta
   Computes next execution time.
 
   SYNOPSIS
-    event_timed::compute_next_execution_time()
+    Event_timed::compute_next_execution_time()
 
   NOTES
     The time is set in execute_at, if no more executions the latter is set to
@@ -709,13 +709,13 @@ bool get_next_time(TIME *next, TIME *sta
 */
 
 bool
-event_timed::compute_next_execution_time()
+Event_timed::compute_next_execution_time()
 {
   TIME time_now;
   my_time_t now;
   int tmp;
 
-  DBUG_ENTER("event_timed::compute_next_execution_time");
+  DBUG_ENTER("Event_timed::compute_next_execution_time");
 
   if (status == MYSQL_EVENT_DISABLED)
   {
@@ -906,12 +906,12 @@ err:
   time according to thd->query_start(), so the THD's clock.
 
   SYNOPSIS
-    event_timed::drop()
+    Event_timed::drop()
       thd   thread context
 */
 
 void
-event_timed::mark_last_executed(THD *thd)
+Event_timed::mark_last_executed(THD *thd)
 {
   TIME time_now;
 
@@ -930,7 +930,7 @@ event_timed::mark_last_executed(THD *thd
   Drops the event
 
   SYNOPSIS
-    event_timed::drop()
+    Event_timed::drop()
       thd   thread context
 
   RETURN VALUE
@@ -943,11 +943,11 @@ event_timed::mark_last_executed(THD *thd
 */
 
 int
-event_timed::drop(THD *thd)
+Event_timed::drop(THD *thd)
 {
   TABLE *table;
   uint tmp= 0;
-  DBUG_ENTER("event_timed::drop");
+  DBUG_ENTER("Event_timed::drop");
 
   DBUG_RETURN(db_drop_event(thd, this, false, &tmp));
 }
@@ -957,7 +957,7 @@ event_timed::drop(THD *thd)
   Saves status and last_executed_at to the disk if changed.
 
   SYNOPSIS
-    event_timed::update_fields()
+    Event_timed::update_fields()
       thd - thread context
 
   RETURN VALUE
@@ -970,14 +970,14 @@ event_timed::drop(THD *thd)
 */
 
 bool
-event_timed::update_fields(THD *thd)
+Event_timed::update_fields(THD *thd)
 {
   TABLE *table;
   Open_tables_state backup;
   int ret= 0;
   bool opened;
 
-  DBUG_ENTER("event_timed::update_time_fields");
+  DBUG_ENTER("Event_timed::update_time_fields");
 
   DBUG_PRINT("enter", ("name: %s", ident.name.str));
 
@@ -1032,7 +1032,7 @@ extern LEX_STRING interval_type_to_name[
   Get SHOW CREATE EVENT as string
 
   SYNOPSIS
-    event_timed::get_create_event(THD *thd, String *buf)
+    Event_timed::get_create_event(THD *thd, String *buf)
       thd    Thread
       buf    String*, should be already allocated. CREATE EVENT goes inside.
 
@@ -1044,7 +1044,7 @@ extern LEX_STRING interval_type_to_name[
 */
 
 int
-event_timed::get_create_event(THD *thd, String *buf)
+Event_timed::get_create_event(THD *thd, String *buf)
 {
   int multipl= 0;
   char tmp_buff[128];
@@ -1110,7 +1110,7 @@ event_timed::get_create_event(THD *thd, 
   Executes the event (the underlying sp_head object);
 
   SYNOPSIS
-    event_timed::execute()
+    Event_timed::execute()
       thd       THD
       mem_root  If != NULL use it to compile the event on it
 
@@ -1122,14 +1122,14 @@ event_timed::get_create_event(THD *thd, 
 */
 
 int
-event_timed::execute(THD *thd, MEM_ROOT *mem_root)
+Event_timed::execute(THD *thd, MEM_ROOT *mem_root)
 {
   Security_context *save_ctx;
   /* this one is local and not needed after exec */
   Security_context security_ctx;
   int ret= 0;
 
-  DBUG_ENTER("event_timed::execute");
+  DBUG_ENTER("Event_timed::execute");
 
   running= true;
 
@@ -1187,7 +1187,7 @@ done:
 /*
   Switches the security context
   Synopsis
-    event_timed::change_security_context()
+    Event_timed::change_security_context()
       thd    - thread
       backup - where to store the old context 
   
@@ -1196,10 +1196,10 @@ done:
     1  - Error (generates error too)
 */
 bool
-event_timed::change_security_context(THD *thd, Security_context *s_ctx,
+Event_timed::change_security_context(THD *thd, Security_context *s_ctx,
                                      Security_context **backup)
 {
-  DBUG_ENTER("event_timed::change_security_context");
+  DBUG_ENTER("Event_timed::change_security_context");
   DBUG_PRINT("info", ("%s@%s", ident.definer.str, ident.dbname.str));
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   s_ctx->init();
@@ -1220,15 +1220,15 @@ event_timed::change_security_context(THD
 /*
   Restores the security context
   Synopsis
-    event_timed::restore_security_context()
+    Event_timed::restore_security_context()
       thd    - thread
       backup - switch to this context
  */
 
 void
-event_timed::restore_security_context(THD *thd, Security_context *backup)
+Event_timed::restore_security_context(THD *thd, Security_context *backup)
 {
-  DBUG_ENTER("event_timed::restore_security_context");
+  DBUG_ENTER("Event_timed::restore_security_context");
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (backup)
     thd->security_ctx= backup;
@@ -1242,7 +1242,7 @@ event_timed::restore_security_context(TH
   sp_head object held by the event
 
   SYNOPSIS
-    event_timed::compile()
+    Event_timed::compile()
       thd        thread context, used for memory allocation mostly
       mem_root   if != NULL then this memory root is used for allocs
                  instead of thd->mem_root
@@ -1254,14 +1254,14 @@ event_timed::restore_security_context(TH
 */
 
 int
-event_timed::compile(THD *thd, MEM_ROOT *mem_root)
+Event_timed::compile(THD *thd, MEM_ROOT *mem_root)
 {
   int ret= 0;
   MEM_ROOT *tmp_mem_root= 0;
   LEX *old_lex= thd->lex, lex;
   char *old_db;
   int old_db_length;
-  event_timed *ett;
+  Event_timed *ett;
   sp_name *spn;
   char *old_query;
   uint old_query_len;
@@ -1273,7 +1273,7 @@ event_timed::compile(THD *thd, MEM_ROOT 
                *old_collation_connection,
                *old_character_set_results;
 
-  DBUG_ENTER("event_timed::compile");
+  DBUG_ENTER("Event_timed::compile");
 
   show_create.length(0);
 
@@ -1315,7 +1315,7 @@ event_timed::compile(THD *thd, MEM_ROOT 
 
   thd->query= show_create.c_ptr();
   thd->query_length= show_create.length();
-  DBUG_PRINT("event_timed::compile", ("query:%s",thd->query));
+  DBUG_PRINT("Event_timed::compile", ("query:%s",thd->query));
 
   thd->lex= &lex;
   lex_start(thd, (uchar*)thd->query, thd->query_length);
@@ -1390,10 +1390,10 @@ done:
 */
 
 bool
-event_timed::can_spawn_now_n_lock(THD *thd)
+Event_timed::can_spawn_now_n_lock(THD *thd)
 {
   int ret2;
-  DBUG_ENTER("event_timed::can_spawn_now_n_lock");
+  DBUG_ENTER("Event_timed::can_spawn_now_n_lock");
   DBUG_PRINT("info", ("trylock LOCK_RUNNING"));
   ret2= pthread_mutex_trylock(&this->LOCK_running);
   if (ret2 == EBUSY)
@@ -1416,13 +1416,13 @@ extern pthread_attr_t connection_attrib;
 */
 
 int
-event_timed::spawn_now(void * (*thread_func)(void*))
+Event_timed::spawn_now(void * (*thread_func)(void*))
 {  
   int ret= EVENT_EXEC_STARTED;
   static uint exec_num= 0;
   pthread_t th;
 
-  DBUG_ENTER("event_timed::spawn_now");
+  DBUG_ENTER("Event_timed::spawn_now");
   DBUG_PRINT("info", ("[%s.%s]", ident.dbname.str, ident.name.str));
 
   if (pthread_create(&th, &connection_attrib, thread_func, (void*)this))
@@ -1446,9 +1446,9 @@ event_timed::spawn_now(void * (*thread_f
 
 
 void
-event_timed::spawn_thread_finish(THD *thd)
+Event_timed::spawn_thread_finish(THD *thd)
 {
-  DBUG_ENTER("event_timed::spawn_thread_finish");
+  DBUG_ENTER("Event_timed::spawn_thread_finish");
   DBUG_PRINT("info", ("[%s.%s]", ident.dbname.str, ident.name.str));
 
   if ((flags & EVENT_EXEC_NO_MORE) || status == MYSQL_EVENT_DISABLED)
@@ -1478,9 +1478,9 @@ event_timed::spawn_thread_finish(THD *th
 */
 
 int
-event_timed::spawn_unlock(THD *thd)
+Event_timed::spawn_unlock(THD *thd)
 {
-  DBUG_ENTER("event_timed::spawn_unlock");
+  DBUG_ENTER("Event_timed::spawn_unlock");
   int ret= 0;
   if (locked_by_thread_id == thd->thread_id)
   {        
Thread
bk commit into 5.1 tree (andrey:1.2182)ahristov27 Feb