Skip to content
  • Mayank Prasad's avatar
    17545f17
    Bug #25244533 : PERFORMANCE_SCHEMA DIGESTS THE SAME QUERY TO MULTIPLE DIFFERENT · 17545f17
    Mayank Prasad authored
                    DIGESTS
    
    Issue:
    Part1:    When there are ';' in the queries, it is assumed that there are
              multiple queries and therefore parsing is done for each individual
              query one after another. During this process, digest storage was not
              reset properly and digest text of old query was seen.
    
    Fix:      Reset digest storage beforem start parsing next query.
    
    Part2:    In case of multiple queries, when a ';' is seen, its decided that
              current query ends here and a new query is about to start. But when
              delimiter is set to something else, for the first query, ';' is
              passed to digest code. As a result, ';' was seen in digest text and
              the digest created for the query is different from the digest which
              would have been created without the ';' in the query.
    
    Fix:      Parser passes NUL (i.e. 0) to digest code when the first query parsing
              is over. Therefore, in digest code when a NUL (0) is encountered, check
              the last token. If it is ';', pop it out so that it is not included in
              query digest text and digest.
    17545f17
    Bug #25244533 : PERFORMANCE_SCHEMA DIGESTS THE SAME QUERY TO MULTIPLE DIFFERENT
    Mayank Prasad authored
                    DIGESTS
    
    Issue:
    Part1:    When there are ';' in the queries, it is assumed that there are
              multiple queries and therefore parsing is done for each individual
              query one after another. During this process, digest storage was not
              reset properly and digest text of old query was seen.
    
    Fix:      Reset digest storage beforem start parsing next query.
    
    Part2:    In case of multiple queries, when a ';' is seen, its decided that
              current query ends here and a new query is about to start. But when
              delimiter is set to something else, for the first query, ';' is
              passed to digest code. As a result, ';' was seen in digest text and
              the digest created for the query is different from the digest which
              would have been created without the ';' in the query.
    
    Fix:      Parser passes NUL (i.e. 0) to digest code when the first query parsing
              is over. Therefore, in digest code when a NUL (0) is encountered, check
              the last token. If it is ';', pop it out so that it is not included in
              query digest text and digest.
Loading