[MCOL-3533] SELECT returns unusual results with new column Created: 2019-09-30 Updated: 2023-03-06 Resolved: 2023-03-06 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | N/A |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Critical |
| Reporter: | David Hill (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Customer reported: A ColumnStore table recently modified with added column named `active` (tinyint with 1 as default val). Querying table with new column in WHERE does not give expected result set. Same results after reboot of db stack. query in following comments to be protected |
| Comments |
| Comment by David Hill (Inactive) [ 2019-09-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
requested from development and results select calsettrace(1); select option_id from option_onelot where market_date = '2017-12-01' and option_id = 818449 and active = 1; select calgettrace(0); select calsettrace(1); select option_id from option_onelot where market_date = '2017-12-01' and option_id = 818449 and active = 1; select calgettrace(0);
----------------
----------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2019-09-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
More info from customer: I have a hunch that it could have something to do with that default value being added for each record when adding that column but not quite everywhere. It is also interesting to me that those records affected by this weird behavior are the ones that are the OLDEST in the table. We are augmenting the table every day and we started from December 2017. Those records that sit there from beginnning of December up until Dec. 18 2017 are returning these weird results. The newer ones behave nicer - meaning we did not see a behavior like this for those rows. This is what scares me when I am thinking about our production DB as reliable data-store. It might relate to the entire extension (did not actually check if it is full 8 mil. of rows or not but it could be because daily amounts suggest it could fill up 8 mil. rows until Dec. 18. Maybe there is no significance in that ^^^ paragraph but I thought it is going to be useful to mention. To add more context, below is output from calgettrace. Also, just fyi, selecting the option_id col while also filtering on it isn't the actual query we use in application but was what we ended up using for debugging purposes which shows the same issue. Wanted to point that out in case you were wondering why we were doing that in the first place MariaDB [dds_main]> select calgettrace(1);
ses:154 st: 0 finished at 2019-09-30 15:26:48.269941; PhyI/O-0; CacheI/O-9128; MsgsSent-1024; MsgsRvcd-1024; BlocksTouched-9128; BlockedFifoIn/Out-0/0; output size-0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2019-09-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tried to reproduce with list 1 row and couldn't. select * from option_onelot;
----------
---------- MariaDB [DataDock]> select count(1) from option_onelot where option_id = 818449 and market_date = '2017-12-01';
----------
---------- MariaDB [DataDock]> alter table option_onelot add column active tinyint(1) DEFAULT 1; MariaDB [DataDock]> select option_id from option_onelot where market_date = '2017-12-01' and option_id = 818449 and active = 1;
-----------
----------- MariaDB [DataDock]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Todd Stoffel (Inactive) [ 2023-03-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This ticket was opened prior to convergence with the server. It may have been rendered obsolete. If this issue still exists in a modern version, please open a new request. |