From 2e865375cbc90bdc25c39adc28a14da54e223fcc Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Wed, 15 Dec 2010 17:42:37 -0800 Subject: Bug 619581: Make contrib/bzdbcopy.pl work again, and also make it work with SQLite. r=mkanat, a=mkanat --- Bugzilla/DB/Sqlite.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm index c518486ae..2c3448acf 100644 --- a/Bugzilla/DB/Sqlite.pm +++ b/Bugzilla/DB/Sqlite.pm @@ -235,9 +235,23 @@ sub sql_string_until { return "SUBSTR($string, 1, $position - 1)" } +############### +# bz_ methods # +############### + # XXX This needs to be implemented. sub bz_explain { } +sub bz_table_list_real { + my $self = shift; + my @tables = $self->SUPER::bz_table_list_real(@_); + # SQLite includes a sqlite_sequence table in every database that isn't + # one of our real tables. We exclude any table that starts with sqlite_, + # just to be safe. + @tables = grep { $_ !~ /^sqlite_/ } @tables; + return @tables; +} + 1; __END__ @@ -252,4 +266,4 @@ This module overrides methods of the Bugzilla::DB module with a SQLite-specific implementation. It is instantiated by the Bugzilla::DB module and should never be used directly. -For interface details see L and L. \ No newline at end of file +For interface details see L and L. -- cgit v1.2.3-24-g4f1b