summaryrefslogtreecommitdiffstats
path: root/support/schema
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-01 16:58:09 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-03-04 10:29:13 +0100
commitb9690972d084c09f5cc080322db29c54be872045 (patch)
treea7e28ca302e4b65a9d92379c3fa866d8244e4142 /support/schema
parentfcaee288184e29bd6b05bf168beda89e63eb0a81 (diff)
downloadaur-b9690972d084c09f5cc080322db29c54be872045.tar.gz
aur-b9690972d084c09f5cc080322db29c54be872045.tar.xz
Use a single transaction to write dummy data
This is immensely faster when using InnoDB since we don't need to sync after each and every INSERT statement. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'support/schema')
-rwxr-xr-xsupport/schema/gendummydata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py
index 090aabb5..d51b16c8 100755
--- a/support/schema/gendummydata.py
+++ b/support/schema/gendummydata.py
@@ -54,6 +54,7 @@ if len(sys.argv) != 2:
# Just let python throw the errors if any happen
#
out = open(sys.argv[1], "w")
+out.write("BEGIN;\n")
# make sure the seed file exists
#
@@ -313,6 +314,7 @@ for p in seen_pkgs.keys():
# close output file
#
+out.write("COMMIT;\n")
out.write("\n")
out.close()