Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Won't Fix
-
None
-
None
Description
can be discussed
Is there a reason this row number cannot be a part of the error message itself (in addition to diagnostics property)?
It wouldn't be anything new, we already have it for some errors, e.g.
MariaDB [test]> insert into t1 values (1,'foo'),(2,'foobar'); ERROR 1406 (22001): Data too long for column 'c' at row 2
While diagnostics property is useful to detect the number of the flawed row programmatically, in interactive execution having it in the error text is clearly more user-friendly, especially when many values are involved:
MariaDB [test]> insert ignore into t1 values (1,'foo'),(2,'foobar'),(2,'bar'),(3,'a'),(4,'qux'),(4,'quux'),(5,'baz'); Query OK, 5 rows affected, 4 warnings (0.014 sec)Records: 7 Duplicates: 2 Warnings: 4
ÂMariaDB [test]> show warnings;
+---------+------+----------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------+ | Warning | 1265 | Data truncated for column 'c' at row 2 | | Warning | 1062 | Duplicate entry '2' for key 'PRIMARY' | | Warning | 1265 | Data truncated for column 'c' at row 6 | | Warning | 1062 | Duplicate entry '4' for key 'PRIMARY' | +---------+------+----------------------------------------+ 4 rows in set (0.000 sec)
Attachments
Issue Links
- is caused by
-
MDEV-10075 Provide index of error causing error in array INSERT
- Closed