Skip to content
  • Ajo Robert's avatar
    0720773a
    Bug#22559575 "the statement (1) has no open cursor" pops · 0720773a
    Ajo Robert authored
                   sometimes with prepared+query_cache
    
    Analysis
    =========
    Prepare and execute flow (Client API) with CURSOR_TYPE_READ_ONLY
    followed by CURSOR_TYPE_NO_CURSOR fails while fetching
    result from a query cache enabled server.
    
    First prepare and execute with CURSOR_TYPE_NO_CURSOR
    saves the query result to query cache. Second request
    with CURSOR_TYPE_NO_CURSOR will hit query cache and return
    without considering cursor status. This leads to client
    requesting for cursor fetch and results in error from server
    as there is no open cursor associated with the statement.
    
    Fix:
    =======
    Execution with CURSOR_TYPE_READ_ONLY does not use cached
    result. There is no point in caching such querries. Marked
    safe_to_cache_query=0 for cursor enabled query.
    0720773a
    Bug#22559575 "the statement (1) has no open cursor" pops
    Ajo Robert authored
                   sometimes with prepared+query_cache
    
    Analysis
    =========
    Prepare and execute flow (Client API) with CURSOR_TYPE_READ_ONLY
    followed by CURSOR_TYPE_NO_CURSOR fails while fetching
    result from a query cache enabled server.
    
    First prepare and execute with CURSOR_TYPE_NO_CURSOR
    saves the query result to query cache. Second request
    with CURSOR_TYPE_NO_CURSOR will hit query cache and return
    without considering cursor status. This leads to client
    requesting for cursor fetch and results in error from server
    as there is no open cursor associated with the statement.
    
    Fix:
    =======
    Execution with CURSOR_TYPE_READ_ONLY does not use cached
    result. There is no point in caching such querries. Marked
    safe_to_cache_query=0 for cursor enabled query.
Loading