> Change the 5000 to 50000 and it crashes here on linux too. I guess your compiler's default stack limit is big. I tested real query on linux too and it crashed really fast. But satck size was limited by default java's value, not gcc's limit.
> Maybe > we need to limit the number of SELECT statements that can be > combined in a compound. Anybody can lower stack limit during compilation. It would be hard to guess correct number. But maybe a test case that creates maximum number of selects would at least help to determine quite fast the correct number. > Another case (haven't tested it though): > > SELECT * FROM (SELECT * FROM (SELECT * FROM ...))) With default values it works - error is returned (realy fast, only 13 selects are allowed). It will crash if YYSTACKDEPTH is set to 0. > > I was thinking about sqlite based solution (other solutions are: don't > make > > such query or increase stack limit). I guess the best way is: > > -include multiSelect in sqlite3Select - that's the easy part > > -instead of recursive calls to sqlite3Select use gotos with self written > > stack created on the heap - unfortunatelly it requires to keep track of > all > > created variables. They are mostly in front of the function but still > it's > > annoying to have to remember all of them. > > > > Using MSVC it's easy prevent a crash: __try, __except and _resetstkoflw. > > I have no idea yet hot to do this with gcc. Signal can be caught, but I > > wasn't able to do anything more with demaged stack. > > Even if it worked it would leak resources and maybe leave SQLite's > internals in an inconsistent state. The goto way won't leak. But yes, _resetstkoflw may cause problems. I was thinking of closing a db connection after that error. It should solve inconsistency problem. Maybe some kind of rollback would be even better. Leaks would probably remain, but its better than a crash. ---------------------------------------------------------------------- Po meczu.....kurde...:) >>> http://link.interia.pl/f1a72 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------