From: Craig L Russell Date: January 19 2012 9:59pm Subject: Re: Blob and NdbRecord List-Archive: http://lists.mysql.com/cluster/8243 Message-Id: <6CB46317-DACF-498E-AAAE-CF03B37EACF5@oracle.com> MIME-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi George, On Jan 19, 2012, at 1:41 PM, George Neill wrote: > Hi Folks, > > I am trying to understand the NDB blob API. When using > transaction->readTuple(), the address of the blob pointer is written > to the > ndb record. After looking at the ndb code, this does NOT appear to > happen > with insertTuple()/updateTuple() calls. I am just starting to dig > in to > the NDB code base and I am trying to understand why a blob pointer > is not > written/allocated in to the blob stream in these situations. Or > maybe the > question is better asked as, Why is the blob pointer written only when > using readTuple() ... Is there someone on the list who might have > background on this subject and wouldn't mind explaining it to me!? The way I understand it, with insertTuple you allocate space in the buffer for the blob header pointer before you call insertTuple. After that, you can call getBlobHandle on the NdbOperation that is returned, you get a brand new blob handle, and you can write to the blob. What you are doing is defining one operation with insertTuple and other (set of) operations when you operate on the blob handle. With readTuple, the ndbapi is responsible for giving you the blob handle based on the columns you request. In this case, getBlobHandle returns the blob handle that was sent by ndbd to the client. Craig > TIA, > George Craig L Russell Architect, Oracle http://db.apache.org/jdo 408 276-5638 mailto:Craig.Russell@stripped P.S. A good JDO? O, Gasp!