Skip to content
Snippets Groups Projects
  • Arseniy Volynets's avatar
    5b97eaa0
    fix: wrong sql cache byte counter · 5b97eaa0
    Arseniy Volynets authored and Dmitry Ivanov's avatar Dmitry Ivanov committed
    - If you prepare and execute statement with params
    in the projection and then unprepare the
    statement, byte counter may show the wrong value
    or even overflow.
    - The problem is that when we compile sql
    statement, we set parameter type to 'any'.
    But when we execute the statement we set parameter
    type to actual type. Then we use this type in
    calculation of estimated of sql cache entry size.
    This leads to different estimated sizes of cache
    entry during prepare and during unprepare after
    statement was executed
    - Fix this by resetting type to 'any' after
    executing the statement
    
    NO_DOC=picodata internal patch
    NO_CHANGELOG=picodata internal patch
    5b97eaa0
    History
    fix: wrong sql cache byte counter
    Arseniy Volynets authored and Dmitry Ivanov's avatar Dmitry Ivanov committed
    - If you prepare and execute statement with params
    in the projection and then unprepare the
    statement, byte counter may show the wrong value
    or even overflow.
    - The problem is that when we compile sql
    statement, we set parameter type to 'any'.
    But when we execute the statement we set parameter
    type to actual type. Then we use this type in
    calculation of estimated of sql cache entry size.
    This leads to different estimated sizes of cache
    entry during prepare and during unprepare after
    statement was executed
    - Fix this by resetting type to 'any' after
    executing the statement
    
    NO_DOC=picodata internal patch
    NO_CHANGELOG=picodata internal patch