diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index fa6e456829..fafb47a766 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2010-11-08 Sergio Martin + + * util/pandora_recode_db.pl: Checked if the tables exists + to avoid the recodification in case of purely open + installations + 2010-11-08 Sergio Martin * util/pandora_sync_db.pl: Changed from DELETE to diff --git a/pandora_server/util/pandora_recode_db.pl b/pandora_server/util/pandora_recode_db.pl index ad07300abb..73735c9af9 100755 --- a/pandora_server/util/pandora_recode_db.pl +++ b/pandora_server/util/pandora_recode_db.pl @@ -110,6 +110,13 @@ sub recode_store_tables() { sub recode_table ($$$) { my ($dbh, $table, $column) = @_; my $encoded_values = 0; + + my @tablestatus = get_db_rows ($dbh, "SHOW TABLE STATUS WHERE name = '$table'"); + + if($#tablestatus == -1) { + return 0; + } + my @rows = get_db_rows ($dbh, "SELECT $column FROM $table"); foreach my $row (@rows) {