List:Commits« Previous MessageNext Message »
From:konstantin Date:March 23 2007 4:57pm
Subject:bk commit into 5.1 tree (kostja:1.2515)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja 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@stripped, 2007-03-23 18:57:04+03:00, kostja@stripped +6 -0
  Change module prefix in error messages: SCHEDULER -> Event Scheduler,
  to not collide with the recently introduced thread scheduler module.

  mysql-test/r/events.result@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +7 -7
    Update test results with new error texts (SCHEDULER -> Event Scheduler,
    grammar).

  sql/event_data_objects.cc@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +4 -3
    SCHEDULER -> Event Scheduler.

  sql/event_queue.cc@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +4 -3
    SCHEDULER -> Event Scheduler.

  sql/event_scheduler.cc@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +24 -17
    SCHEDULER -> Event Scheduler.

  sql/events.cc@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +13 -12
    SCHEDULER -> Event Scheduler.

  sql/share/errmsg.txt@stripped, 2007-03-23 18:57:02+03:00, kostja@stripped +3 -3
    SCHEDULER -> Event Scheduler. Fix English grammar.

# 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:	kostja
# Host:	bodhi.local
# Root:	/opt/local/work/mysql-5.1-events-cleanup-to-push

--- 1.47/mysql-test/r/events.result	2007-03-16 17:31:03 +03:00
+++ 1.48/mysql-test/r/events.result	2007-03-23 18:57:02 +03:00
@@ -229,10 +229,10 @@
 events_test	intact_check	root@localhost	SYSTEM	RECURRING	NULL	10	#	#	NULL	ENABLED
 ALTER TABLE mysql.event ADD dummy INT FIRST;
 SHOW EVENTS;
-ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably
corrupted
+ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is
probably corrupted
 ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST;
 SHOW EVENTS;
-ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably
corrupted
+ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is
probably corrupted
 ALTER TABLE mysql.event DROP dummy2;
 SHOW EVENTS;
 Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval
field	Starts	Ends	Status
@@ -241,7 +241,7 @@
 INSERT INTO event_like SELECT * FROM mysql.event;
 ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
 SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
-ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
+ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see
the error log for details
 ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default
'';
 SHOW CREATE TABLE mysql.event;
 Table	Create Table
