Commit a51a8c1e authored by unknown's avatar unknown
Browse files

Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj

into  dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.0/bug21799


ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/ndbapi/ndberror.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
parents cc8b2bd2 934b9a4e
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -862,6 +862,15 @@ extern "C" {
				      enum ndb_mgm_event_category category,
				      int level,
				      struct ndb_mgm_reply* reply);
  /**
   * get log category and levels 
   *
   * @param   handle        NDB management handle.
   * @return                A vector of twelve elements,
   *                        where each element contains
   *                        loglevel of corresponding category
   */
  const unsigned int *ndb_mgm_get_clusterlog_loglevel(NdbMgmHandle handle);

  /** @} *********************************************************************/
  /**
@@ -1141,6 +1150,11 @@ extern "C" {
				      enum ndb_mgm_event_category c,
				      int l, struct ndb_mgm_reply* r)
  { return ndb_mgm_set_clusterlog_loglevel(h,n,c,l,r); }

  inline
  const unsigned int *ndb_mgm_get_loglevel_clusterlog(NdbMgmHandle h)
  { return ndb_mgm_get_clusterlog_loglevel(h); }

#endif

#ifdef __cplusplus
+8 −0
Original line number Diff line number Diff line
@@ -28,6 +28,14 @@
class File_class
{
public:
  /**
   * Returns time for last contents modification of a file.
   *
   * @param aFileName a filename to check.
   * @return the time for last contents modificaton of the file.
   */
  static time_t mtime(const char* aFileName);      

  /**
   * Returns true if the file exist.
   *
+10 −1
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ FileLogHandler::createNewFile()
  bool rc = true;	
  int fileNo = 1;
  char newName[PATH_MAX];
  time_t newMtime, preMtime = 0;

  do
  {
@@ -159,7 +160,15 @@ FileLogHandler::createNewFile()
    }		
    BaseString::snprintf(newName, sizeof(newName),
	       "%s.%d", m_pLogFile->getName(), fileNo++); 
    
    newMtime = File_class::mtime(newName);
    if (newMtime < preMtime) 
    {
      break;
    }
    else
    {
      preMtime = newMtime;
    }
  } while (File_class::exists(newName));
  
  m_pLogFile->close();	
+12 −0
Original line number Diff line number Diff line
@@ -24,6 +24,18 @@
//
// PUBLIC
//
time_t 
File_class::mtime(const char* aFileName)
{
  MY_STAT stmp;
  time_t rc = 0;

  if (my_stat(aFileName, &stmp, MYF(0)) != NULL) {
    rc = stmp.st_mtime;
  }

  return rc;
}

bool 
File_class::exists(const char* aFileName)
+7 −1
Original line number Diff line number Diff line
@@ -6488,7 +6488,13 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
        }//for
      }
    }
    ndbrequire(count == (2 + noOfReplicas * noOfFragments)); 
    if(count != (2 + noOfReplicas * noOfFragments)){
        char buf[255];
        BaseString::snprintf(buf, sizeof(buf),
                           "Illegal configuration change: NoOfReplicas."
                           " Can't be applied online ");
        progError(__LINE__, NDBD_EXIT_INVALID_CONFIG, buf);
    }
    
    CreateFragmentationConf * const conf = 
      (CreateFragmentationConf*)signal->getDataPtrSend();
Loading