Skip to content

Empty string set to output parameter on stored procedure returns garbage. #182

@leehicks

Description

@leehicks

Here is a simple test procedure. Tested versions - Windows 2008 R2 Server (4.1.4), Ubuntu 16.04 (4.0.6).

create procedure test_empty_out @test varchar(200)='' OUTPUT
as begin
set nocount on;
set @test='';
select hello_world_column='this is a column in a single dataset';
end

If @test is set to null or " " (single space), everything returns fine, but when empty string is returned the bound memory location in the driver seems to not get set properly when the procedure call is closed out. When you try to access that bound variable, you either get junk from the heap (Windows) or PHP crashes (Ubuntu 16.04).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions