[MCOL-129] INSERTIONS are lost, no ERROR reported for out-of-range values in STRICT mode Created: 2016-06-12 Updated: 2016-11-23 Resolved: 2016-11-23 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | DMLProc |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Justin Swanhart (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | relnote | ||
| Sprint: | 2016-21, 2016-22, 2016-23 |
| Description |
| Comments |
| Comment by Justin Swanhart (Inactive) [ 2016-06-20 ] | ||||||||||
|
THERE SHOULD BE TWO ROWS IN THE COLUMNSTORE TABLE. COLUMNSTORE LOSES INSERTIONS! | ||||||||||
| Comment by Justin Swanhart (Inactive) [ 2016-06-20 ] | ||||||||||
The problem happens only on the "reserved" values for columnstore:MariaDB [test]> set sql_mode=strict_all_tables;Query OK, 0 rows affected (0.00 sec) MariaDB [test]> create table lost(c1 tinyint) engine=columnstore; CORRECT behaviorMariaDB [test]> insert into lost values(10000000); BUGGY behaviorMariaDB [test]> insert into lost values(-128); MariaDB [test]> select * from lost; | ||||||||||
| Comment by Justin Swanhart (Inactive) [ 2016-06-20 ] | ||||||||||
|
There is no way to work around this issue - STRICT MODE is the recommended mode to prevent invalid data from entering the database. Lost insertions reported as success are not acceptable and can not be worked around because in non-strict mode the value will be changed to a -126 WHICH IS NOT ACCEPTABLE. A bug with severe loss of functionality and no workaround is a BLOCKER. | ||||||||||
| Comment by Justin Swanhart (Inactive) [ 2016-06-20 ] | ||||||||||
|
This is a data loss issue with no workaround. It is not 'minor'. So that we are clear, please provide the criteria for determining what severity a bug is. Nobody is supposed to apply a personal decision for severity of bugs, there is (historically) a clear guideline regarding what constitutes what severity. In MySQL and MariaDB, a bug that results in data loss (any major loss of functionality) and has no workaround (as this does not) is the highest severity. This is a DATA LOSS issue with NO WORKAROUND. | ||||||||||
| Comment by Justin Swanhart (Inactive) [ 2016-06-20 ] | ||||||||||
|
I am a SENIOR SOFTWARE ENGINEER. I am qualified to determine the severity level of a bug that I report. There is clearly a failure of process here somewhere. | ||||||||||
| Comment by David Thompson (Inactive) [ 2016-10-03 ] | ||||||||||
|
There are documented limitations with datatype ranges where certain values are reserved and not available to a user. This is a separate issue / enhancement and should be prioritized accordingly. The real issue here is that with sql_mode STRICT_ALL_TABLES, when you try to insert the reserved value there is no error and the row is not inserted. This also happens with multiple columns where the other columns are valid values but only say c1 is -128. In the case of an update, the update goes through with the value saturation happening and a warning being issued. The behavior is the same in infinidb so this is a legacy issue rather than an issue with the porting to mariadb server 10.x. There is a workaround however which is to not use the STRICT_ALL_TABLES mode. Ideally the system should correctly report the error. | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-11-22 ] | ||||||||||
|
There is no comments on what changes was made to address this ticket, except what's in the ticket history. Is the ticket ready for testing? | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-11-22 ] | ||||||||||
|
Build tested: 1.0.5-1 mcsadmin> getsoft Name : mariadb-columnstore-platform With sql_mode=STRICT_ALL_TABLES, the row was not inserted as expected, but the error msg is the same as the warning in non STRICT mode. "IDB-2025: Data truncated for column 'c1' " seem to indicate that the value was truncated and inserted. Reopening for clarification and/or better error msg. *MariaDB [mytest]> create table t2(c1 tinyint) engine=columnstore; MariaDB [mytest]> insert into t2 values(-128); MariaDB [mytest]> show warnings;
--------
-------- MariaDB [mytest]> select * from t2;
------
------ MariaDB [mytest]> set sql_mode=STRICT_ALL_TABLES; MariaDB [mytest]> insert into t2 values(-128);
------
------ | ||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-23 ] | ||||||||||
|
Assuming that is one sequence you have put there then that is correct behaviour after the fix. The second insert should fail (and does) so the only data you see is from your insert before you changed the sql_mode. The new behaviour is to error on truncation for STRICT_ALL_TABLES or STRICT_TRANS_TABLES and do not apply the insert, this is in-line with other engines. Previous behaviour was to emit a warning and apply the insert anyway, just as it was without the sql_mode. | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-11-23 ] | ||||||||||
|
Build verified: 1.0.5-1 mcsadmin> getsoft Name : mariadb-columnstore-platform Gotcha. Also verified with the latest build, since the last build had and issue. |