Hi, > I dug further into this problem and found that the root cause is the > use of the global constraints map in the org.h2.schema.Schema class to > manage local temporary table constraints. It looks like a similar > issue was addressed recently for indexes, but not for constraints.
You are right... Sounds like a bug. I'm not sure what is the best way to solve this problem. One solution is to add a field "private HashMap localTempTableConstraints" to the session. Another approach is to add one 'schema' to each session. That way part of the code can be re-used. But at the moment I would probably not do that, it sounds more complex. > concurrent access to the > constraints and temporaryUniqueNames collections is not threadsafe. > As a result, a non-unique name can be returned by this method. That sounds like a bug as well. > I am working on a patch which will store constraints for local > temporary tables in the Session object, similar to what is done with > indexes. This way, all access to the map is done within a single > Session only. Also, concurrent access to the shared > temporaryUniqueNames set will have to be synchronized. Please let me > know if you have any concerns with this approach. I would like to fix this problem as soon as possible. Please let me know how far you are with the solution. If you can't finish within the next days, I will fix it myself. Thanks a lot for your help! Regards, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
