Bug #119645 a bug in QueryInfo with version of mysql-connector-j-9.5.0
Submitted: 8 Jan 7:42 Modified: 12 Jan 19:18
Reporter: shiyan xiong Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:9.5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: bug in QueryInfo

[8 Jan 7:42] shiyan xiong
Description:
There is a bug in the driver with version of mysql-connector-j-9.5.0. In the containsIntoClause method at line 855 of the QueryInfo class, a minor logic flaw causes the method to return QueryReturnType.DOES_NOT_PRODUCE_RESULT_SET if a SELECT statement contains the keyword "INTO". This can lead to failures and errors in certain cases. For example, a query like select is_join_topic as isJoinTopic from xx where id=xx contains the substring "into" (within "isJoinTopic"), but it is not actually a SELECT ... INTO statement, yet it may still trigger the bug and cause an error.

How to repeat:
select is_join_topic as isJoinTopic from xx where id=xx

Suggested fix:
remove containsIntoClause
[9 Jan 10:53] Tino Schöllhorn
this seems related to https://bugs.mysql.com/bug.php?id=119641
[12 Jan 19:18] Filipe Silva
Thank you for your interest in MySQL Connector/J and for reporting this bug. This issue is a duplicate of Bug#119245.