[MCOL-1082] row_count() function always returns 0 for any engine Created: 2017-12-06 Updated: 2018-01-11 Resolved: 2017-12-06 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | 1.0.12, 1.1.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | David Thompson (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Epic Link: | ColumnStore Compatibility Improvements |
| Sprint: | 2017-24 |
| Description |
|
from kb questions: https://mariadb.com/kb/en/library/does-row_count-work-on-column-store-tables/
The same logic on a regular mariadb server will return 2 for row_count. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2017-12-06 ] |
|
I swear we had a ticket for this already but I can't find it |
| Comment by Andrew Hutchings (Inactive) [ 2017-12-06 ] |
|
ok, this is due to a bad bug fix from InfiniDB. Search for "Bug 5315" in sql_parse.cc to find it. The problem was that the rows affected (row_count()) persisted between DML queries. The 'fix' clears it on a non-ColumnStore select query, which basically covers "select row_count()". I've tested and the original InfiniDB bug appears to have gone. We can just remove this line. |
| Comment by Andrew Hutchings (Inactive) [ 2017-12-06 ] |
|
Pull request for 1.1 and 1.0 (since we can't merge up server code) For QA: See description, it should show '2' in the row_count() |
| Comment by Daniel Lee (Inactive) [ 2017-12-06 ] |
|
Builds verified: github source 1.0.12-1 /root/columnstore/mariadb-columnstore-server Merge pull request #81 from mariadb-corporation/ /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine Merge pull request #340 from mariadb-corporation/ 1.1.3-1 /root/columnstore/mariadb-columnstore-server Merge pull request #80 from mariadb-corporation/ /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine Merge pull request #341 from mariadb-corporation/ Verified mentioned test case. |