<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQLite3 and locking in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181271#M39664</link>
    <description>Ben,&lt;BR /&gt;&lt;BR /&gt;One of the things I was told that should be checked (and altered) was just the flck functionality - that seems to work differently on Unix. I understood that flck uses posix-based locking. IIRC, Posix locks are user-mode locks on byte ranges. To have this working properly on OpenVMS, you may have to redesign the relevant functions in os_vms.c to behave like expected by SQLite.&lt;BR /&gt;&lt;BR /&gt;It may well be that these locks are the different behaviour between CRTL on OpenVMS 7.3-2 and 8.3. It should be pointed out in  the CRTL documentation.</description>
    <pubDate>Wed, 16 Apr 2008 17:36:31 GMT</pubDate>
    <dc:creator>Willem Grooters</dc:creator>
    <dc:date>2008-04-16T17:36:31Z</dc:date>
    <item>
      <title>SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181270#M39663</link>
      <description>The other thing we'll need to worry about with SQLite3, now that we've shown that the code builds and runs properly, thanks to JFP's patch, is locking.&lt;BR /&gt;&lt;BR /&gt;Our first simple test on OpenVMS V8.3 is to just open two sqlite3 sessions on the same database file.  The second one fails to open the file, presumably because by default an open in CRTL opens for exclusive access, unlike on Windows or Linux.&lt;BR /&gt;&lt;BR /&gt;Our second test was on OpenVMS V7.3-2 with the DECC patched up to ACRTL V3.0.  When we tried to open a single sqlite3 session on a database file it failed, issuing this error:&lt;BR /&gt;&lt;BR /&gt;$ sqlite3 foo.db&lt;BR /&gt;SQLite version 3.5.7&lt;BR /&gt;Enter ".help" for instructions&lt;BR /&gt;sqlite&amp;gt; create table bar(a,b);&lt;BR /&gt;SQL error: database is locked&lt;BR /&gt;&lt;BR /&gt;While we can accept for the moment that we may not be able to get this to work at all on VMS V7.3-2 (though we would really like it to work there,) it is crucial that we solve the file locking problem before we can proceed.  Can anyone help with either problem?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ben&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2008 16:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181270#M39663</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-16T16:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181271#M39664</link>
      <description>Ben,&lt;BR /&gt;&lt;BR /&gt;One of the things I was told that should be checked (and altered) was just the flck functionality - that seems to work differently on Unix. I understood that flck uses posix-based locking. IIRC, Posix locks are user-mode locks on byte ranges. To have this working properly on OpenVMS, you may have to redesign the relevant functions in os_vms.c to behave like expected by SQLite.&lt;BR /&gt;&lt;BR /&gt;It may well be that these locks are the different behaviour between CRTL on OpenVMS 7.3-2 and 8.3. It should be pointed out in  the CRTL documentation.</description>
      <pubDate>Wed, 16 Apr 2008 17:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181271#M39664</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2008-04-16T17:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181272#M39665</link>
      <description>Ben,&lt;BR /&gt;&lt;BR /&gt;I have already fix this. But I have found another problem I'm trying to solve.&lt;BR /&gt;If a program open twice the database the second connexion failed with a disk I/O error.&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Wed, 16 Apr 2008 17:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181272#M39665</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-04-16T17:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181273#M39666</link>
      <description>That's great news.  So I guess we'll wait while you work on the locking stuff and I'll turn my attention for now to SWIG and Ruby bindings, as I don't think we'd add much, if anything, to helping to get locking working.  I'd be happy to test any new code when it is ready.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ben&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2008 17:54:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181273#M39666</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-16T17:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181274#M39667</link>
      <description>I have commit the code in the repository.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hg.vmspython.dyndns.org/vmspython/rev/cda4c8dae858" target="_blank"&gt;http://hg.vmspython.dyndns.org/vmspython/rev/cda4c8dae858&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Let us know is this work (no database corruption when 2 sessions update simultaneous a database).&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Wed, 16 Apr 2008 18:05:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181274#M39667</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-04-16T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181275#M39668</link>
      <description>JF's solution is one way to do it, and a good one, but I think&lt;BR /&gt;&lt;BR /&gt;$ define DECC$FILE_SHARING ENABLE&lt;BR /&gt;&lt;BR /&gt;would do the same thing.  It's more robust to have the change actually in the code and not depend on the environment, but then you have to maintain your changes.&lt;BR /&gt;&lt;BR /&gt;When a porting issue can be taken care of entirely by a feature setting, the intersection of most robust and most maintainable is probably to call decc$feature_set_value from within a LIB$INITIALIZE psect that you link into your application.  This isn't always feasible with a library that may be linked in by many applications.</description>
      <pubDate>Wed, 16 Apr 2008 21:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181275#M39668</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2008-04-16T21:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181276#M39669</link>
      <description>OK, the latest version from your repo does work on V8.3.  We tested locking a bit and it appears to work as documented.  Thanks!&lt;BR /&gt;&lt;BR /&gt;Now as a subgoal of this project we want to reach back as far as we can in our supported client base.  The current floor version we support is V7.1.  We found when we went back that far (building on a V7.3-2 system against V7.1 libraries) we had compile errors relating to big file support.  And when we tried on V7.3-2, we had the runtime problem mentioned earlier in this thread, i.e. "Database is locked" (single process only).&lt;BR /&gt;&lt;BR /&gt;We don't really need big file support, as the databases are going to be small.  I'm wondering if we could make sqlite3.exe in two flavours, a small file and a big file version.  How much work would that take?&lt;BR /&gt;&lt;BR /&gt;Are there any other "show stoppers" that would prevent us from supporting all of the way back to V7.1?  Would we be able to get some kind of locking working that far back (not necessarily Posix)?&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Apr 2008 13:12:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181276#M39669</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-17T13:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181277#M39670</link>
      <description>Craig,&lt;BR /&gt;&lt;BR /&gt;I agree that the use of DECC$FILE_SHARING ENABLE is simpler but this is a global setting and as sqlite is an embedded library this will affect other library. In this case the Ruby interpreter.&lt;BR /&gt;&lt;BR /&gt;Python use the LIB$INITIALIZE solution and the behavior can be change using python_xxx logical, for example PYTHON_FILE_SHARING, so this will not interact with others programs.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ben,&lt;BR /&gt;&lt;BR /&gt;sqlite work on OpenVMS 7.3-2 using the latest acrtl patch, I have include it in Python and it pass all tests except those using multiple connexions.&lt;BR /&gt;&lt;BR /&gt;to remove the support of large file just compile without the _LARGEFILE define.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 17 Apr 2008 17:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181277#M39670</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-04-17T17:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181278#M39671</link>
      <description>I thought I had checked that we were up to date with ACRTL 3.0, and yet it still doesn't work for us, giving us this "database is locked" error.  Am I wrong about what the "latest" is for ACRTL on V7.3-2?&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Apr 2008 17:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181278#M39671</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-17T17:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181279#M39672</link>
      <description>Oops, sorry I have done the test on the wrong system.&lt;BR /&gt;&lt;BR /&gt;You're correct it work on VMS 8.3 which is the minimum version supprorting byte range locking using fcntl anf F_SETLK and it don't work on 7.3-2 which doesn't have this feature.&lt;BR /&gt;Sorry my mistake...&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 17 Apr 2008 20:27:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181279#M39672</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-04-17T20:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181280#M39673</link>
      <description>....VMS 8.3 which is the minimum version supprorting byte range locking using fcntl anf F_SETLK and it don't work on 7.3-2 which doesn't have this feature.&lt;BR /&gt;&lt;BR /&gt;Like I suspected. The only way to get around it is to redesign and recode locking and do it the VMS way, to make it compatible with older VMS versions.&lt;BR /&gt;For larger databases, I wouldn't use SQLite (as the name suggest (and the roiginal coders admit) it is a light-weight SQL engine - not a database. Big stuf needs big databases (like MySQL, if you want/need to use Opensource)</description>
      <pubDate>Thu, 17 Apr 2008 20:57:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181280#M39673</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2008-04-17T20:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181281#M39674</link>
      <description>Note also that the byte ranging locking features don't look like they'd work on large files because they only lock ranges that can be stored in 32-bit integers.  The v8.3 New Features manual covers it here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/83FINAL/6679/6679pro_008.html#byte_range_locking_sec" target="_blank"&gt;http://h71000.www7.hp.com/doc/83FINAL/6679/6679pro_008.html#byte_range_locking_sec&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Apr 2008 03:02:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181281#M39674</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2008-04-18T03:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181282#M39675</link>
      <description>So these are arguments against big files (or at least making the small file version be the default and a separate sqlite3_bigfiles.exe be the exception).&lt;BR /&gt;&lt;BR /&gt;As for the byte-range locking, it seems like a bit of a frill to us for our application.  For the small databases with low transaction rates we want to use this for, I expect we can get away with global file locks.  It would be nice if a single binary provided both: byte-range locking when available and degrade to a file lock when it isn't.  In fact, isn't that what SQLITE_ENABLE_LOCKING_STYLE is supposed to accomplish?  But our first attempts to use this failed.  I can furnish exact build/run-time errors if this seems like the right direction to go ...&lt;BR /&gt;&lt;BR /&gt;Ben&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Apr 2008 09:39:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181282#M39675</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-18T09:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181283#M39676</link>
      <description>Ah.  It is simply this:&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;.^&lt;BR /&gt;%CC-F-NOINCLFILEF, Cannot find file &lt;SYS&gt; specified in #include directive.&lt;BR /&gt;at line number 18098 in file DSA0:[BH.SQLITE_A]SQLITE3.C;3&lt;BR /&gt;&lt;BR /&gt;And if I put that inside an #ifndef __VMS and also sys/mount.h, then I get a whole slew of errors.  I'd have to do some digging through doc to solve these.  Am I on the right track, though?&lt;BR /&gt;&lt;BR /&gt;#pragma mark AFP Support&lt;BR /&gt;........^&lt;BR /&gt;%CC-I-UNKNOWNPRAGMA, The pragma "mark" is unrecognized.&lt;BR /&gt;at line number 19653 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;#pragma mark flock() style locking&lt;BR /&gt;........^&lt;BR /&gt;%CC-I-UNKNOWNPRAGMA, The pragma "mark" is unrecognized.&lt;BR /&gt;at line number 19968 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;#pragma mark Old-School .lock file based locking&lt;BR /&gt;........^&lt;BR /&gt;%CC-I-UNKNOWNPRAGMA, The pragma "mark" is unrecognized.&lt;BR /&gt;at line number 20061 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;#pragma mark No locking&lt;BR /&gt;........^&lt;BR /&gt;%CC-I-UNKNOWNPRAGMA, The pragma "mark" is unrecognized.&lt;BR /&gt;at line number 20174 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  struct statfs fsInfo;&lt;BR /&gt;................^&lt;BR /&gt;%CC-E-INCOMPNOLINK, In this declaration, "fsInfo" has no linkage and is of an incomplete type.&lt;BR /&gt;at line number 18775 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  if( statfs(filePath, &amp;amp;fsInfo) == -1 ){&lt;BR /&gt;......^&lt;BR /&gt;%CC-I-IMPLICITFUNC, In this statement, the identifier "statfs" is implicitly declared as a function.&lt;BR /&gt;at line number 18777 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  if( fsInfo.f_flags &amp;amp; MNT_RDONLY ){&lt;BR /&gt;.......................^&lt;BR /&gt;%CC-E-UNDECLARED, In this statement, "MNT_RDONLY" is not declared.&lt;BR /&gt;at line number 18780 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  err = fsctl(path, afpfsByteRangeLock2FSCTL, &amp;amp;pb, 0);&lt;BR /&gt;........^&lt;BR /&gt;%CC-I-IMPLICITFUNC, In this statement, the identifier "fsctl" is implicitly declared as a function.&lt;BR /&gt;at line number 19699 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;    int rc = flock(pFile-&amp;gt;h, LOCK_EX | LOCK_NB);&lt;BR /&gt;.............^ &lt;BR /&gt;%CC-I-IMPLICITFUNC, In the initializer for rc, the identifier "flock" is implicitly declared as a function.&lt;BR /&gt;at line number 19982 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;    int rc = flock(pFile-&amp;gt;h, LOCK_EX | LOCK_NB);&lt;BR /&gt;.............................^&lt;BR /&gt;%CC-E-UNDECLARED, In the initializer for rc, "LOCK_EX" is not declared.&lt;BR /&gt;at line number 19982 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;    int rc = flock(pFile-&amp;gt;h, LOCK_EX | LOCK_NB);&lt;BR /&gt;.......................................^&lt;BR /&gt;%CC-E-UNDECLARED, In the initializer for rc, "LOCK_NB" is not declared.&lt;BR /&gt;at line number 19982 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;      flock(pFile-&amp;gt;h, LOCK_UN);&lt;BR /&gt;......................^&lt;BR /&gt;%CC-E-UNDECLARED, In this statement, "LOCK_UN" is not declared.&lt;BR /&gt;at line number 19985 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  int rc = flock(pFile-&amp;gt;h, LOCK_EX | LOCK_NB);&lt;BR /&gt;...........................^&lt;BR /&gt;%CC-E-UNDECLARED, In the initializer for rc, "LOCK_EX" is not declared.&lt;BR /&gt;at line number 20003 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  int rc = flock(pFile-&amp;gt;h, LOCK_EX | LOCK_NB);&lt;BR /&gt;.....................................^&lt;BR /&gt;%CC-E-UNDECLARED, In the initializer for rc, "LOCK_NB" is not declared.&lt;BR /&gt;at line number 20003 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  int rc = flock(pFile-&amp;gt;h, LOCK_UN);&lt;BR /&gt;...........................^&lt;BR /&gt;%CC-E-UNDECLARED, In the initializer for rc, "LOCK_UN" is not declared.&lt;BR /&gt;at line number 20031 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;      srandomdev();&lt;BR /&gt;......^&lt;BR /&gt;%CC-I-IMPLICITFUNC, In this statement, the identifier "srandomdev" is implicitly declared as a function.&lt;BR /&gt;at line number 20416 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;BR /&gt;  if( (strlen(zDir) - sizeof(SQLITE_TEMP_FILE_PREFIX) - 17) &amp;lt;=0 ){&lt;BR /&gt;......^&lt;BR /&gt;%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "(strlen(...)-sizeof("etilqs_")-17)" is being compared with a relational operator to a constant&lt;BR /&gt;whose value is not greater than zero.  This might not be what you intended.&lt;BR /&gt;at line number 20725 in file DSA0:[BH.SQLITE_A]SQLITE3.C;5&lt;BR /&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Fri, 18 Apr 2008 10:17:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181283#M39676</guid>
      <dc:creator>Ben Armstrong</dc:creator>
      <dc:date>2008-04-18T10:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181284#M39677</link>
      <description>SQLITE_ENABLE_LOCKING_STYLE seem to be very unix specific.&lt;BR /&gt;&lt;BR /&gt;I have found a small thread on this:&lt;BR /&gt;&lt;A href="http://archives.devshed.com/forums/databases-124/sqlite-enable-locking-style-2138671.html" target="_blank"&gt;http://archives.devshed.com/forums/databases-124/sqlite-enable-locking-style-2138671.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And extract from the final message:&lt;BR /&gt;"""&lt;BR /&gt;Defining the SQLITE_ENABLE_LCKING_STYLE macro (doesn't matter if it's&lt;BR /&gt;set to 0 or 1, just whether or not it's defined) activates code to &lt;BR /&gt;handle some tricky filesystem locking semantics (NFS etc.) on &lt;BR /&gt;Mac SX.&lt;BR /&gt;"""&lt;BR /&gt;&lt;BR /&gt;So probably not very portable and as Willem suggest may need some work on VMS :-(&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Fri, 18 Apr 2008 10:50:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181284#M39677</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-04-18T10:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181285#M39678</link>
      <description>... some work ...&lt;BR /&gt;&lt;BR /&gt;probably an understatement. I didn't get into the SQLite code that deep, and not knowing the exact functions of flck, my feeling it'll be at least a bit more than "some work". Personal imprsssion only.  &lt;BR /&gt;&lt;BR /&gt;If update rate is low, and you can live with an occasional exclusive lock, it might be the way to go. I would suggest to do that in your application code, if possible, for the simple reason that it's easier to control and handle at that level.</description>
      <pubDate>Sun, 20 Apr 2008 18:58:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181285#M39678</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2008-04-20T18:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181286#M39679</link>
      <description>sys/param.h is largely a legacy file; that's basically old code, and there are now (more) portable APIs for that stuff.  A number of packages I've encountered can reference it, but pull nothing from it.  If you're porting code, I'd conditionalize any references to it -- check for other ports that have done the same, too.  (Often an empty file is good enough -- that avoids needing conditionalizations.)  See next.&lt;BR /&gt;&lt;BR /&gt;An empty params.h file is often created as part of porting this stuff.  See: &lt;A href="http://www.openvms.compaq.com/openvms/products/ips/porting_relnotes.html" target="_blank"&gt;http://www.openvms.compaq.com/openvms/products/ips/porting_relnotes.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The rest of the stuff looks like standard porting stuff.&lt;BR /&gt;&lt;BR /&gt;#pragma mark doesn't exist; it's non-portable.  (The compiler messages can be suppressed, either via compile switch or via the /FIRST_INCLUDE mechanism.)&lt;BR /&gt;&lt;BR /&gt;Avoid conditionalizations if you're looking to push fixes back out, if you can avoid them.  It just messes up the code.  The /FIRST_INCLUDE can be handy.&lt;BR /&gt;&lt;BR /&gt;The locking will be the interesting bit.  Most (all of?) the file locking will either involve an upgrade to current releases of OpenVMS (as you've found), or rolling your own locking code, or finding and porting some locking code from elsewhere.&lt;BR /&gt;&lt;BR /&gt;Based on your V8.3 experience, what you're encountering is a decade-old platform with decade-old run-time libraries; you're working before these calls and these features were added into OpenVMS.  &lt;BR /&gt;&lt;BR /&gt;There's a list of this sort of stuff in the back of the C RTL manual; tables of when various C routines were implemented in OpenVMS.&lt;BR /&gt;&lt;BR /&gt;All of which means you either upgrade, or you roll your own support.  Which then means you get to make a crucial business decision: upgrades, roll your own code and support, drop support for older releases, or other such.  Or possibly look to alternatives, such as porting PostgreSQL or another such database, or at a commercial database.&lt;BR /&gt;&lt;BR /&gt;Locking code is not something you should walk into implementing and supporting lightly, either.  It's usually easy to get it mostly-working, and rather tougher to get it reliably working.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 20 Apr 2008 20:26:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181286#M39679</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-04-20T20:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181287#M39680</link>
      <description>Dear Ben Armstrong,&lt;BR /&gt;&lt;BR /&gt;i understand that you have working to use the SQLite3 under OpenVMS.&lt;BR /&gt;I would like to use it too.&lt;BR /&gt;&lt;BR /&gt;What is the current status?&lt;BR /&gt;Do you have an up to date version that is working? If yes could send me this version (sources)?&lt;BR /&gt;&lt;BR /&gt;Thanks for all.&lt;BR /&gt;Mohcine&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Mar 2010 14:16:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181287#M39680</guid>
      <dc:creator>mohcine</dc:creator>
      <dc:date>2010-03-25T14:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181288#M39681</link>
      <description>Mohcine&lt;BR /&gt;&lt;BR /&gt;nothing has changed about the status of Sqlite3, it works with one user, there is still the locking problem with several users.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want to use it, get the 2 LD devices for Python for VMS at &lt;BR /&gt;&lt;A href="http://www.vmspython.org/DownloadAndInstallationPython" target="_blank"&gt;http://www.vmspython.org/DownloadAndInstallationPython&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;launch Python for your process only (see on that page&lt;BR /&gt;Process Installation) or for everybody&lt;BR /&gt;(see on that page &lt;BR /&gt;System Wide installation)&lt;BR /&gt;and you will have sqlite on VMS.&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Mar 2010 14:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181288#M39681</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2010-03-25T14:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite3 and locking</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181289#M39682</link>
      <description>Hi Labadie,&lt;BR /&gt;&lt;BR /&gt;thanks for your answer.&lt;BR /&gt;&lt;BR /&gt;You means that we can access to a database through only one thread?&lt;BR /&gt;&lt;BR /&gt;How can I acces to the last available sources files?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Mohcine</description>
      <pubDate>Thu, 25 Mar 2010 14:54:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sqlite3-and-locking/m-p/4181289#M39682</guid>
      <dc:creator>mohcine</dc:creator>
      <dc:date>2010-03-25T14:54:00Z</dc:date>
    </item>
  </channel>
</rss>