@@ -266,7 +266,7 @@
   PRIMARY KEY (`db`,`name`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
 SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
-ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
+ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see
the error log for details
 ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default
'';
 "This should work"
 SHOW EVENTS;
@@ -274,13 +274,13 @@
 events_test	intact_check	root@localhost	SYSTEM	RECURRING	NULL	10	#	#	NULL	ENABLED
 ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
 SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
-ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
+ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see
the error log for details
 ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default
'';
 SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
-ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
+ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see
the error log for details
 ALTER TABLE mysql.event DROP comment, DROP starts;
 SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
-ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. Table probably
corrupted
+ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. The table is
probably corrupted
 DROP TABLE mysql.event;
 CREATE TABLE mysql.event like event_like;
 INSERT INTO  mysql.event SELECT * FROM event_like;

--- 1.72/sql/events.cc	2007-03-23 18:14:01 +03:00
+++ 1.73/sql/events.cc	2007-03-23 18:57:02 +03:00
@@ -641,7 +641,7 @@
   if (check_system_tables(thd))
   {
     check_system_tables_error= TRUE;
-    sql_print_error("SCHEDULER: The system tables are damaged. "
+    sql_print_error("Event Scheduler: The system tables are damaged. "
                     "The scheduler subsystem will be unusable during this run.");
     goto end;
   }
@@ -649,7 +649,7 @@
 
   if (event_queue->init_queue(thd) || load_events_from_db(thd))
   {
-    sql_print_error("SCHEDULER: Error while loading from disk.");
+    sql_print_error("Event Scheduler: Error while loading from disk.");
     goto end;
   }
 
@@ -862,7 +862,7 @@
 
   if ((ret= simple_open_n_lock_tables(thd, &tables)))
   {
-    sql_print_error("SCHEDULER: Cannot open mysql.db");
+    sql_print_error("Event Scheduler: Cannot open mysql.db");
     ret= TRUE;
   }
   ret= table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT,
@@ -877,7 +877,7 @@
 
   if (simple_open_n_lock_tables(thd, &tables))
   {
-    sql_print_error("SCHEDULER: Cannot open mysql.user");
+    sql_print_error("Event Scheduler: Cannot open mysql.user");
     ret= TRUE;
   }
   else
@@ -933,7 +933,7 @@
 
   if ((ret= db_repository->open_event_table(thd, TL_READ, &table)))
   {
-    sql_print_error("SCHEDULER: Table mysql.event is damaged. Can not open");
+    sql_print_error("Event Scheduler: Table mysql.event is damaged. Can not open");
     DBUG_RETURN(EVEX_OPEN_TABLE_FAILED);
   }
 
@@ -950,8 +950,9 @@
 
     if ((ret= et->load_from_row(thd, table)))
     {
-      sql_print_error("SCHEDULER: Error while loading from mysql.event. "
-                      "Table probably corrupted");
+      sql_print_error("Event Scheduler: "
+                      "Error while reading from mysql.event. "
+                      "The table is probably corrupted");
       break;
     }
     if (et->status != Event_queue_element::ENABLED)
@@ -964,7 +965,7 @@
     /* let's find when to be executed */
     if (et->compute_next_execution_time())
     {
-      sql_print_error("SCHEDULER: Error while computing execution time of %s.%s."
+      sql_print_error("Event Scheduler: Error while computing execution time of %s.%s."
                       " Skipping", et->dbname.str, et->name.str);
       continue;
     }
@@ -981,11 +982,11 @@
       */
       switch (ret= temp_job_data.compile(thd, thd->mem_root)) {
       case EVEX_MICROSECOND_UNSUP:
-        sql_print_error("SCHEDULER: mysql.event is tampered. MICROSECOND is not "
+        sql_print_error("Event Scheduler: mysql.event is tampered. MICROSECOND is not "
                         "supported but found in mysql.event");
         break;
       case EVEX_COMPILE_ERROR:
-        sql_print_error("SCHEDULER: Error while compiling %s.%s. Aborting load",
+        sql_print_error("Event Scheduler: Error while compiling %s.%s. Aborting load",
                         et->dbname.str, et->name.str);
         break;
       default:
@@ -1017,8 +1018,8 @@
   else
   {
     ret= 0;
-    sql_print_information("SCHEDULER: Loaded %d event%s", count,
-                          (count == 1)?"":"s");
+    sql_print_information("Event Scheduler: Loaded %d event%s",
+                          count, (count == 1)?"":"s");
   }
 
   close_thread_tables(thd);

--- 1.28/sql/event_queue.cc	2007-03-23 18:14:01 +03:00
+++ 1.29/sql/event_queue.cc	2007-03-23 18:57:02 +03:00
@@ -138,7 +138,7 @@
                     0 /*max_on_top*/, event_queue_element_compare_q,
                     NULL, EVENT_QUEUE_EXTENT))
   {
-    sql_print_error("SCHEDULER: Can't initialize the execution queue");
+    sql_print_error("Event Scheduler: Can't initialize the execution queue");
     goto err;
   }
 
@@ -453,7 +453,8 @@
   uint i;
   DBUG_ENTER("Event_queue::empty_queue");
   DBUG_PRINT("enter", ("Purging the queue. %u element(s)", queue.elements));
-  sql_print_information("SCHEDULER: Purging queue. %u events", queue.elements);
+  sql_print_information("Event Scheduler: Purging the queue. %u events",
+                        queue.elements);
   /* empty the queue */
   for (i= 0; i < queue.elements; ++i)
   {
@@ -586,7 +587,7 @@
     if (top->status == Event_queue_element::DISABLED)
     {
       DBUG_PRINT("info", ("removing from the queue"));
-      sql_print_information("SCHEDULER: Last execution of %s.%s. %s",
+      sql_print_information("Event Scheduler: Last execution of %s.%s. %s",
                             top->dbname.str, top->name.str,
                             top->dropped? "Dropping.":"");
       delete top;

--- 1.38/sql/event_scheduler.cc	2007-03-23 18:14:01 +03:00
+++ 1.39/sql/event_scheduler.cc	2007-03-23 18:57:02 +03:00
@@ -78,7 +78,7 @@
   char prefix_buf[5 * STRING_BUFFER_USUAL_SIZE];
   String prefix(prefix_buf, sizeof(prefix_buf), system_charset_info);
   prefix.length(0);
-  prefix.append("SCHEDULER: [");
+  prefix.append("Event Scheduler: [");
 
   append_identifier(thd, &prefix, et->definer.str, et->definer.length);
   prefix.append("][", 2);
@@ -304,7 +304,8 @@
     goto end;
   }
 
-  sql_print_information("SCHEDULER: [%s.%s of %s] executing in thread %lu. ",
+  sql_print_information("Event Scheduler: "
+                        "[%s.%s of %s] executing in thread %lu. ",
                         job_data->dbname.str, job_data->name.str,
                         job_data->definer.str, thd->thread_id);
 
@@ -314,23 +315,25 @@
 
   print_warnings(thd, job_data);
 
-  sql_print_information("SCHEDULER: [%s.%s of %s] executed in thread %lu. "
+  sql_print_information("Event Scheduler: "
+                        "[%s.%s of %s] executed in thread %lu. "
                         "RetCode=%d", job_data->dbname.str, job_data->name.str,
                         job_data->definer.str, thd->thread_id, ret);
   if (ret == EVEX_COMPILE_ERROR)
-    sql_print_information("SCHEDULER: COMPILE ERROR for event %s.%s of %s",
+    sql_print_information("Event Scheduler: "
+                          "COMPILE ERROR for event %s.%s of %s",
                           job_data->dbname.str, job_data->name.str,
                           job_data->definer.str);
   else if (ret == EVEX_MICROSECOND_UNSUP)
-    sql_print_information("SCHEDULER: MICROSECOND is not supported");
+    sql_print_information("Event Scheduler: MICROSECOND is not supported");
 
 end:
   delete job_data;
 
   if (event->dropped)
   {
-    sql_print_information("SCHEDULER: Dropping %s.%s", event->dbname.str,
-                          event->name.str);
+    sql_print_information("Event Scheduler: Dropping %s.%s",
+                          event->dbname.str, event->name.str);
     /*
       Using db_repository can lead to a race condition because we access
       the table without holding LOCK_metadata.
@@ -442,7 +445,7 @@
 
   if (!(new_thd= new THD))
   {
-    sql_print_error("SCHEDULER: Cannot init manager event thread");
+    sql_print_error("Event Scheduler: Cannot initialize the scheduler thread");
     ret= TRUE;
     goto end;
   }
@@ -501,7 +504,7 @@
   int res= FALSE;
   DBUG_ENTER("Event_scheduler::run");
 
-  sql_print_information("SCHEDULER: Manager thread started with id %lu",
+  sql_print_information("Event Scheduler: scheduler thread started with id %lu",
                         thd->thread_id);
   /*
     Recalculate the values in the queue because there could have been stops
@@ -516,7 +519,8 @@
     /* Gets a minimized version */
     if (queue->get_top_for_execution_if_time(thd, &event_name))
     {
-      sql_print_information("SCHEDULER: Serious error during getting next "
+      sql_print_information("Event Scheduler: "
+                            "Serious error during getting next "
                             "event to execute. Stopping");
       break;
     }
@@ -540,7 +544,7 @@
   state= INITIALIZED;
   pthread_cond_signal(&COND_state);
   UNLOCK_DATA();
-  sql_print_information("SCHEDULER: Stopped");
+  sql_print_information("Event Scheduler: Stopped");
 
   DBUG_RETURN(res);
 }
@@ -657,8 +661,8 @@
 
   /* Guarantee we don't catch spurious signals */
   do {
-    DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from the manager "
-                        "thread.  Current value of state is %s . "
+    DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from "
+                        "the scheduler thread.  Current value of state is %s . "
                         "workers count=%d", scheduler_states_names[state].str,
                         workers_count()));
     /*
@@ -672,20 +676,23 @@
     */
 
     state= STOPPING;
-    DBUG_PRINT("info", ("Manager thread has id %lu", scheduler_thd->thread_id));
+    DBUG_PRINT("info", ("Scheduler thread has id %lu",
+                        scheduler_thd->thread_id));
     /* Lock from delete */
     pthread_mutex_lock(&scheduler_thd->LOCK_delete);
     /* This will wake up the thread if it waits on Queue's conditional */
-    sql_print_information("SCHEDULER: Killing manager thread %lu",
+    sql_print_information("Event Scheduler: Killing the scheduler thread, "
+                          "thread id %lu",
                           scheduler_thd->thread_id);
     scheduler_thd->awake(THD::KILL_CONNECTION);
     pthread_mutex_unlock(&scheduler_thd->LOCK_delete);
 
     /* thd could be 0x0, when shutting down */
-    sql_print_information("SCHEDULER: Waiting the manager thread to reply");
+    sql_print_information("Event Scheduler: "
+                          "Waiting for the scheduler thread to reply");
     COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop");
   } while (state == STOPPING);
-  DBUG_PRINT("info", ("Manager thread has cleaned up. Set state to INIT"));
+  DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT"));
   /*
     The rationale behind setting it to NULL here but not destructing it
     beforehand is because the THD will be deinited in event_scheduler_thread().

--- 1.90/sql/event_data_objects.cc	2007-03-23 18:14:01 +03:00
+++ 1.91/sql/event_data_objects.cc	2007-03-23 18:57:02 +03:00
@@ -1926,9 +1926,10 @@
                           thd->is_fatal_error));
     lex.unit.cleanup();
 
-    sql_print_error("SCHEDULER: Error during compilation of %s.%s or "
-                    "thd->is_fatal_error: %d",
-                    dbname.str, name.str, thd->is_fatal_error);
+    sql_print_error("Event Scheduler: "
+                    "%serror during compilation of %s.%s",
+                    thd->is_fatal_error ? "fatal " : "",
+                    dbname.str, name.str);
 
     ret= EVEX_COMPILE_ERROR;
     goto done;

--- 1.149/sql/share/errmsg.txt	2007-03-20 00:37:37 +03:00
+++ 1.150/sql/share/errmsg.txt	2007-03-23 18:57:02 +03:00
@@ -5881,10 +5881,10 @@
         eng "No datetime expression provided"
         ger "Kein DATETIME-Ausdruck angegeben"
 ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
-        eng "Column count of mysql.%s is wrong. Expected %d, found %d. Table probably
corrupted"
+        eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is
probably corrupted"
         ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle
ist wahrscheinlich beschädigt"
 ER_CANNOT_LOAD_FROM_TABLE
-        eng "Cannot load from mysql.%s. Table probably corrupted. See error log."
+        eng "Cannot load from mysql.%s. The table is probably corrupted. Please see the
error log for details"
         ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt, siehe
Fehlerlog"
 ER_EVENT_CANNOT_DELETE
         eng "Failed to delete the event from mysql.event"
@@ -5982,7 +5982,7 @@
         eng "Recursivity of EVENT DDL statements is forbidden when body is present"
         ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil
(Body) existiert"
 ER_EVENTS_DB_ERROR
-        eng "Cannot proceed because the tables used by events were found damaged at
server start"
+        eng "Cannot proceed because system tables used by Event Scheduler were found
damaged at server start"
         ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden,
beim Serverstart als beschädigt markiert wurden"
 ER_ONLY_INTEGERS_ALLOWED
         eng "Only integers allowed as number here"
Thread
bk commit into 5.1 tree (kostja:1.2515)konstantin23 Mar