Re: Weird Error Using Euphoria Database System (EDS)
- Posted by ghaberek (admin) Jun 12, 2018
- 1257 views
petelomax said...
However the docs (both OE and Phix) go on to say:
If you request DB_LOCK_SHARED on WINDOWS it will be treated as if you had asked for DB_LOCK_EXCLUSIVE.
yet I cannot see anything to support that claim in the source code of db_open(), and this case, on Windows, it has patently not worked the same as DB_LOCK_EXCLUSIVE.
It's around line 1291 in std/eds.e.
https://github.com/OpenEuphoria/euphoria/blob/master/include/std/eds.e#L1291
ifdef WINDOWS then if lock_method = DB_LOCK_SHARED then lock_method = DB_LOCK_EXCLUSIVE end if end ifdef
petelomax said...
Are we all in agreement that last sentence should just be deleted?
I don't think it should remove the sentence if the override on Windows is to continue.
Either remove the automatic override and tell the user they have to mind lock types by operating system, or leave the sentence and the bit of code that does the override.
-Greg