Bug #70726 Wrong ResultSet.getType() values for internally generated ResultSets
| Submitted: | 25 Oct 2013 10:06 | Modified: | 28 Feb 2022 9:40 |
|---|---|---|---|
| Reporter: | Filipe Silva | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | Connector / J | Severity: | S3 (Non-critical) |
| Version: | 5.1.26 | OS: | Any |
| Assigned to: | Filipe Silva | CPU Architecture: | Any |
[25 Oct 2013 10:06]
Filipe Silva
[25 Oct 2013 10:07]
Filipe Silva
Verified by the reporter.
[2 Jan 2016 22:32]
Ramin Orujov
Test case
Attachment: Bug70726.java (text/x-java), 1.58 KiB.
[2 Jan 2016 22:34]
Ramin Orujov
Fixed this bug create table test.bug70726( id int primary key auto_increment, str varchar(20) ); insert into test.bug70726 values(null, 'a'); insert into test.bug70726 values(null, 'b'); insert into test.bug70726 values(null, 'c'); select * from test.bug70726; # output before fix, result set type is 0 raminorujov@ro--ubuntu:~/Downloads$ javac -cp .:mysql-connector-java-5.1.38-SNAPSHOT-bin.jar Bug70726.java raminorujov@ro--ubuntu:~/Downloads$ java -cp .:mysql-connector-java-5.1.38-SNAPSHOT-bin.jar Bug70726 insert count = 1 Statement.getGeneratedKeys() result set type = 0 id = 8 DatabaseMetaData.getCatalogs() result set type = 0 information_schema mysql performance_schema test raminorujov@ro--ubuntu:~/Downloads$ # output after fix, result set type is 1003 TYPE_FORWARD_ONLY raminorujov@ro--ubuntu:~/repo/ro-mysql-connector-j/mysql-connector-j$ cp build/mysql-connector-java-5.1.38-SNAPSHOT/mysql-connector-java-5.1.38-SNAPSHOT-bin.jar ~/Downloads/ raminorujov@ro--ubuntu:~/repo/ro-mysql-connector-j/mysql-connector-j$ cd ~/Downloads/ raminorujov@ro--ubuntu:~/Downloads$ java -cp .:mysql-connector-java-5.1.38-SNAPSHOT-bin.jar Bug70726 insert count = 1 Statement.getGeneratedKeys() result set type = 1003 id = 9 DatabaseMetaData.getCatalogs() result set type = 1003 information_schema mysql performance_schema test raminorujov@ro--ubuntu:~/Downloads$
[2 Jan 2016 22:37]
Ramin Orujov
Here is my fixed version. https://github.com/raminorujov/mysql-connector-j/commit/32c3844d997c0bc05e2c2c09866efe77c9...
[28 Feb 2022 9:40]
Alexander Soklakov
Posted by developer: This bug is not reproducible with the latest Connector/J 8.0. Connector/J 5.1 series came to EOL on Feb 9th, 2021, see https://www.mysql.com/support/eol-notice.html, so this bug will not be fixed there.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.062 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.