Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
can be discussed
The initially suggested ROW_NUMBER was intuitively understandable, but ERROR_INDEX in the final implementation is not. It is not necessarily an error, and it is certainly not its index.
MariaDB [test]> insert ignore into t1 (pk) values (1),(1);Query OK, 1 row affected, 1 warning (0.017 sec)
Records: 2 Duplicates: 1 Warnings: 1
MariaDB [test]> show warnings;
+---------+------+---------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------+ | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' | +---------+------+---------------------------------------+ 1 row in set (0.000 sec) MariaDB [test]> get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg; Query OK, 0 rows affected (0.000 sec) +------+---------------------------------------+| @num | @msg |
+------+---------------------------------------+ | 2 | Duplicate entry '1' for key 'PRIMARY' | +------+---------------------------------------+ 1 row in set (0.000 sec)
If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning.
Attachments
Issue Links
- is caused by
-
MDEV-10075 Provide index of error causing error in array INSERT
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is caused by |
Description |
_can be discussed_
{quote} A note unrelated to the previous one The initially suggested {{ROW_NUMBER}} was intuitively understandable, but {{ERROR_INDEX}} in the final implementation is not. It is not necessarily an error, and it is certainly not its index. {code:sql} MariaDB [test]> insert ignore into t1 (pk) values (1),(1); Query OK, 1 row affected, 1 warning (0.017 sec) Records: 2 Duplicates: 1 Warnings: 1 MariaDB [test]> show warnings; +---------+------+---------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------+ | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' | +---------+------+---------------------------------------+ 1 row in set (0.000 sec) MariaDB [test]> get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg; Query OK, 0 rows affected (0.000 sec) +------+---------------------------------------+ | @num | @msg | +------+---------------------------------------+ | 2 | Duplicate entry '1' for key 'PRIMARY' | +------+---------------------------------------+ 1 row in set (0.000 sec) {code} If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning. {quote} |
_can be discussed_
{quote} The initially suggested {{ROW_NUMBER}} was intuitively understandable, but {{ERROR_INDEX}} in the final implementation is not. It is not necessarily an error, and it is certainly not its index. {code:sql} MariaDB [test]> insert ignore into t1 (pk) values (1),(1); Query OK, 1 row affected, 1 warning (0.017 sec) Records: 2 Duplicates: 1 Warnings: 1 MariaDB [test]> show warnings; +---------+------+---------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------+ | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' | +---------+------+---------------------------------------+ 1 row in set (0.000 sec) MariaDB [test]> get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg; Query OK, 0 rows affected (0.000 sec) +------+---------------------------------------+ | @num | @msg | +------+---------------------------------------+ | 2 | Duplicate entry '1' for key 'PRIMARY' | +------+---------------------------------------+ 1 row in set (0.000 sec) {code} If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning. {quote} |
Labels | preview-10.7 |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Priority | Blocker [ 1 ] | Critical [ 2 ] |
Labels | preview-10.7 |
Comment | [ A comment with security level 'Developers' was removed. ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.7.1 [ 26120 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 125062 ] | MariaDB v4 [ 159688 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36742 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36742 ] |