List:Commits« Previous MessageNext Message »
From:knielsen Date:January 20 2006 12:23pm
Subject:bk commit into 5.1 tree (knielsen:1.2067)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of knielsen. When knielsen 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/20 13:23:24 knielsen@stripped +6 -0
  Portability compilation fixes.

  sql/sql_parse.cc
    1.511 06/01/20 13:22:34 knielsen@stripped +31 -16
    Fix HPUX compile failure, initializing char * with const char *

  sql/table.cc
    1.202 06/01/20 12:33:53 knielsen@stripped +2 -2
    Rename macros to fix AIX conflict with system LOG_GENERAL macros.

  sql/sql_delete.cc
    1.172 06/01/20 12:33:53 knielsen@stripped +8 -8
    Rename macros to fix AIX conflict with system LOG_GENERAL macros.

  sql/mysql_priv.h
    1.372 06/01/20 12:33:53 knielsen@stripped +2 -2
    Rename macros to fix AIX conflict with system LOG_GENERAL macros.

  sql/log.cc
    1.187 06/01/20 12:33:53 knielsen@stripped +13 -13
    Rename macros to fix AIX conflict with system LOG_GENERAL macros.

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
    1.33 06/01/20 11:28:21 knielsen@stripped +18 -18
    Fix sol10-amd64-a compile failure, conflict with system headers.

# 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:	knielsen
# Host:	rt.int.sifira.dk
# Root:	/usr/local/mysql/mysql-5.1-new

--- 1.186/sql/log.cc	2006-01-19 03:56:00 +01:00
+++ 1.187/sql/log.cc	2006-01-20 12:33:53 +01:00
@@ -112,7 +112,7 @@
   SYNOPSIS
     open_log_table()
 
-    log_type   type of the log table to open: LOG_GENERAL or LOG_SLOW
+    log_type   type of the log table to open: QUERY_LOG_GENERAL or QUERY_LOG_SLOW
 
   DESCRIPTION
 
