diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2019-11-11 17:38:05 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2019-11-11 17:38:05 +0100 |
commit | e93dfe5f60e86d08b5bb4c64d1ce01f2fd1be4ae (patch) | |
tree | 1f7289908d9f318436921c35e5c786f06eccbade /server/lib/checkrest | |
parent | 83f20d1889a73f0088f61b4014c80fb4248a21be (diff) |
#839: Use global function to execute commands in the database.
Diffstat (limited to 'server/lib/checkrest')
-rwxr-xr-x | server/lib/checkrest | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/server/lib/checkrest b/server/lib/checkrest index 34f44ed1..3db161f5 100755 --- a/server/lib/checkrest +++ b/server/lib/checkrest @@ -44,21 +44,6 @@ function route () { printf "%-40s: %s\n" "- $METHOD $ROUTE" "$STATUS" } -# Execute database operation. -function dbexec () { - MYCNF=$(mktemp) - trap "rm -f $MYCNF" 0 1 2 3 6 9 15 - touch $MYCNF - chmod 600 $MYCNF - cat << EOT > $MYCNF -[client] -user=$USUARIO -password=$PASSWORD -EOT - mysql --defaults-extra-file="$MYCNF" -D "$CATALOG" -s -N -e "$1" || \ - raiseError access "Cannot access the databse" -} - # Delete test data from the database. function deletedata () { # Delete test data, if exists. |