Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[NDB patch 2/2] Bug#26793 I_S query crashes in NDB

From: <stewart(at)mysql.com>
Date: Mon Jul 16 2007 - 03:26:12 EDT


If ::exteral_lock hadn't been called, we'd have no transaction set up, and performing ::info would lead to segfault.

On ::info with no active transaction, set one up and close it at end.

It looks like sql_show.cc is the only place that does this.... or at least the other places will be well hidden.

Index: ndb-work/sql/ha_ndbcluster.cc


  • ndb-work.orig/sql/ha_ndbcluster.cc 2007-07-16 16:32:31.504622889 +1000
    +++ ndb-work/sql/ha_ndbcluster.cc 2007-07-16 16:32:36.664916958 +1000
    @@ -3251,9 +3251,16 @@ void ha_ndbcluster::position(const byte int ha_ndbcluster::info(uint flag) { int result= 0;
    + bool need_unlock= false;
    DBUG_ENTER("info"); DBUG_PRINT("enter", ("flag: %d", flag)); -
    +
    + if(!m_active_trans)
    + {
    + need_unlock= true;
    + this->external_lock(current_thd, F_RDLCK);
    + }
    +
    if (flag & HA_STATUS_POS) DBUG_PRINT("info", ("HA_STATUS_POS")); if (flag & HA_STATUS_NO_LOCK) @@ -3329,6 +3336,9 @@ int ha_ndbcluster::info(uint flag) if(result == -1) result= HA_ERR_NO_CONNECTION;

+ if(need_unlock)
+ this->external_lock(current_thd, F_UNLCK);
+

   DBUG_RETURN(result);
 }  

--
Stewart Smith

-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Mon Jul 16 03:28:14 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 02 2007 - 01:56:44 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library