@@ -135,7 +135,7 @@
   DBUG_ENTER("open_log_table");
 
   switch (log_type) {
-  case LOG_GENERAL:
+  case QUERY_LOG_GENERAL:
     log_thd= general_log_thd;
     table= &general_log;
     /* clean up table before reuse/initial usage */
@@ -143,7 +143,7 @@
     table->alias= table->table_name= (char*) "general_log";
     table->table_name_length= 11;
     break;
-  case LOG_SLOW:
+  case QUERY_LOG_SLOW:
     log_thd= slow_log_thd;
     table= &slow_log;
     bzero((char*) table, sizeof(TABLE_LIST));
@@ -245,7 +245,7 @@
   SYNOPSIS
     reopen_log_table()
 
-    log_type   type of the log table to open: LOG_GENERAL or LOG_SLOW
+    log_type   type of the log table to open: QUERY_LOG_GENERAL or QUERY_LOG_SLOW
 
   DESCRIPTION
 
@@ -272,8 +272,8 @@
 
 void Log_to_csv_event_handler::cleanup()
 {
-  close_log_table(LOG_GENERAL, FALSE);
-  close_log_table(LOG_SLOW, FALSE);
+  close_log_table(QUERY_LOG_GENERAL, FALSE);
+  close_log_table(QUERY_LOG_SLOW, FALSE);
   logger.is_log_tables_initialized= FALSE;
 }
 
@@ -871,21 +871,21 @@
                                      TABLE_LIST *close_general_log)
 {
   VOID(pthread_mutex_lock(&LOCK_open));
-  close_log_table(LOG_GENERAL, TRUE);
-  close_log_table(LOG_SLOW, TRUE);
+  close_log_table(QUERY_LOG_GENERAL, TRUE);
+  close_log_table(QUERY_LOG_SLOW, TRUE);
   close_general_log->next_local= close_slow_log;
   query_cache_invalidate3(thd, close_general_log, 0);
   unlock_table_name(thd, close_slow_log);
   unlock_table_name(thd, close_general_log);
   VOID(pthread_mutex_unlock(&LOCK_open));
-  return reopen_log_table(LOG_SLOW) || reopen_log_table(LOG_GENERAL);
+  return reopen_log_table(QUERY_LOG_SLOW) || reopen_log_table(QUERY_LOG_GENERAL);
 }
 
 /* the parameters are unused for the log tables */
 bool Log_to_csv_event_handler::init()
 {
   /* we always open log tables. even if the logging is disabled */
-  return (open_log_table(LOG_GENERAL) || open_log_table(LOG_SLOW));
+  return (open_log_table(QUERY_LOG_GENERAL) || open_log_table(QUERY_LOG_SLOW));
 }
 
 int LOGGER::set_handlers(enum enum_printer error_log_printer,
@@ -923,7 +923,7 @@
   SYNOPSIS
     close_log_table()
 
-    log_type       type of the log table to close: LOG_GENERAL or LOG_SLOW
+    log_type       type of the log table to close: QUERY_LOG_GENERAL or QUERY_LOG_SLOW
     lock_in_use    Set to TRUE if the caller owns LOCK_open. FALSE otherwise.
 
   DESCRIPTION
@@ -943,11 +943,11 @@
     return;                                     /* do nothing */
 
   switch (log_type) {
-  case LOG_GENERAL:
+  case QUERY_LOG_GENERAL:
     log_thd= general_log_thd;
     table= &general_log;
     break;
-  case LOG_SLOW:
+  case QUERY_LOG_SLOW:
     log_thd= slow_log_thd;
     table= &slow_log;
     break;

--- 1.371/sql/mysql_priv.h	2006-01-19 22:40:51 +01:00
+++ 1.372/sql/mysql_priv.h	2006-01-20 12:33:53 +01:00
@@ -1189,8 +1189,8 @@
 void sql_print_information(const char *format, ...);
 
 /* type of the log table */
-#define LOG_SLOW 1
-#define LOG_GENERAL 2
+#define QUERY_LOG_SLOW 1
+#define QUERY_LOG_GENERAL 2
 
 int error_log_print(enum loglevel level, const char *format,
                     va_list args);

--- 1.171/sql/sql_delete.cc	2006-01-19 03:56:01 +01:00
+++ 1.172/sql/sql_delete.cc	2006-01-20 12:33:53 +01:00
@@ -920,8 +920,8 @@
     {
       lock_logger= 1;
       logger.lock();
-      logger.close_log_table(LOG_GENERAL, FALSE);
-      closed_log_tables= closed_log_tables | LOG_GENERAL;
+      logger.close_log_table(QUERY_LOG_GENERAL, FALSE);
+      closed_log_tables= closed_log_tables | QUERY_LOG_GENERAL;
     }
     else
       if (!my_strcasecmp(system_charset_info, table_list->table_name,
@@ -929,8 +929,8 @@
       {
         lock_logger= 1;
         logger.lock();
-        logger.close_log_table(LOG_SLOW, FALSE);
-        closed_log_tables= closed_log_tables | LOG_SLOW;
+        logger.close_log_table(QUERY_LOG_SLOW, FALSE);
+        closed_log_tables= closed_log_tables | QUERY_LOG_SLOW;
       }
   }
 
@@ -963,11 +963,11 @@
     unlock_table_name(thd, table_list);
     VOID(pthread_mutex_unlock(&LOCK_open));
 
-    if (closed_log_tables & LOG_SLOW)
-      logger.reopen_log_table(LOG_SLOW);
+    if (closed_log_tables & QUERY_LOG_SLOW)
+      logger.reopen_log_table(QUERY_LOG_SLOW);
 
-    if (closed_log_tables & LOG_GENERAL)
-      logger.reopen_log_table(LOG_GENERAL);
+    if (closed_log_tables & QUERY_LOG_GENERAL)
+      logger.reopen_log_table(QUERY_LOG_GENERAL);
     if (lock_logger)
       logger.unlock();
   }

--- 1.510/sql/sql_parse.cc	2006-01-19 03:56:01 +01:00
+++ 1.511/sql/sql_parse.cc	2006-01-20 13:22:34 +01:00
@@ -74,22 +74,37 @@
 const char *any_db="*any*";	// Special symbol for check_access
 
 LEX_STRING command_name[]={
-  STRING_WITH_LEN("Sleep"), STRING_WITH_LEN("Quit"),
-  STRING_WITH_LEN("Init DB"), STRING_WITH_LEN("Query"),
-  STRING_WITH_LEN("Field List"), STRING_WITH_LEN("Create DB"),
-  STRING_WITH_LEN("Drop DB"), STRING_WITH_LEN("Refresh"),
-  STRING_WITH_LEN("Shutdown"), STRING_WITH_LEN("Statistics"),
-  STRING_WITH_LEN("Processlist"), STRING_WITH_LEN("Connect"),
-  STRING_WITH_LEN("Kill"), STRING_WITH_LEN("Debug"),
-  STRING_WITH_LEN("Ping"), STRING_WITH_LEN("Time"),
-  STRING_WITH_LEN("Delayed insert"), STRING_WITH_LEN("Change user"),
-  STRING_WITH_LEN("Binlog Dump"), STRING_WITH_LEN("Table Dump"),
-  STRING_WITH_LEN("Connect Out"), STRING_WITH_LEN("Register Slave"),
-  STRING_WITH_LEN("Prepare"), STRING_WITH_LEN("Execute"),
-  STRING_WITH_LEN("Long Data"), STRING_WITH_LEN("Close stmt"),
-  STRING_WITH_LEN("Reset stmt"), STRING_WITH_LEN("Set option"),
-  STRING_WITH_LEN("Fetch"), STRING_WITH_LEN("Daemon"),
-  STRING_WITH_LEN("Error")  // Last command number
+  (char *)STRING_WITH_LEN("Sleep"),
+  (char *)STRING_WITH_LEN("Quit"),
+  (char *)STRING_WITH_LEN("Init DB"),
+  (char *)STRING_WITH_LEN("Query"),
+  (char *)STRING_WITH_LEN("Field List"),
+  (char *)STRING_WITH_LEN("Create DB"),
+  (char *)STRING_WITH_LEN("Drop DB"),
+  (char *)STRING_WITH_LEN("Refresh"),
+  (char *)STRING_WITH_LEN("Shutdown"),
+  (char *)STRING_WITH_LEN("Statistics"),
+  (char *)STRING_WITH_LEN("Processlist"),
+  (char *)STRING_WITH_LEN("Connect"),
+  (char *)STRING_WITH_LEN("Kill"),
+  (char *)STRING_WITH_LEN("Debug"),
+  (char *)STRING_WITH_LEN("Ping"),
+  (char *)STRING_WITH_LEN("Time"),
+  (char *)STRING_WITH_LEN("Delayed insert"),
+  (char *)STRING_WITH_LEN("Change user"),
+  (char *)STRING_WITH_LEN("Binlog Dump"),
+  (char *)STRING_WITH_LEN("Table Dump"),
+  (char *)STRING_WITH_LEN("Connect Out"),
+  (char *)STRING_WITH_LEN("Register Slave"),
+  (char *)STRING_WITH_LEN("Prepare"),
+  (char *)STRING_WITH_LEN("Execute"),
+  (char *)STRING_WITH_LEN("Long Data"),
+  (char *)STRING_WITH_LEN("Close stmt"),
+  (char *)STRING_WITH_LEN("Reset stmt"),
+  (char *)STRING_WITH_LEN("Set option"),
+  (char *)STRING_WITH_LEN("Fetch"),
+  (char *)STRING_WITH_LEN("Daemon"),
+  (char *)STRING_WITH_LEN("Error")  // Last command number
 };
 
 const char *xa_state_names[]={

--- 1.201/sql/table.cc	2006-01-19 03:56:01 +01:00
+++ 1.202/sql/table.cc	2006-01-20 12:33:53 +01:00
@@ -326,11 +326,11 @@
       {
         if (!my_strcasecmp(system_charset_info, share->table_name.str,
                            "general_log"))
-          share->log_table= LOG_GENERAL;
+          share->log_table= QUERY_LOG_GENERAL;
         else
           if (!my_strcasecmp(system_charset_info, share->table_name.str,
                              "slow_log"))
-            share->log_table= LOG_SLOW;
+            share->log_table= QUERY_LOG_SLOW;
       }
     }
     error_given= 1;

--- 1.32/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-17 07:36:41 +01:00
+++ 1.33/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-20 11:28:21 +01:00
@@ -1353,23 +1353,23 @@
 
 static struct Ev_t {
   enum {
-    INS = NdbDictionary::Event::_TE_INSERT,
-    DEL = NdbDictionary::Event::_TE_DELETE,
-    UPD = NdbDictionary::Event::_TE_UPDATE,
-    NUL = NdbDictionary::Event::_TE_NUL,
-    ERR = 255
+    enum_INS = NdbDictionary::Event::_TE_INSERT,
+    enum_DEL = NdbDictionary::Event::_TE_DELETE,
+    enum_UPD = NdbDictionary::Event::_TE_UPDATE,
+    enum_NUL = NdbDictionary::Event::_TE_NUL,
+    enum_ERR = 255
   };
   int t1, t2, t3;
 } ev_t[] = {
-  { Ev_t::INS, Ev_t::INS, Ev_t::ERR },
-  { Ev_t::INS, Ev_t::DEL, Ev_t::NUL }, //ok
-  { Ev_t::INS, Ev_t::UPD, Ev_t::INS }, //ok
-  { Ev_t::DEL, Ev_t::INS, Ev_t::UPD }, //ok
-  { Ev_t::DEL, Ev_t::DEL, Ev_t::ERR },
-  { Ev_t::DEL, Ev_t::UPD, Ev_t::ERR },
-  { Ev_t::UPD, Ev_t::INS, Ev_t::ERR },
-  { Ev_t::UPD, Ev_t::DEL, Ev_t::DEL }, //ok
-  { Ev_t::UPD, Ev_t::UPD, Ev_t::UPD }  //ok
+  { Ev_t::enum_INS, Ev_t::enum_INS, Ev_t::enum_ERR },
+  { Ev_t::enum_INS, Ev_t::enum_DEL, Ev_t::enum_NUL }, //ok
+  { Ev_t::enum_INS, Ev_t::enum_UPD, Ev_t::enum_INS }, //ok
+  { Ev_t::enum_DEL, Ev_t::enum_INS, Ev_t::enum_UPD }, //ok
+  { Ev_t::enum_DEL, Ev_t::enum_DEL, Ev_t::enum_ERR },
+  { Ev_t::enum_DEL, Ev_t::enum_UPD, Ev_t::enum_ERR },
+  { Ev_t::enum_UPD, Ev_t::enum_INS, Ev_t::enum_ERR },
+  { Ev_t::enum_UPD, Ev_t::enum_DEL, Ev_t::enum_DEL }, //ok
+  { Ev_t::enum_UPD, Ev_t::enum_UPD, Ev_t::enum_UPD }  //ok
 };
 
 /*
@@ -1424,7 +1424,7 @@
 
   int t1 = data->sdata->operation;
   int t2 = sdata->operation;
-  if (t1 == Ev_t::NUL)
+  if (t1 == Ev_t::enum_NUL)
     DBUG_RETURN_EVENT(copy_data(sdata, ptr2, data));
 
   Ev_t* tp = 0;
@@ -1435,7 +1435,7 @@
       break;
     }
   }
-  assert(tp != 0 && tp->t3 != Ev_t::ERR);
+  assert(tp != 0 && tp->t3 != Ev_t::enum_ERR);
 
   // save old data
   EventBufData olddata = *data;
@@ -1477,7 +1477,7 @@
     }
 
     // merge after values, new version overrides
-    if (tp->t3 != Ev_t::DEL)
+    if (tp->t3 != Ev_t::enum_DEL)
     {
       AttributeHeader ah;
       Uint32 i = ptr[0].sz;
@@ -1526,7 +1526,7 @@
     }
 
     // merge before values, old version overrides
-    if (tp->t3 != Ev_t::INS)
+    if (tp->t3 != Ev_t::enum_INS)
     {
       AttributeHeader ah;
       Uint32 k = 0;
Thread
bk commit into 5.1 tree (knielsen:1.2067)knielsen20 Jan