[MDEV-26610] ERROR_INDEX isn't seen in the error message Created: 2021-09-15 Updated: 2021-09-29 Resolved: 2021-09-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Rucha Deodhar |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
can be discussed
|
| Comments |
| Comment by Rucha Deodhar [ 2021-09-17 ] | |||||||||||||||||
|
Discussed on slack with serg that ERROR_INDEX could most probably work for other statements but not sure which error messages can be used safely because there are some error messages that are not unique to statements. | |||||||||||||||||
| Comment by Elena Stepanova [ 2021-09-19 ] | |||||||||||||||||
|
I'm not sure what "not unique to statements" in this context means, but anyway, indeed there are certainly error messages universal enough so that a row number doesn't make sense in all (or even most) cases. Here is one example, it's rather artificial, which is in itself proves the point.
So, while for this specific weird usage a row number does make sense and extending the message to File 'f1' already exists for row 2 would look all right, of course in the majority of cases ER_FILE_EXISTS_ERROR happens on a higher level and row numbers are meaningless there. I guess choosing which error messages can be extended with row numbers requires some tedious research of how the messages are used. In my opinion it's still worth doing, but probably it's well outside the scope of | |||||||||||||||||
| Comment by Rucha Deodhar [ 2021-09-20 ] | |||||||||||||||||
|
elenst , I meant some error messages are used for more than one statements, example "data truncated for col 'a' row i" is used for alter, update and insert and some of them are not universal enough. | |||||||||||||||||
| Comment by Sergei Golubchik [ 2021-09-20 ] | |||||||||||||||||
|
An example of "not unique to statements" is this error from the test case:
while ERROR_INDEX is 2 here, the error about "invalid double" can happen anywhere, and in many cases the concept of "current row" won't be applicable. | |||||||||||||||||
| Comment by Elena Stepanova [ 2021-09-20 ] | |||||||||||||||||
|
Right, got it. Same as in my example with ER_FILE_EXISTS_ERROR, then. | |||||||||||||||||
| Comment by Elena Stepanova [ 2021-09-29 ] | |||||||||||||||||
|
Changing resolution for clarity, as there have been no changes to fix this (upon all parties' agreement). |