[tarantool-patches] Re: [PATCH v1 1/1] sql: rework "no such object" and "object exists" errors
n.pettik
korablev at tarantool.org
Fri Feb 15 16:12:33 MSK 2019
> On 15 Feb 2019, at 15:50, Konstantin Osipov <kostja at tarantool.org> wrote:
>
> * n.pettik <korablev at tarantool.org> [19/02/15 15:46]:
>>> + /*148 */_(ER_NO_SUCH_INDEX_NAME, "No index '%s' is defined in space '%s'") \
>>
>> I’d better say ’No index with name …’.
>> But it is to be discussed.
>
> It's a copycat of the INDEX_ID message.
Yep, I've noticed this, but anyway. Without no difference
between error messages user would wonder why in some
cases name appears, and in other - id. IMHO.
>>> /**
>>> + * Increment error counter if error suppression isn't set.
>>> + *
>>> + * @param parse_context Current parsing context.
>>> + */
>>> +void
>>> +sql_parser_error(struct Parse *parse_context);
>>
>> I suggest to incapsulate call of diag set inside this
>> function. To achieve this, lets make function take
>> variadic params. It would allow us to reduce size
>> of refactored code, at least.
>
> Nikita, I agree in general but given this entire function is
> temporary, I think it's good enough.
It is going to exist until we remove parse->nErr and parse->rc -
long enough, I guess.
More information about the Tarantool-patches
mailing list