summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-12-03 21:42:31 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-07 12:38:58 +0000
commit549eccc0db48507dfda25aec1d8b0b5b8e1b3d16 (patch)
tree9307b3d432062d132961a36a35d3c56992d1caba /bitbake
parent7afa726becd9a13deb95299dc8ab83a5df8501db (diff)
downloadpoky-549eccc0db48507dfda25aec1d8b0b5b8e1b3d16.tar.gz
bitbake: persist_data: Add key constraints
Constructs the "key" column in the persistent database as a non-NULL primary key. This significantly speeds up lookup operations in large databases. [YOCTO #13030] (Bitbake rev: f5ba7775cfcb90401522d977cc66fe0f5aeb7a66) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/persist_data.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 1a6319f949..2bc3e766a9 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -94,7 +94,7 @@ class SQLTable(collections.MutableMapping):
94 self.table = table 94 self.table = table
95 self.connection = connect(self.cachefile) 95 self.connection = connect(self.cachefile)
96 96
97 self._execute_single("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);" % table) 97 self._execute_single("CREATE TABLE IF NOT EXISTS %s(key TEXT PRIMARY KEY NOT NULL, value TEXT);" % table)
98 98
99 @_Decorators.retry 99 @_Decorators.retry
100 @_Decorators.transaction 100 @_Decorators.transaction