Re: Weird Error Using Euphoria Database System (EDS)

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

It's around line 1291 in std/eds.e.

Ah! (I was looking at database.e, doh!)

However, go back 9 lines and we see this: https://github.com/OpenEuphoria/euphoria/blob/master/include/std/eds.e#L1282

 
	if lock_method = DB_LOCK_NO or 
	   lock_method = DB_LOCK_EXCLUSIVE then 
		-- get read and write access, "ub" 
		db = open(path, "ub") 
	else 
		-- DB_LOCK_SHARED, DB_LOCK_READ_ONLY 
		db = open(path, "rb") 
	end if 
 
ifdef WINDOWS then 
	if lock_method = DB_LOCK_SHARED then 
		lock_method = DB_LOCK_EXCLUSIVE 
	end if 
 
end ifdef 

So the docs aren't entirely true. I have added those lines to my database.e, and changed the phix docs to:

If you request DB_LOCK_SHARED on Windows it will get the same lock as DB_LOCK_EXCLUSIVE, but still be read-only. 

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu