MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:February 22 2008 4:47pm
Subject:Re: bk commit into 5.1 tree (jmiller:1.2529)
View as plain text  
Looks ok!

/ Magnus

Jonathan Miller skrev:
> Below is the list of changes that have just been committed into a local
> 5.1 repository of jmiller.  When jmiller 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, 2008-02-22 11:01:37-06:00, jmiller@stripped +3 -0
>   DbUtil.cpp:
>     correcting a segfault bug
>   DbUtil.hpp, NdbRepStress.cpp:
>     Some simple corrections
> 
>   storage/ndb/test/include/DbUtil.hpp@stripped, 2008-02-22 11:01:29-06:00,
> jmiller@stripped +5 -1
>     Some simple corrections
> 
>   storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp@stripped, 2008-02-22 11:01:02-06:00,
> jmiller@stripped +3 -1
>     Some simple corrections
> 
>   storage/ndb/test/src/DbUtil.cpp@stripped, 2008-02-22 11:01:18-06:00, jmiller@stripped
> +13 -6
>     correcting a segfault bug
> 
> diff -Nrup a/storage/ndb/test/include/DbUtil.hpp
> b/storage/ndb/test/include/DbUtil.hpp
> --- a/storage/ndb/test/include/DbUtil.hpp	2008-01-18 15:55:00 -06:00
> +++ b/storage/ndb/test/include/DbUtil.hpp	2008-02-22 11:01:29 -06:00
> @@ -47,7 +47,9 @@ DIE_UNLESS(r == 0);\
>  }
>  
>  
> -class SqlResultSet : public Properties {
> +class SqlResultSet : public Properties 
> +{
> +
>  public:
>  
>    // Get row with number
> @@ -73,6 +75,7 @@ public:
>    const char* mysqlSqlstate();
>  
>  private:
> +
>    uint get_int(const char* name);
>    const char* get_string(const char* name);
>  
> @@ -86,6 +89,7 @@ private:
>  
>  class DbUtil
>  {
> +
>  public:
>  
>    DbUtil(MYSQL* mysql);
> diff -Nrup a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp
> b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp
> --- a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp	2008-02-01 13:39:53 -06:00
> +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp	2008-02-22 11:01:02 -06:00
> @@ -45,6 +45,7 @@ urandom(uint m)
>    return r;
>  }
>  
> +
>  #define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb()
>  /*
>  */
> @@ -448,7 +449,8 @@ TESTCASE("PHASE_I_Stress","Basic Replica
>  }
>  NDBT_TESTSUITE_END(NdbRepStress);
>  
> -int main(int argc, const char** argv){
> +int main(int argc, const char** argv)
> +{
>    ndb_init();
>    NdbRepStress.setCreateAllTables(true);
>    return NdbRepStress.execute(argc, argv);
> diff -Nrup a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp
> --- a/storage/ndb/test/src/DbUtil.cpp	2008-01-18 15:55:00 -06:00
> +++ b/storage/ndb/test/src/DbUtil.cpp	2008-02-22 11:01:18 -06:00
> @@ -61,7 +61,8 @@ DbUtil::DbUtil(MYSQL* mysql):
>  
>  
>  bool
> -DbUtil::isConnected(){
> +DbUtil::isConnected()
> +{
>    if (m_connected == true)
>    {
>      assert(m_mysql);
> @@ -72,7 +73,8 @@ DbUtil::isConnected(){
>  
>  
>  bool
> -DbUtil::waitConnected(int timeout) {
> +DbUtil::waitConnected(int timeout) 
> +{
>    timeout*= 10;
>    while(!isConnected()){
>      if (timeout-- == 0)
> @@ -82,10 +84,11 @@ DbUtil::waitConnected(int timeout) {
>    return true;
>  }
>  
> -
>  void
> -DbUtil::disconnect(){
> -  if (m_mysql != NULL){
> +DbUtil::disconnect()
> +{
> +  if (m_mysql != NULL)
> +  {
>      if (m_free_mysql)
>        mysql_close(m_mysql);
>      m_mysql= NULL;
> @@ -98,7 +101,8 @@ DbUtil::disconnect(){
>  
>  DbUtil::~DbUtil()
>  {
> -  disconnect();
> +  if(isConnected())
> +    disconnect();
>  }
>  
>  /* Database Login */
> @@ -164,6 +168,8 @@ DbUtil::connect()
>        mysql_options(m_mysql, MYSQL_READ_DEFAULT_GROUP, m_default_group.c_str()))
>    {
>      myerror("DB Connect -> mysql_options failed");
> +    mysql_close(m_mysql)
> +    m_mysql=NULL;
>      return DBU_FAILED;
>    }
>  
> @@ -177,6 +183,7 @@ DbUtil::connect()
>    {
>      myerror("connection failed");
>      mysql_close(m_mysql);
> +    m_mysql=NULL;
>      return DBU_FAILED;
>    }
>    selectDb();
> 

Thread
bk commit into 5.1 tree (jmiller:1.2529)Jonathan Miller22 Feb
  • Re: bk commit into 5.1 tree (jmiller:1.2529)Magnus Svensson22 Feb