[MDEV-13300] Query cache doesn't take in account CLIENT_DEPRECATE_EOF capability Created: 2017-07-12 Updated: 2022-04-21 Resolved: 2017-08-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Query Cache |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Diego Dupin | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Query cache doesn't take in account capability CLIENT_DEPRECATE_EOF. This flag change query result data : suppressing some EOF, or replacing some with OK_Packet for example. If a driver that doesn't set CLIENT_DEPRECATE_EOF capability execute a query that can be cached, another driver that support CLIENT_DEPRECATE_EOF will have a resultset in a format not expected if executing the same query. (the opposite is true too). In term of error with java driver, resulting errors can be :
or
workaround is to disable query cache (see documentation) or to not mix drivers that support CLIENT_DEPRECATE_EOF with other that don't support this capability |
| Comments |
| Comment by Jamie Jackson [ 2017-07-13 ] | ||||||||||||||||||||||||||||||
|
Please add 5.5.56 to the list of known affected versions (so 5.5.x is represented). | ||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-07-14 ] | ||||||||||||||||||||||||||||||
|
Jamie Jackson, Could you please clarify how it affects 5.5? | ||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-07-14 ] | ||||||||||||||||||||||||||||||
|
Assuming that the server has been started on port 3306 with query_cache_type=1, query_cache_size=1048576, the database is empty and the query cache has been reset: If I first run the above test with java-client 1.5.5, and then 2.0.3, then I get
If I first run it with java-client 2.0.3, and then 1.5.5, then I get
If I modify the test so that the table is empty (CREATE TABLE IF NOT EXISTS t1 (i INT) AS SELECT 1 AS i LIMIT 0), and run the test first with 2.0.3 and then 1.5.5, it hangs with 1.5.5. | ||||||||||||||||||||||||||||||
| Comment by Jamie Jackson [ 2017-07-14 ] | ||||||||||||||||||||||||||||||
|
elenst, please see | ||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-07-14 ] | ||||||||||||||||||||||||||||||
|
Jamie Jackson, thanks for the clarification. diego dupin, sanja, I'll leave it to you to figure out between yourselves how this issue can affect 5.5, I don't get it. Please do update the Affects version/s if necessary. | ||||||||||||||||||||||||||||||
| Comment by Diego Dupin [ 2017-07-17 ] | ||||||||||||||||||||||||||||||
|
Jamie Jackson, elenst, Sorry, I forgot that I've reopen the ticket | ||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-08-04 ] | ||||||||||||||||||||||||||||||
|
revision-id: ccca8487b708fae5320c295938e8266860d81281 (mariadb-10.2.7-20-gccca8487b70)
take into account new capabilty flag which has influence on result format. — | ||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-08-04 ] | ||||||||||||||||||||||||||||||
|
github tree is bb-10.2- | ||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-08-04 ] | ||||||||||||||||||||||||||||||
|
responded till I have time to understand java technology | ||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2017-08-07 ] | ||||||||||||||||||||||||||||||
|
Fix for Connector-J is confirmed. Connector-C has no support of this feature. | ||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-08-09 ] | ||||||||||||||||||||||||||||||
|
ok to push |