skip empty queries to eliminate spurious warnings on ->deploy
Matt S Trout [Sat, 15 Jul 2006 17:10:55 +0000 (17:10 +0000)]
Changes
lib/DBIx/Class/Storage/DBI.pm

diff --git a/Changes b/Changes
index 6a0c4fc..1285abc 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 Revision history for DBIx::Class
 
+        - skip empty queries to eliminate spurious warnings on ->deploy
         - fixups to ORDER BY, tweaks to deepen some copies in ResultSet
         - fixup for RowNum limit syntax with functions
 
index 4116595..d5c34c7 100644 (file)
@@ -1050,6 +1050,7 @@ sub deploy {
 #      next if($_ =~ /^DROP/m);
       next if($_ =~ /^BEGIN TRANSACTION/m);
       next if($_ =~ /^COMMIT/m);
+      next if $_ =~ /^\s+$/; # skip whitespace only
       $self->debugobj->query_start($_) if $self->debug;
       $self->dbh->do($_) or warn "SQL was:\n $_";
       $self->debugobj->query_end($_) if $self->debug;