Bug #109243 | Judge whether the returned result set of the sql statement is incorrect | ||
---|---|---|---|
Submitted: | 30 Nov 2022 6:40 | Modified: | 22 Mar 2023 17:10 |
Reporter: | haiming zeng | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 8.0.27,8.028,8.0.29, 8.0.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Detect whether there is a result set |
[30 Nov 2022 6:40]
haiming zeng
[30 Nov 2022 9:58]
MySQL Verification Team
Hello haiming zeng, Thank you for the report and feedback. Could you please provide a test case(logical dump of the table consisting of create table and subset of data, exact query) to reproduce this issue at our end? Thank you. Related - Bug #108195 regards, Umesh
[1 Dec 2022 1:59]
haiming zeng
test case: "with temp1 as (select 1 a from dual) ,temp2 as (select 2 b from dual) select a,b from temp1,temp2". When there is no space between ",temp2" characters, there will be an error. It is correct if there are spaces. If there is no space between ",temp2", the "com.mysql.cj. QueryInfo#getContextForWithStatement" method returns the result ",temp2", resulting in an error in judging the final result; If there is a space between ", temp2", the "com.mysql.cj.QueryInfo#getContextForWithStatement" method returns the result "select", and the final result is judged to be normal. Therefore, it is recommended to change the code 689 line from "if (section. equalsIgnoreCase (", "))" to "if (section. contains (", "))".
[1 Dec 2022 6:20]
MySQL Verification Team
Thank you for the feedback. Verified as described. regards, Umesh
[5 Dec 2022 7:59]
haiming zeng
According to the above description, what is the verification result? Are you sure it is a bug? If the bug is confirmed, when will it be repaired?
[13 Jan 2023 2:25]
haiming zeng
When can this bug be fixed and released ?
[22 Mar 2023 17:10]
Daniel So
Posted by developer: Added the following entry to the C/J 8.0.33 changelog: "Before executing a query with Statement.executeQuery(query), Connector/J checks if the query is going to produce results and rejects it if it cannot. The check wrongly rejected queries that had a WITH clause in which there was no space after the comma between two common table expressions."