Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1(EOL), 10.2(EOL)
-
None
Description
Consider the following scenario:
drop table if exists t1; |
create table t1 (t tinyint, i int); |
insert into t1 values (1,1000); |
insert into t1 select i, i from t1; |
show warnings;
|
insert into t1 select max(i), max(i) from t1; |
show warnings;
|
The first INSERT above is inside limits and does not produce any warnings.
So, the row count in the table becomes 1.
The second INSERT attempts to insert a too big value into column t and produces a warning. Before 10.2, it said
MariaDB [test]> show warnings;
|
+---------+------+--------------------------------------------+ |
| Level | Code | Message | |
+---------+------+--------------------------------------------+ |
| Warning | 1264 | Out of range value for column 't' at row 1 | |
+---------+------+--------------------------------------------+ |
1 row in set (0.00 sec) |
Apparently meaning that it's at the first inserted row.
In 10.2 it says instead
MariaDB [test]> show warnings;
|
+---------+------+--------------------------------------------+ |
| Level | Code | Message | |
+---------+------+--------------------------------------------+ |
| Warning | 1264 | Out of range value for column 't' at row 2 | |
+---------+------+--------------------------------------------+ |
1 row in set (0.00 sec) |
Maybe it means to say that the row it complains about is to become the 2nd row in the table, so it's not technically incorrect, as long as it is an expected change.
Either way, the row count becomes 2.
But the 3rd INSERT is a problem. Before 10.2, it said
MariaDB [test]> show warnings;
|
+---------+------+--------------------------------------------+ |
| Level | Code | Message | |
+---------+------+--------------------------------------------+ |
| Warning | 1264 | Out of range value for column 't' at row 3 | |
+---------+------+--------------------------------------------+ |
1 row in set (0.00 sec) |
which we can interpret as a to-be-the-3rd-row in the table. However, in 10.2 it's
MariaDB [test]> show warnings;
|
+---------+------+--------------------------------------------+ |
| Level | Code | Message | |
+---------+------+--------------------------------------------+ |
| Warning | 1264 | Out of range value for column 't' at row 5 | |
+---------+------+--------------------------------------------+ |
1 row in set (0.00 sec) |
which just does not have a plausible explanation from the user's perspective.