WL#9711: Remove *.require files

Affects: Server-8.0   —   Status: Complete   —   Priority: Medium

In MTR we have *.require files to perform checks. But these require files are not 
necessary to perform a check and adds an extra overhead. Instead of using require 
files, the check for the condition can be implemented in corresponding inc files.

Remove *.require files and replace the check in corresponding inc files. This will 
avoid creation of temporary file and file comparison between temporary file and 
the require file.

Used Documentation :
Functional requirements:
F-1: All the require file should be removed and the check should be implemented in 
     the corresponding inc files.

Non-functional requirements:
Avoid creation of temporary file and file comparison by removing all the *.require 
files and perform the necessary check in the inc files.

I-1: No new files
I-2: No new commands
I-3: No new tools
I-4: No impact on existing functionality
Most of our MTR tests have one or more checks like --source have_debug_sync.inc

Quite a few of these checks are currently implemented with two files,


1) have_debug_sync.inc

--require r/have_debug_sync.require
let $value= query_get_value(SHOW VARIABLES LIKE 'debug_sync', Value, 1);
eval SELECT ('$value' LIKE 'ON %') AS debug_sync;

2) have_debug_sync.require

The way this works is that '--require' causes the result of the next query to be 
written to a temporary file and then there is a file comparison of the temporary 
file and, in this case, have_debug_sync.require.

This sounds much slower than it could be. And also there are issues on Windows 
where a test can fail simply because of DOS/UNIX line ending differences.

This WL removes all these require files and implements the check in the 
corresponding inc file.


Modified have_debug_sync.inc:
let $have_debug_sync= query_get_value(SHOW VARIABLES LIKE 'debug_sync', Value, 
if ($have_debug_sync == 'No such row')
  skip Test requires 'have_debug_sync';

Here the check is done without a temporary files and without risk of DOS/UNIX 
line endings mattering.