Comment 7 for bug 1043836

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote : Re: Assertion failure with Query_cache on debug configuration

Ah, yes, I wanted to stress --debug part in the description since the crash is reproduceable only with that.

Regarding why it hits on --debug only, that is interesting.

However,

    if (header->result() == 0)
    {
      DBUG_PRINT("error", ("End of data with no result blocks; "
                           "Query '%s' removed from cache.", header->query()));
      /*
        Extra safety: empty result should not happen in the normal call
        to this function. In the release version that query should be ignored
        and removed from QC.
      */
      DBUG_ASSERT(0); ----------------> This is where it is crashing.
      free_query(query_block);
      unlock();
      DBUG_VOID_RETURN;
    }

Even though DBUG_PRINT is hit only when --debug is enabled I wonder how it changes the control flow if not present.