home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MJGraf" data-source="post: 1040565" data-attributes="member: 17886"><p>Absolutely!</p><p>But I think it is not only the InitializationCommand. We have to do two things:</p><p> </p><p>In SQLiteSettings just delete the part about locking_mode (normal is standard) so that it looks like:</p><p>private const string DEFAULT_INITIALIZATION_COMMAND = "PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;";</p><p> </p><p>And in SQliteDatabase's Constructor comment out the following:</p><p> connBuilder.JournalMode = SQLiteJournalModeEnum.Off;</p><p> using (var connection = new SQLiteConnection(connBuilder.ToString()))</p><p> {</p><p> connection.Open();</p><p> using (var command = new SQLiteCommand("PRAGMA locking_mode=EXCLUSIVE;", connection))</p><p> command.ExecuteNonQuery();</p><p> connection.Close();</p><p> }</p><p>The latter is a workaround to avoid storing the shared memory used for different connections from different processes to disk in a SHM-File, since this is not necessary in exclusive mode. But as you see it also opens an exclusive connection independent from the InitializationCommand. Just commenting it out should do the trick.</p><p> </p><p>If you want to do a new build, please feel free to make the amendments. Have to do some real live work today and am not sure, whether I find the time to do this myself today...</p><p> </p><p>Michael</p></blockquote><p></p>
[QUOTE="MJGraf, post: 1040565, member: 17886"] Absolutely! But I think it is not only the InitializationCommand. We have to do two things: In SQLiteSettings just delete the part about locking_mode (normal is standard) so that it looks like: private const string DEFAULT_INITIALIZATION_COMMAND = "PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;"; And in SQliteDatabase's Constructor comment out the following: connBuilder.JournalMode = SQLiteJournalModeEnum.Off; using (var connection = new SQLiteConnection(connBuilder.ToString())) { connection.Open(); using (var command = new SQLiteCommand("PRAGMA locking_mode=EXCLUSIVE;", connection)) command.ExecuteNonQuery(); connection.Close(); } The latter is a workaround to avoid storing the shared memory used for different connections from different processes to disk in a SHM-File, since this is not necessary in exclusive mode. But as you see it also opens an exclusive connection independent from the InitializationCommand. Just commenting it out should do the trick. If you want to do a new build, please feel free to make the amendments. Have to do some real live work today and am not sure, whether I find the time to do this myself today... Michael [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom