From: paha <ch_...@ya...> - 2008-04-23 12:31:26
|
Hi Jiri, i think we might have a problem with GTTs. I can't reproduce error in a simple scenario, but i work on it. So, what i have: Fb 2.1 final, FbProvider 2.5 from svn and following code: using (FbConnection conn = new FbConnection(@"charset=WIN1252;connectionlifetime=30;database=192.168.100.5:C:\test\test.fdb;password=masterkey;port=3050;pooling=True;servertype=Default;userid=sysdba")) { conn.Open(); FbTransaction tran = conn.BeginTransaction(); FbCommand command = new FbCommand("insert into TMP values(@id)", conn, tran); command.Parameters.Add("@id", 1); command.ExecuteNonQuery(); command.Parameters[0].Value = 2; command.ExecuteNonQuery(); command.Parameters.Clear(); command.CommandText = "select count(*) from TMP"; int count = (int)command.ExecuteScalar(); command = new FbCommand("test$tmp_test", conn, tran); command.CommandType = CommandType.StoredProcedure; command.ExecuteNonQuery(); tran.Commit(); } If the bolded line is not commented (i don't need it really, but with it i can reproduce exception, i'm getting), i get exception "attempted retrieval of more segments than exist internal gds software consistency check (EVL_assign_to: invalid operation (229), file: evl.cpp line: 276)" so what we have: 1) TMP - is a GTT with on commit delete rows - so that data exist only in transaction. It is used to pass multiple values to stored procedure for read only access. If i replace this table with common one - there is no exception. 2) test$tmp_test is a complex sp, that makes use of this GTT, it also calls another complex sp, that also reads from GTT. If i omit call of the other sp, there is also no exception even if GTT and not common table is used. overall results are following: if one sp uses GTT and calls other sp, that uses GTT - there is an exception (of course if call to select * from GTT is made before calling sp - but i've also got exception in some other scenarious, i can't quite remember). If none of sp or only one is using GTT, everything is ok. What i failed to do till now is to reproduce the problem with simple sp scenario, i work on it now. But those SP do only read from this GTT, select some data and put it in some other common tables. Oh, and the major reason, i write here - it does work when called from IBExperts within execute block that simulates the behaviour execute block as declare variable cnt integer; begin insert into tmp values(1); insert into tmp values(2); select count(*) from tmp into :cnt; execute procedure test$tmp_test; end I understand, that without having reproducible example it is difficult to make guess, but maybe the error message tells you something, maybe possible reasons. Regards, Pavel. -- View this message in context: http://www.nabble.com/attempted-retrieval-of-more-segments-than-exist-tp16834567p16834567.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |