IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2013, 2:24:56 PM (14 years ago)
Author:
eugene
Message:

add buffered inserts with multiple rows per insert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/Ohana/src/dvopsps/test/dbadmin.sh

    r34917 r34919  
    4747endif
    4848
     49if ("$1" == "delete") then
     50  if ($#argv != 4) goto usage;
     51  set dbhost = $2
     52  set dbname = $3
     53  set dbuser = $4
     54
     55  mysql -h $dbhost -u $dbuser -p <<EOF > /dev/null
     56   USE $dbname;
     57   describe dvoDetection;
     58EOF
     59
     60  if ($status) then
     61    echo "database does not contain dvoDetections, not deleting"
     62    exit 1;
     63  endif
     64
     65  echo "database is valid, deleting"
     66  mysql -h $dbhost -u $dbuser -p <<EOF
     67   drop database $dbname;
     68EOF
     69
     70   exit 0;
     71endif
     72
    4973usage:
    5074  echo "USAGE: dbadmin.sh (options)"
Note: See TracChangeset for help on using the changeset viewer.