[MCOL-1170] ANALYZE doesn't work in ColumnStore Created: 2018-01-18 Updated: 2023-02-06 Resolved: 2023-01-17 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 22.08.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | David Hall (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Epic Link: | ColumnStore Compatibility Improvements |
| Sprint: | 2022-22, 2022-23 |
| Assigned for Review: | |
| Assigned for Testing: | |
| Description |
|
The following query fails in ColumnStore whether or not the table is a ColumnStore table:
|
| Comments |
| Comment by Elena Stepanova [ 2019-12-25 ] | |||||||||||||||||||||||||||||
|
For Columnstore as a MariaDB plugin, it returns ER_INTERNAL_ERROR instead:
| |||||||||||||||||||||||||||||
| Comment by Todd Stoffel (Inactive) [ 2021-01-16 ] | |||||||||||||||||||||||||||||
|
As of 5.5.1, this throws an 1815 error on every other run:
| |||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2022-10-13 ] | |||||||||||||||||||||||||||||
|
Analyze needs to be completed differently than a normal query. In server, when an ANALYZE is seen, it calls init_scan() immediatly followed by end_scan(). This leaves the sqlfrontendsession (ExeMgr) in a state where it expects to return rows. This patch fixes end_scan to clean this up via reads and writes to get everything back in synch. ANALYZE should display the number of rows to be displayed if the query were run normally. We have that information available, but no way to return it. A modification to server side to ask for that in the handler is required. This patch also includes a beautification of sqlfrontsessionthread.cpp since it looked bad. The important change is at line 774 | |||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2022-10-24 ] | |||||||||||||||||||||||||||||
|
Is this ready for QA? I don't see the PR being merged yet. I tested the latest build from Drone and the issue still exists. | |||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2022-10-24 ] | |||||||||||||||||||||||||||||
|
In a new MariaDB session, the first analyze query did not error out, but from the 2nd one and on. | |||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2023-01-17 ] | |||||||||||||||||||||||||||||
|
Build verified: 23.02 engine: 35c8359d90cefef25794bdc908aac9afc94b22a3 No error returned for repeated executions. |