Bug #99103 all_vars.test is getting wasted

Submitted: 30 Mar 2020 4:32 Modified: 30 Mar 2020 6:40
Reporter: Venkatesh Duggirala (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.19, 8.0.11, 5.7.29 OS:Any
Assigned to: CPU Architecture:Any

[30 Mar 2020 4:32] Venkatesh Duggirala
Description:
A very minor bug (S7 Test cases)

A comment in mysql-test/suite/sys_vars/t/all_vars.test says 

#
# This test verifies that *all* system variables are tested
# by the sys_vars suite. For every system variable
# there must be a <variable_name>_basic.test file.
#

It also has a query that says "There should be *no* variables listed below. "

```
select variable_name as `There should be *no* variables listed below:` from t2
  left join t1 on variable_name=test_name where test_name is null ORDER BY variable_name;
```

Now look at the all_vars.result file , just below the line "There should be no variables listed below" has 40+ lines indicating 20+ system variables does not have tests in that format. 

How to repeat:
Code walk through

Suggested fix:
Two options 

In Option 1 : Two things should be done 

1) All those missing tests should be added 
<variable_name>_basic.test 

2) Convert those two selects in the query to "asserts" instead of saying 
"There should be *no* ......."  kind of text. 

In option 2: Just remove all_vars.test if it is not feasible to add tests for each variable :)
[30 Mar 2020 6:40] MySQL Verification Team
Dear Venkat,

Thank you for the bug report and feedback.

regards,
Umesh
[30 Mar 2020 6:45] MySQL Verification Team
- Lowest version checked 8.0.11, .result file has more or less same contents
[30 Mar 2020 6:46] MySQL Verification Team
-- 5.7.29 - looks like issue here as well

 cat ./suite/sys_vars/r/all_vars.result
create table t1 (test_name text);
create table t2 (variable_name text);
load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
insert into t2 select variable_name from information_schema.global_variables;
insert into t2 select variable_name from information_schema.session_variables;
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
update t2 set variable_name= replace(variable_name, "_HISTORY_LONG_", "_HL_");
update t2 set variable_name= replace(variable_name, "_HISTORY_", "_H_");
update t2 set variable_name= replace(variable_name, "_THROTTLE_QUERIES_NOT_USING_INDEXES", "_THROTTLE_QNI");
select variable_name as `There should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
There should be *no* long test name listed below:
select variable_name as `There should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null ORDER BY variable_name;
There should be *no* variables listed below:
DISABLED_STORAGE_ENGINES
DISABLED_STORAGE_ENGINES
KEYRING_OPERATIONS
KEYRING_OPERATIONS
TLS_VERSION
TLS_VERSION
drop table t1;
drop table t2;

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.