Bug #106318 | FORCE INDEX doesn't take effect when set jdbc param `useServerPrepStmts=true` | ||
---|---|---|---|
Submitted: | 28 Jan 2022 2:01 | Modified: | 10 Feb 2022 6:21 |
Reporter: | chen yi (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 8.0.25 | OS: | CentOS (CentOS Linux release 8.2.2004 (Core) ) |
Assigned to: | CPU Architecture: | x86 (Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)) |
[28 Jan 2022 2:01]
chen yi
[28 Jan 2022 14:41]
MySQL Verification Team
Hi, What version of JDBC are you using? Thanks
[29 Jan 2022 2:09]
chen yi
Hi JDBC version same as MySql server version: 8.0.25
[31 Jan 2022 15:39]
MySQL Verification Team
Hi, This seems to be data specific. With data we can create it does not reproduce. I will verify this non the less for the connector team to take a look. thanks
[9 Feb 2022 16:08]
MySQL Verification Team
Hi, This is not connector issue but change on server side as we are deprecating force index ... https://dev.mysql.com/doc/refman/8.0/en/index-hints.html says: The FORCE INDEX hint acts like USE INDEX (index_list), with the addition that a table scan is assumed to be very expensive... Note As of MySQL 8.0.20, the server supports the index-level optimizer hints JOIN_INDEX, GROUP_INDEX, ORDER_INDEX, and INDEX, which are equivalent to and intended to supersede FORCE INDEX index hints, as well as the NO_JOIN_INDEX, NO_GROUP_INDEX, NO_ORDER_INDEX, and NO_INDEX optimizer hints, which are equivalent to and intended to supersede IGNORE INDEX index hints. Thus, you should expect USE INDEX, FORCE INDEX, and IGNORE INDEX to be deprecated in a future release of MySQL, and at some time thereafter to be removed altogether. For more information, see Index-Level Optimizer Hints.
[10 Feb 2022 6:21]
chen yi
Hi We already try index-level optimizer hints but same as bug described. We perpared to install the newest Mysql version 8.0.28 and try reproduce again. I'll let you known if something found.
[10 Feb 2022 12:05]
MySQL Verification Team
Hi, Feel free to test but I do not believe there will be any changes since nothing wrt this is changed in the new version. The issue here is I cannot reproduce this as I do not have your data. If you can make a reproducible test case with data it will be much easier. This is unrelated to the connector from what I see and is changed behavior on the server side. Thanks