When INSERT .. SELECT produces an error/warning which reports the number of the problematic row, this number is wrong when SELECT is performed from the same table.
create or replace table t (a tinyint);
|
insert into t values (1),(100);
|
insert into t select a*2 from t;
|
10.7 d552e092c9f3
|
MariaDB [test]> insert into t select a*2 from t;
|
ERROR 1264 (22003): Out of range value for column 'a' at row 4
|
Consequently, ERROR_INDEX from MDEV-10075 is also wrong.
If the the same values are insert-selected from a different table, the counter is correct:
MariaDB [test]> create or replace table tmp select * from t;
|
Query OK, 2 rows affected (0.044 sec)
|
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> insert into t select a*2 from tmp;
|
ERROR 1264 (22003): Out of range value for column 'a' at row 2
|