on 2016 Dec 12 12:40 PM
When a stored procedure using temporary table and external name calls to fill data inside the table is run there seems to be a bug which causes temporary tables to not be found at random times. Using SQL Anywhere 16. I've come up with a simple scenario, the bug seems to happen once every ten times for me.
Stored Procedure:
CREATE PROCEDURE "TestQuery"( )
on exception resume
begin
create table #tempResults(
"Text1" "text" null,
"Text2" "text" null,
"Text3" "text" null,
"Text4" "text" null,
);
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
insert into #tempResults values(ExternalFunction(), ExternalFunction(), ExternalFunction(), ExternalFunction()) ;
Select * from #tempResults
end
External Name:
CREATE FUNCTION "ExternalFunction"()
returns "text"
external name
'C:\\\\ExternalFunction.dll::ExternalFunction.ExternalFunctionClass.ExternalFunction() string' language "CLR"
External Function (C#):
namespace ExternalFunction
{
public class ExternalFunctionClass
{
public static string ExternalFunction()
{
return "Hello World!";
}
}
}
Request clarification before answering.
Seems to be fixed in v16.0.0.2344
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.