Bug #68714 Remove literal statement digest values from perfschema tests
Submitted: 19 Mar 2013 9:33 Modified: 8 Apr 2015 16:00
Reporter: Alexey Kopytov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[19 Mar 2013 9:33] Alexey Kopytov
Description:
This is similar to bug #68635. A number of tests in the perfschema
suite enforce specific statement digests (i.e. hash values). The
problem is that those hash values are calculated using numeric token
IDs assigned by bison. Which means pretty much any change to the
parser grammar would also require updating hash values in a bunch of
tests. 

That also unnecessarily complicates server SQL syntax extension.

This is a request to avoid literal hash values (i.e. values in the
DIGEST_TEXT column) in perfschema tests, namely (in 5.6.10):

digest_table_full.result
rpl_gtid_func.result
statement_digest.result
statement_digest_consumers.result
statement_digest_long_query.result

How to repeat:
Add new parser tokens. Run the perfschema test suite.

Suggested fix:
--replace_column in the mentioned tests would fix the problem without
affecting test coverage.
[19 Mar 2013 10:16] MySQL Verification Team
Thank you for the bug report.
[9 Oct 2014 15:18] Laurynas Biveinis
bug 68714 fix for 5.7.5

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug68714.patch (application/octet-stream, text), 19.51 KiB.

[9 Oct 2014 15:19] Laurynas Biveinis
Patch credit to Sergei Glushchenko
[8 Apr 2015 15:56] Marc ALFF
Thanks for reporting this.

I agree digests printed in test result files are annoying,
as tests need to be updated each time the parser changes.

This happens for forks which have syntax changes, but also upstream,
when new features affecting syntax are implemented.

However, simply removing all digests from the test suite is not desirable.
Digests, for a given parser, are supposed to be stable and give the same result for a given query.
This property needs to be tested and enforced, so that the test suite can detect spurious failures and expose bugs, for safety.

This is all the more important now that features like query rewrite plugins, of the firewall, depends on digests.