title: Why does $dbh->do('VACUUM') fail with Perl's DBD::SQLite?
body: <p>I want to do <code>VACUUM</code> at a certain time on a SQLite database under Perl, but it always says</p>
  
  <blockquote>
    <p>DBD::SQLite::db do failed: cannot VACUUM from within a transaction</p>
  </blockquote>
  
  <p>So how do I do this?</p>
  
  <pre><code>my %attr = ( RaiseError =&gt; 0, PrintError =&gt; 1, AutoCommit =&gt; 0 );
  my $dbh = DBI-&gt;connect('dbi:SQLite:dbname='.$file'','',\%attr) 
      or die $DBI::errstr;
  </code></pre>
  
  <p>I am using <code>AutoCommit =&gt; 0</code>. And the error happens while:</p>
  
  <pre><code>$dbh-&gt;do('DELETE FROM soap');
  $dbh-&gt;do('DELETE FROM result');
  $dbh-&gt;commit; 
  $dbh-&gt;do('VACUUM');
  </code></pre>