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. |
From: Jiri C. <di...@ci...> - 2008-04-23 13:17:10
|
On 4/23/08, paha <ch_...@ya...> wrote: > If the bolded line is not commented (i don't need it really, but with it i Sorry, no line marked as bold in this email. :o > 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: This is error from FB server not from provider. This looks like your database is corrupted. Try to do backup&restore or gfix to see any problems. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com |
From: Jiri C. <di...@ci...> - 2008-04-24 14:41:07
|
On 4/24/08, pasha chudnovsky <ch_...@ya...> wrote: > I talked to Vlad Horsun (you must know him, he's firebird core developer) - he Yes. > will look at my database, i also supplied him with simple test project together > with latest provider build from svn. May be he has an answer :) , as far as i Yep. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com |
From: paha <ch_...@ya...> - 2008-05-06 06:58:30
|
It was an error in firebird server - has something to do with default procedure parameters. Vlad says, 2.0 should be also affected. Anyway, it is fixed in daily firebird build at http://www.firebirdsql.org/download/snapshot_builds/ http://www.firebirdsql.org/download/snapshot_builds/ . At least for 2.1 :) -- View this message in context: http://www.nabble.com/attempted-retrieval-of-more-segments-than-exist-tp16834567p17077020.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |
From: Jiri C. <di...@ci...> - 2008-05-06 07:22:37
|
On 5/6/08, paha <ch_...@ya...> wrote: > It was an error in firebird server - has something to do with default > procedure parameters. Vlad says, 2.0 should be also affected. Anyway, it is > fixed in daily firebird build at > http://www.firebirdsql.org/download/snapshot_builds/ > http://www.firebirdsql.org/download/snapshot_builds/ . At least for 2.1 :) Cool. Thanks for sharing info. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com |