SET in procedures (take 2)
Bart Pietercil
bart.pietercil at gmail.com
Fri Sep 28 10:08:10 CDT 2007
On 28-sep-07, at 15:14, Ivan Smahin wrote:
> Hello Bart,
>
> Friday, September 28, 2007, 2:49:41 PM, you wrote:
>
>> I repost this since I pasted two times the same procedure. SORRYYYY!
>
>> Hi List,
>
>> please explain this:
>
>> this sp
>
>> create or replace procedure sp_php_setConnectionVariables(IN
>> long_userid Long)
>> begin
>> set @user_id = long_userid;
>> exception
>> when others THEN
>> call cm_CoreErrorHandler();
>> end
>
>
>> gives when called like this
>
>> call sp_php_setConnectionVariables(15);
>> select @user_id;
>
>> null in the cursor---< unexpected result
>
>> while this sp
>
>
>> create or replace procedure sp_php_setConnectionVariables(IN
>> long_userid Long)
>> begin
>> @user_id = long_userid;
>> exception
>> when others THEN
>> call cm_CoreErrorHandler();
>> end
>
>> gives when called like this in VStudio
>
>> call sp_php_setConnectionVariables(15);
>> select @user_id;
>
> 15 in the cursor-->> expected result
>
> I can not reproduce it.
> Probably it is fixed already.
so what you are saying is there is no difference between
set @user_id = someValue
and
@user_id = someValue
because in 3.5b there sure is a difference
Bart
More information about the Valentina
mailing list