List:MySQL++« Previous MessageNext Message »
From:Adrian Cornish Date:April 13 2011 3:02am
Subject:Re: Crash in DBDriver::fetch_row on a heavily loaded system...
View as plain text  
On Tue, Apr 12, 2011 at 5:35 PM, Warren Young <mysqlpp@stripped> wrote:

> On 4/12/2011 4:45 PM, Dan Cook (dancook) wrote:
>
>> http://dev.mysql.com/doc/refman/5.5/en/null-mysql-store-result.html
>>>>
>>>
>> What kind of workaround are you suggesting?
>>
> Be careful, my mailer wrapped the URL in the big comment above.  Fix it
> before applying the patch.
>
> I don't see a way to distinguish the "malloc() returned 0" case, but if
> that's happening, installing this patch will cause your program to start
> crashing under the same conditions when *its* memory allocations fail
> instead.
>
> If that fixes your symptom, please let me know, as I haven't checked this
> into svn.  It is certainly incomplete, if for no other reason than because
> it doesn't fix Query::storein_set() as well.
>
> I also wonder whether, given the potential circumstances for this problem
> to crop up, if Query::result_empty() should have additional checks on conn_
> and conn->driver().
>

What about modifying either following 3 functions to check driver_ before
use

result.cpp:161 UseQueryResult::fetch_lengths() const  and
result.cpp:165 Row UseQueryResult::fetch_row() const
result.cpp.202 MYSQL_ROW UseQueryResult::fetch_raw_row() const

or

throwing from the constructor of ResultBase instead?

Checking each time that member is not null before use is going to be
inefficient but I dont know consequences of ResultBase constructor throwing.

I have not even begin to look where ResultBase is constructed - so this
could be a stupid idea

Thoughts?

Adrian

Thread
Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
  • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)13 Apr
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)15 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)16 Apr
              • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young16 Apr
          • SSQLS: Number of colomns in a tabledancook)19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
              • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
                  • RE: SSQLS: Number of colomns in a tabledancook)19 May
                  • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                    • Re: SSQLS: Number of colomns in a tableWarren Young20 May
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr