[MXS-4503] schemarouter returns empty response when querying INFORMATION_SCHEMA.TABLES Created: 2023-02-07 Updated: 2023-02-08 Resolved: 2023-02-08 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | schemarouter |
| Affects Version/s: | 6.4.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Ivan | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
NAME="Oracle Linux Server" |
||
| Attachments: |
|
| Description |
|
if i try to query (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'db_name' but if i try to query via readconnroute or readwritesplit , query response correct , i have list of tables from select database. |
| Comments |
| Comment by Ivan [ 2023-02-07 ] |
|
@Markus can you help? Please! |
| Comment by markus makela [ 2023-02-08 ] |
|
Can you turn on log_info and see where the query goes? It's very likely that the query ends up being routed to a node that doesn't have that table and since the query itself doesn't use the table, it gets routed to the first available node. The table in the query is a string and not an identifier and the schemarouter does not parse strings as table names when querying information_schema. |
| Comment by Ivan [ 2023-02-08 ] |
|
Yes, I checked, the request through the schemerouter goes to another cluster, where there is no necessary base (because the base INFORMATION_SCHEMA is on each node of the cluster.), and as a result I get an empty response. Whether it is possible to bind such request to the server on which this basis is present? for example within the session? |
| Comment by markus makela [ 2023-02-08 ] |
|
You can use the hintfilter and add a routing hint to the queries to control where they go. The namedserverfilter is an easier alternative if you don't have the option of changing the application's SQL. |
| Comment by markus makela [ 2023-02-08 ] |
|
I'm closing this as Not a Bug as it's expected and documented behavior. |
| Comment by Ivan [ 2023-02-08 ] |
|
Ok! Thx!!!! |