Bug #79118 Bogus test snippet in main.audit_plugin_2

Submitted: 4 Nov 2015 9:58 Modified: 20 Nov 2015 0:19
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.9 OS:Any
Assigned to: CPU Architecture:Any
Tags: mtr

[4 Nov 2015 9:58] Laurynas Biveinis
Description:
main.audit_plugin_2 contains the following bit:

# Change user with 'mysql' as initial database
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_AUDIT_API_ABORT
--change_user user2,,mysql
SELECT USER(), CURRENT_USER();

This looks like it would try to test that change_user fails by ER_AUDIT_API_ABORT error. But this cannot possibly work, because change_user does not take preceding error command into account, see bug 79117.

Since the testcase execution does not fail, it means that change_user actually succeeds, and can be verified by putting another SELECT USER(), CURRENT_USER() before it. And error command can be removed and the testcase will not even need a re-record to pass.

Failing change_user is tested above (--error 1; --exec echo "--change_user user2,,mysql" | $MYSQL_TEST 2>&1), so this bit can be simply removed.

It is also not clear what --replace_result is doing there, as this is not a "connect."

How to repeat:
See above

Suggested fix:
Remove it
[4 Nov 2015 11:47] MySQL Verification Team
Hello Laurynas,

Thank you for the report.

Thanks,
Umesh
[20 Nov 2015 0:19] Paul DuBois
Fixed in 5.7.10. Changes for test suite. No changelog entry needed.

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

Page generated in 0.052 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.