[MCOL-3777] Wrong error every second run Created: 2020-02-10  Updated: 2020-11-12  Resolved: 2020-03-30

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.4.2
Fix Version/s: 1.4.4, 1.5.1

Type: Bug Priority: Major
Reporter: David Hall (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2020-4, 2020-5
Epic/Theme: 1.4_regressions

 Description   

Consider the following:

CREATE TABLE utest1 (ukey INT, c1 TINYINT UNSIGNED, c2 SMALLINT UNSIGNED, c3 INT UNSIGNED, c4 BIGINT UNSIGNED)engine=columnstore;

INSERT INTO utest1 VALUES (3,54,3766,27483646,922336854775806), (4,254,65534,4294967294,1846744073709551614),(5,255,65535,4294967295,18446744073709551615),(6,1255,165535,14294967295,118446744073709551615);

c1 TINYINT will be out of range, so we expect:
ERROR 1264 (22003): Out of range value for column 'c2' at row 4

which is what we get. But if you run the same insert again:
ERROR 1264 (22003): CAL0001:



 Comments   
Comment by Gagan Goel (Inactive) [ 2020-03-05 ]

The issue was tableValuesMap structure in cal_connection_info was not cleaning up values from a previously failed insert due to a range error in strict mode.

We detect whether we are at the beginning of the insert, and if so, clean up any stored values in the map from a previous insert.

Comment by Daniel Lee (Inactive) [ 2020-03-30 ]

Builds verified: 1.4.4-1 source, 1.5.0-1 BB

1.4.4-1

/root/ColumnStore/buildColumnstoreFromGithubSource/server
commit ec0071afa50b78930860a14802b8cfc9791f7d13
Author: Sergei Petrunia <psergey@askmonty.org>
Date: Thu Mar 26 01:26:39 2020 +0300

MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code

/root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
commit 6e953d01d268161ac50dabb6aa9a122ed1d43e0f
Merge: 4468c93 ba06727
Author: Gagan Goel <gagan.nith@gmail.com>
Date: Thu Mar 26 11:41:35 2020 -0400

Merge pull request #1117 from drrtuy/MCOL-3828_1_4

MCOL-3828 This commit replaces the method that calls JOIN::optimise()

1.5.0-1

engine commit:
a35b208

MariaDB [mytest]> CREATE TABLE utest1 (ukey INT, c1 TINYINT UNSIGNED, c2 SMALLINT UNSIGNED, c3 INT UNSIGNED, c4 BIGINT UNSIGNED)engine=columnstore;
Query OK, 0 rows affected (0.179 sec)

MariaDB [mytest]> INSERT INTO utest1 VALUES (3,54,3766,27483646,922336854775806), (4,254,65534,4294967294,1846744073709551614),(5,255,65535,4294967295,18446744073709551615),(6,1255,165535,14294967295,118446744073709551615);
ERROR 1264 (22003): Out of range value for column 'c1' at row 4
MariaDB [mytest]> INSERT INTO utest1 VALUES (3,54,3766,27483646,922336854775806), (4,254,65534,4294967294,1846744073709551614),(5,255,65535,4294967295,18446744073709551615),(6,1255,165535,14294967295,118446744073709551615);
ERROR 1264 (22003): Out of range value for column 'c1' at row 4
MariaDB [mytest]> INSERT INTO utest1 VALUES (3,54,3766,27483646,922336854775806), (4,254,65534,4294967294,1846744073709551614),(5,255,65535,4294967295,18446744073709551615),(6,1255,165535,14294967295,118446744073709551615);
ERROR 1264 (22003): Out of range value for column 'c1' at row 4
MariaDB [mytest]>

Generated at Thu Feb 08 02:45:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.