List:Commits« Previous MessageNext Message »
From:ahristov Date:January 23 2006 3:14pm
Subject:bk commit into 5.1 tree (andrey:1.2067)
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.2067 06/01/23 16:13:46 andrey@lmy004. +4 -0
  Merge ahristov@stripped:/home/bk/mysql-5.1-new
  into lmy004.:/work/mysql-5.1-tt-copy-works

  sql/sql_yacc.yy
    1.443 06/01/23 16:13:38 andrey@lmy004. +0 -0
    Auto merged

  sql/event_timed.cc
    1.19 06/01/23 16:13:37 andrey@lmy004. +0 -0
    Auto merged

  sql/event_executor.cc
    1.20 06/01/23 16:13:37 andrey@lmy004. +0 -0
    Auto merged

  sql/event.cc
    1.22 06/01/23 16:13:37 andrey@lmy004. +0 -0
    Auto merged

# 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-tt-copy-works/RESYNC

--- 1.442/sql/sql_yacc.yy	2006-01-23 11:00:33 +01:00
+++ 1.443/sql/sql_yacc.yy	2006-01-23 16:13:38 +01:00
@@ -1418,7 +1418,7 @@
                 YYABORT;
                 break;
               case EVEX_BAD_PARAMS:
-                my_error(ER_EVENT_INTERVAL_NOT_POSITIVE, MYF(0));
+                my_error(ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG, MYF(0));
                 YYABORT;
                 break;
               }

--- 1.21/sql/event.cc	2006-01-18 20:41:03 +01:00
+++ 1.22/sql/event.cc	2006-01-23 16:13:37 +01:00
@@ -243,8 +243,9 @@
     DBUG_RETURN(EVEX_GET_FIELD_FAILED);
   }
   
-  DBUG_PRINT("info", ("dbname.len=%d",et->dbname.length));  
-  DBUG_PRINT("info", ("name.len=%d",et->name.length));  
+  DBUG_PRINT("info", ("dbname.len=[%s]",et->dbname.str));  
+  DBUG_PRINT("info", ("name.len=[%s]",et->name.str));  
+  DBUG_PRINT("info", ("body=[%s]",et->body.str));  
 
   if (table->field[field_num= EVEX_FIELD_DB]->
                   store(et->dbname.str, et->dbname.length, system_charset_info))
@@ -685,7 +686,8 @@
 
 
 static int
