Bug #112090 SHOW ENGINE command runs forever when using cursor fetch
Submitted: 16 Aug 2023 16:25 Modified: 17 Aug 2023 6:11
Reporter: Ulf Weiland Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:8.1.0, 8.0.33 OS:MacOS
Assigned to: CPU Architecture:ARM

[16 Aug 2023 16:25] Ulf Weiland
Description:
Running command show engine `BLACKHOLE` STATUS' runs forever when running using cursor fetch. Performing Statement.cancel does not help. 
Running the same command without cursor fetch runs OK.

The same error occurs for a number of storage engines listed by the "show engines" command. Example ARCHIVE, BLACKHOLE, CSV, MEMORY, MRG_MYISAM, MyISAM.

How to repeat:
The 

Run the attached java class ShowEngineStatusNotWorking with the driver in the classpath. The program issues show engine commands on separate connection.

The program also prints a result like the following. One can see that BLACKHOLE does timeout after waiting 30 seconds.

QUERY: 'show engine `InnoDB` STATUS' cursorFetch:true  Results: 1  Exec time:213ms
QUERY: 'show engine `InnoDB` STATUS' cursorFetch:false  Results: 1  Exec time:16ms
QUERY: 'show engine `BLACKHOLE` STATUS' cursorFetch:true   TimeoutException (30secs)
QUERY: 'show engine `BLACKHOLE` STATUS' cursorFetch:false  Results: none  Exec time:20ms

Versions used 
Database: MySQL 8.1.0
MySQL Connector/J: mysql-connector-j-8.1.0 (Revision: 7b6f9a337afe6ccb41823df485bf848ca7952b09)
[16 Aug 2023 16:26] Ulf Weiland
Used to reproduce the error

Attachment: ShowEngineStatusNotWorking.java (application/octet-stream, text), 4.19 KiB.

[17 Aug 2023 6:11] MySQL Verification Team
Hello Ulf Weiland,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh