Bug #39156 | active streaming result set error | ||
---|---|---|---|
Submitted: | 1 Sep 2008 14:01 | Modified: | 3 Sep 2008 10:32 |
Reporter: | Umberto Cappellini | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 6.0.5-alpha-log | OS: | Linux (Linux fataxp 2.6.14.3-vs2.0.1cisco) |
Assigned to: | CPU Architecture: | Any | |
Tags: | streaming result set |
[1 Sep 2008 14:01]
Umberto Cappellini
[1 Sep 2008 15:08]
Valeriy Kravchuk
Thank you for a problem report. What exact version of Connector/J do you use?
[3 Sep 2008 9:06]
Umberto Cappellini
Hello, I'm using mysql-connector-java-5.0.5-bin.jar Java version "1.5.0_15" (Sun)
[3 Sep 2008 9:51]
Sveta Smirnova
Thank you for the feedback. According to http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-implementation-notes.html: If the statement is within scope of a transaction, then locks are released when the transaction completes (which implies that the statement needs to complete first). As with most other databases, statements are not complete until all the results pending on the statement are read or the active result set for the statement is closed. Therefore, if using streaming results, you should process them as quickly as possible if you want to maintain concurrent access to the tables referenced by the statement producing the result set. With "almost empty" initial table Reader finishes quickly and you just miss error which you see when the table contain more data. So I close the report as "Not a Bug".
[3 Sep 2008 10:32]
Umberto Cappellini
Thanks for the answer. Indeed the table actually read in streaming may be concurrently accessed in write mode, using transactions. But I find this a quite usual use case for a DB, it should just lock until the previous (streaming) query in completed and then release the lock. I don't see the reason to throw an exception for it and to require the client to "process them as quickly as possible". We deploy the same application (= same code) on Oracle, and in streaming mode we're able to process the same table with hundreds of thousand rows, which may keep the table locked for hours, without the need to release exceptions. Lastly, choosing a streamed or non-streamed mode should affect just the performance and the memory usage of the application, and not the expected behavior. If in a non-streamed mode I'm able to grow up such table as much I want, I would expect the same using streamed queries.
[3 Sep 2008 11:11]
Sveta Smirnova
Thank you for the feedback. I can verify this report as feature request if you want, although can not guarantee this will be implemented: we should check if what you requested is compatible with the standard and MySQL server.
[17 Jul 2018 22:02]
Girish Iyer
Any update on this fix / enhancement?
[31 Aug 2018 6:35]
dong chunguo
Is there something done.