#!/usr/bin/perl use strict; use warnings; use DBI; unlink "a.db"; my $dbh = DBI->connect("dbi:SQLite:dbname=a.db") or die; print '$DBI::VERSION ',$DBI::VERSION, "\n"; print '$DBD::SQLite::VERSION ',$DBD::SQLite::VERSION, "\n"; $dbh->do("create table a as select 123 as b"); my $sth = $dbh->prepare('select "hello" from a'); $dbh->do("analyze"); print "got ", $dbh->selectrow_array($sth), "\n"; $sth->finish; #undef $sth; # to stop "closing dbh with active statement handles" # http://rt.cpan.org/Ticket/Display.html?id=22688 $dbh->disconnect; __END__ $ perl analyze_changed.pl $DBI::VERSION 1.53 $DBD::SQLite::VERSION 1.13 DBD::SQLite::db selectrow_array failed: database schema has changed(1) at dbdimp.c line 421 at analyze_changed.pl line 16. got