Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/bootstrap-mysql
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-24 13:28:26 +0200
committerErich Eckner <git@eckner.net>2018-04-24 13:28:26 +0200
commit7673a80a19fa5c8cbd71afe9ecf93ee5ede223de (patch)
treeddebddbd5e096141bd03c9ab749eef0156a18d6a /bin/bootstrap-mysql
parentcefea1135f1a88ceb77f45758b07c0c824cd9d71 (diff)
bin/bootstrap-mysql,misc/database-layout.dump: small cleanup
Diffstat (limited to 'bin/bootstrap-mysql')
-rwxr-xr-xbin/bootstrap-mysql6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 822d995..8ccb2a2 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -408,6 +408,7 @@ if [ ! "$1" = 'slim' ]; then
# now we delete all unreplaceable and unmoveable packages from the respective
# list until no further changes are required
printf 'REPEAT\n'
+ printf 'SET row_count_saved = 0;\n'
# create copies of our temporary tables *yuck*
for table in 'replaced' 'moveable'; do
for copy in '' '2'; do
@@ -449,7 +450,7 @@ if [ ! "$1" = 'slim' ]; then
printf ' JOIN `moveable_binary_packages_copy` ON `moveable_binary_packages_copy`.`id`=`install_target_providers`.`package`'
printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`'
printf ');\n'
- printf 'SET @row_count_saved = ROW_COUNT();\n'
+ printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n'
# refresh copies of our temporary tables *yuck*
for table in 'replaced' 'moveable'; do
@@ -529,7 +530,8 @@ if [ ! "$1" = 'slim' ]; then
printf ' AND `subst_itp`.`install_target`=`install_target_providers`.`install_target`'
# b) 2) ^
printf ');\n'
- printf 'UNTIL row_count_saved=0 AND ROW_COUNT()=0\n'
+ printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n'
+ printf 'UNTIL row_count_saved=0\n'
printf 'END REPEAT;\n'
for table in 'moveable' 'replaced'; do
for copy in '' '2'; do