[MDEV-27260] Implement and evaluate select handler for Spider Created: 2021-12-14 Updated: 2023-09-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Nayuta Yanagisawa (Inactive) | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
Spider's GROUP BY handler (GBH) implementation is one of the prominent sources of the Spider bugs. Implement the select handler for Spider and evaluate if we can replace the existing GBH with the select handler. The select handler intercepts the query processing much earlier than GBH. I expect that this makes it easier for Spider to generate queries for data nodes. Related documents:
|
| Comments |
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-02-21 ] | |||||
|
item->name.str maintains the string expression corresponding to the item. The problem here is that item->name.str may contain database name and table name as you can see in the following example.
On the other hand, the name of a table on a Spider node is not necessarily the same as that on a data node. This also holds for database names. Thus, it seems to be difficult to utilize item->name.str in the Spider query generation. | |||||
| Comment by Roel Van de Paar [ 2022-02-21 ] | |||||
|
Not sure if it helps at all, but here is how I extract crashing queries from core dumps in gdb (automated in scripts):
There also used to be do_command::thd->m_query_string.str, but it is not used for MariaDB. | |||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-02-22 ] | |||||
|
Thank you for your comment. I think the full query string doesn't help Spider because the name of a table on a Spider node is not necessarily the same as that on a data node and thus Spider need to replace it. | |||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-03-04 ] | |||||
|
I write down ideas in a brainstorming manner. It seems not to be that difficult to replace a database or a table name, in item->name.str, with the corresponding database or table name in the remote data node. Isn't this replacement enough for generating queries for data nodes? |