-evex_remove_from_cache(LEX_STRING *db, LEX_STRING *name, bool use_lock)
+evex_remove_from_cache(LEX_STRING *db, LEX_STRING *name, bool use_lock,
+                       bool is_drop)
 {
   uint i;
 
@@ -708,14 +710,18 @@
     {
       if (!et->is_running())
       {
+        DBUG_PRINT("evex_remove_from_cache", ("not running - free and delete"));
         et->free_sp();
         delete et;
       }
       else
       {
+        DBUG_PRINT("evex_remove_from_cache",
+               ("running.defer mem free. is_drop=%d", is_drop));
         et->flags|= EVENT_EXEC_NO_MORE;
-        et->dropped= true;
+        et->dropped= is_drop;
       }
+      DBUG_PRINT("evex_remove_from_cache", ("delete from queue"));
       evex_queue_delete_element(&EVEX_EQ_NAME, i);
       // ok, we have cleaned
       goto done;
@@ -816,7 +822,7 @@
     UNLOCK_MUTEX_AND_BAIL_OUT(LOCK_evex_running, done);
 
   VOID(pthread_mutex_lock(&LOCK_event_arrays));
-  evex_remove_from_cache(&et->dbname, &et->name, false);
+  evex_remove_from_cache(&et->dbname, &et->name, false, false);
   if (et->status == MYSQL_EVENT_ENABLED)
   {
     if (new_name)
@@ -885,7 +891,7 @@
 
   VOID(pthread_mutex_lock(&LOCK_evex_running));
   if (evex_is_running)
-    ret= evex_remove_from_cache(&et->dbname, &et->name, true);
+    ret= evex_remove_from_cache(&et->dbname, &et->name, true, true);
   VOID(pthread_mutex_unlock(&LOCK_evex_running));
 
 done:

--- 1.19/sql/event_executor.cc	2006-01-18 20:41:03 +01:00
+++ 1.20/sql/event_executor.cc	2006-01-23 16:13:37 +01:00
@@ -502,12 +502,18 @@
     sql_print_information("    EVEX EXECUTED event %s.%s  [EXPR:%d]. RetCode=%d",
                           event->dbname.str, event->name.str,
                           (int) event->expression, ret);
+    if (ret == EVEX_COMPILE_ERROR)
+      sql_print_information("    EVEX COMPILE ERROR for event %s.%s",
+                             event->dbname.str, event->name.str);
+    
     DBUG_PRINT("info", ("    EVEX EXECUTED event %s.%s  [EXPR:%d]. RetCode=%d",
                         event->dbname.str, event->name.str,
                         (int) event->expression, ret));
   }
   if ((event->flags & EVENT_EXEC_NO_MORE) || event->status==MYSQL_EVENT_DISABLED)
   {
+    DBUG_PRINT("event_executor_worker",
+               ("%s exec no more. to drop=%d",event->name.str, event->dropped));
     if (event->dropped)
       event->drop(thd);
     delete event;

--- 1.18/sql/event_timed.cc	2006-01-18 20:41:03 +01:00
+++ 1.19/sql/event_timed.cc	2006-01-23 16:13:37 +01:00
@@ -938,16 +938,18 @@
 {
   char *dst, *ret;
   uint len, tmp_len;
+  DBUG_ENTER("get_show_create_event");
+  DBUG_PRINT("ret_info",("body_len=[%d]body=[%s]", body.length, body.str));
 
-  len = strlen("CREATE EVENT `") + dbname.length + strlen(".") + name.length +
-        strlen("` ON SCHEDULE EVERY 5 MINUTE DO ") + body.length + strlen(";");
+  len = strlen("CREATE EVENT `") + dbname.length + strlen("`.`") + name.length +
+        strlen("` ON SCHEDULE EVERY 5 MINUTE DO ") + body.length;// + strlen(";");
   
   ret= dst= (char*) alloc_root(thd->mem_root, len + 1);
   memcpy(dst, "CREATE EVENT `", tmp_len= strlen("CREATE EVENT `"));
   dst+= tmp_len;
   memcpy(dst, dbname.str, tmp_len=dbname.length);
   dst+= tmp_len;
-  memcpy(dst, ".", tmp_len= strlen("."));
+  memcpy(dst, "`.`", tmp_len= strlen("`.`"));
   dst+= tmp_len;
   memcpy(dst, name.str, tmp_len= name.length);
   dst+= tmp_len;
@@ -957,13 +959,14 @@
 
   memcpy(dst, body.str, tmp_len= body.length);
   dst+= tmp_len;
-  memcpy(dst, ";", 1);
-  ++dst;
+//  memcpy(dst, ";", 1);
+//  ++dst;
   *dst= '\0';
  
   *length= len;
-
-  return ret;
+  
+  DBUG_PRINT("ret_info",("len=%d",*length));
+  DBUG_RETURN(ret);
 }
 
 
@@ -1076,8 +1079,12 @@
   lex.et_compile_phase= TRUE;
   if (yyparse((void *)thd) || thd->is_fatal_error)
   {
+    DBUG_PRINT("error", ("error during compile or thd->is_fatal_error=%d",
+                          thd->is_fatal_error));
     //  Free lex associated resources
     //  QQ: Do we really need all this stuff here ?
+    sql_print_error("error during compile of %s.%s or thd->is_fatal_error=%d",
+                    dbname.str, name.str, thd->is_fatal_error);
     if (lex.sphead)
     {
       if (&lex != thd->lex)
@@ -1085,13 +1092,10 @@
       delete lex.sphead;
       lex.sphead= 0;
     }
-    // QQ: anything else ?
-    lex_end(&lex);
-    thd->lex= old_lex;
-
     ret= EVEX_COMPILE_ERROR;
     goto done;
   }
+  DBUG_PRINT("note", ("success compiling %s.%s", dbname.str, name.str));
   
   sphead= lex.et->sphead;
   sphead->m_db= dbname;
@@ -1105,6 +1109,8 @@
   lex.et->free_sphead_on_delete= false;
   delete lex.et;
   lex_end(&lex);
+  DBUG_PRINT("note", ("return old data on its place. set back NAMES"));
+
   thd->lex= old_lex;
   thd->query= old_query;
   thd->query_length= old_query_len;
Thread
bk commit into 5.1 tree (andrey:1.2067)ahristov23 Jan