[Lsb-messages] /var/www/bzr/lsb/devel/specdb r1217: Fix bashisms and permissions issues with LOAD DATA INFILE.
Jeff Licquia
licquia at linuxfoundation.org
Thu Nov 1 02:02:50 UTC 2012
------------------------------------------------------------
revno: 1217
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: specdb
timestamp: Wed 2012-10-31 22:02:50 -0400
message:
Fix bashisms and permissions issues with LOAD DATA INFILE.
modified:
makefile
-------------- next part --------------
=== modified file 'makefile'
--- a/makefile 2012-01-28 19:02:27 +0000
+++ b/makefile 2012-11-01 02:02:50 +0000
@@ -67,16 +67,16 @@
done
community_check::
- ret_code=0; \
+ @ret_code=0; \
for table in $(COMMUNITY); \
do \
- if [[ ! -e $$table.init ]]; \
+ if [ ! -e $$table.init ]; \
then \
echo "Missing community table init file: $$table.init"; \
ret_code=1; \
fi; \
done; \
- if [[ $$ret_code == "1" ]]; \
+ if [ $$ret_code -eq 1 ]; \
then \
echo "!!!Make sure you have the latest community data files unpacked to this folder"; \
fi; \
@@ -97,7 +97,7 @@
mysql $(DBOPTS) $$LSBDB <$$table.sql; \
case "$(ELEMENTS)" in \
*"$$table"*) mysql $(DBOPTS) $$LSBDB <$$table.init ;; \
- *) mysql $(DBOPTS) $(FILEOPTS) $$LSBDB -e "load data infile \"$${PWD}/$${table}.init\" into table $$table" ;; \
+ *) cp $${table}.init /tmp; chmod 644 /tmp/$${table}.init; mysql $(DBOPTS) $(FILEOPTS) $$LSBDB -e "load data infile \"/tmp/$${table}.init\" into table $$table"; rm /tmp/$${table}.init ;; \
esac;\
done'
FILEOPTS=$(FILEOPTS) ./create_cache_tables_inits.sh
@@ -138,7 +138,10 @@
set +e; \
echo $$table; \
mysql $(DBOPTS) $$LSBDB <$$table.sql; \
+ cp $$table.init /tmp; \
+ chmod 644 /tmp/$$table.init; \
mysql $(DBOPTS) $(FILEOPTS) $$LSBDB -e "load data infile '$$PWD/$$table.init' into table $$table";\
+ rm /tmp/$$table.init; \
done
FILEOPTS=$(FILEOPTS) ./create_cache_tables_inits.sh
mysql $(DBOPTS) $$LSBDB <create_cache_tables.sql;
More information about the lsb-messages
mailing list