Skip to content
Snippets Groups Projects
Commit 2a83f9e5 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

alter: drop field_no from ER_WRONG_XXX_OPTIONS errors

opts_decode takes errcode and field_no, which is passed to diag_set,
so all code paths that use opts_decode must set a field_no in an error
message. This is stupid, because often there's no reasonable field_no to
report. As a result, for ER_WRONG_INDEX_OPTIONS, ER_WRONG_SPACE_OPTIONS,
and ER_WRONG_COLLATION we use either 0 or field_no of the field in a
system space, which means nothing to users. When there's an error in
index parts we pass the index part no for field_no ("(field X)" where X
is an index part number), which is confusing. The only error for which
field_no makes sense is ER_WRONG_SPACE_FORMAT, but it doesn't justify
passing around field_no for other errors and complicating common code
paths.  Let's drop the field_no everywhere for simplicity - the user can
pin-point the erroneous field without it by inspecting fields/parts.

NO_DOC=minor change in error message
NO_CHANGELOG=minor change in error message
parent 46b3962e
No related branches found
No related tags found
No related merge requests found
Showing
with 135 additions and 176 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment