Re: Question on stability of results returned by C api mysql_fetch_row()

The Natural Philosopher <[email protected]> Thu, 11 Feb 2021 21:10:20 +0000
Newsgroups comp.databases.mysql
Organization A little, after lunch
Message-ID <[email protected]>
On 11/02/2021 19:24, Lew Pitcher wrote:
> On Thu, 11 Feb 2021 18:34:36 +0000, The Natural Philosopher wrote:
> 
>>>       row1 = mysql_fetch_row(results);
>>>     
>>>       /*
>>>       ** Do either of these calls to mysql_fetch_row() somehow ** alter
>>>       the results accessable from the row returned by ** the prior
>>>       call(s) to mysql_fetch_row()?
>>>       */
>>>       row2 = mysql_fetch_row(results);
>>>       row3 = mysql_fetch_row(results);
>>>     
>> No, but beware of reusing 'results' again to make another database
>> access *in between*.
>>
>> I've done that :-(
> 
> As have I. :-(
> 
> But not this time.  :-)
> 
> Thanks, TNP, for the reminder
> 
Another possibility is buffer overflow.
C doesn't wipe your bottom for you. plenty of scope for shitty code

-- 
"I guess a rattlesnake ain't risponsible fer bein' a rattlesnake, but ah 
puts mah heel on um jess the same if'n I catches him around mah chillun".