Hi Davi
Davi Arnaut wrote:
> Hi Marc,
>
> Patch looks fine, one comment below.
>
> Marc Alff wrote:
>
>> #At file:///home/malff/BZR-TREE/mysql-6.0-wl2110-review-part6/
>>
>> 2675 Marc Alff 2008-07-22
>> WL#2110 (Stored Procedures: Implement SIGNAL)
>>
>> Formal review part 6/10: protocol
>>
>> This patch implements minor changes in the protocol layer.
>> In particular, the SQLSTATE of a packet is not implied anymore
>> by the error number, but provided by the caller.
>> modified:
>> libmysqld/lib_sql.cc
>> sql/protocol.cc
>> sql/protocol.h
>>
>>
>
> <snip>
>
>
>>
>> void send_warning(THD *thd, uint sql_errno, const char *err=0);
>> -void net_send_error(THD *thd, uint sql_errno=0, const char *err=0);
>> +void net_send_error(THD *thd, uint sql_errno, const char *err,
>> + const char* sqlstate);
>>
>
> Wouldn't it be better to pass the SQL_condition?
>
>
The error packet message/error code/sql state does not come from the
SQL_condition,
but from the statement diagnostics area.
In both cases, the protocol code is a very low layer, and should not
contain references to the higher SQL layer,
to avoid creating a dependency cycle between modules in the server
implementation.
Regards,
-- Marc