Bug 1442370 - Change SQLITE_TEMP_FILE_PREFIX to a Mozilla unique value. r=asuth draft
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 01 Mar 2018 20:55:18 +0100
changeset 762193 879f24d8b894eaeeae1cbb6db964485d05e4f1e2
parent 761787 e33efdb3e1517d521deb949de3fcd6d9946ea440
push id101099
push usermak77@bonardo.net
push dateThu, 01 Mar 2018 22:01:48 +0000
reviewersasuth
bugs1442370
milestone60.0a1
Bug 1442370 - Change SQLITE_TEMP_FILE_PREFIX to a Mozilla unique value. r=asuth MozReview-Commit-ID: 3VRCec9QI1F
db/sqlite3/src/moz.build
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -88,14 +88,19 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
 # System Sqlite is managed through a PRAGMA instead.
 if CONFIG['OS_TARGET'] == 'Android':
     # On Android there's no tmp partition, so always use a MEMORY temp store.
     DEFINES['SQLITE_TEMP_STORE'] = 3
 elif CONFIG['HAVE_64BIT_BUILD']:
     # On 64bit platforms default to a MEMORY temp store for performance.
     DEFINES['SQLITE_TEMP_STORE'] = 2
 
+# Change the default temp files prefix, to easily distinguish files we created
+# vs files created by other Sqlite instances in the system.
+# This has obviously no effect in case of System Sqlite.
+DEFINES['SQLITE_TEMP_FILE_PREFIX'] = '"mz_etilqs_"'
+
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-type-limits',
     ]