IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2008, 1:27:44 PM (18 years ago)
Author:
jhoblitt
Message:

change find_objects_with_unavailable_instances query to work on a temporary table instead of directly on the mountedvol table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/bin/neb-admin

    r19790 r20030  
    33# Copyright (C) 2005-2008  Joshua Hoblitt
    44#
    5 # $Id: neb-admin,v 1.9 2008-09-30 21:55:44 jhoblitt Exp $
     5# $Id: neb-admin,v 1.10 2008-10-09 23:27:44 jhoblitt Exp $
    66
    77use strict;
     
    7070
    7171# so_id, ext_id, instances, available_instances, need_recovery, recoverable
     72{
     73    my $query = $dbh->prepare("CREATE TEMPORARY TABLE mymountedvol LIKE mountedvol");
     74    $query->execute;
     75}
     76
     77{
     78    my $query = $dbh->prepare("INSERT INTO mymountedvol SELECT * FROM mountedvol");
     79    $query->execute;
     80}
     81
    7282my $query = $dbh->prepare( $sql->find_objects_with_unavailable_instances
    7383        . " LIMIT $limit" );
    7484$query->execute;
     85
     86$dbh->do("DROP TABLE IF EXISTS mymountedvol");
    7587
    7688my @rows;
Note: See TracChangeset for help on using the changeset viewer.