2010-11-08 Sergio Martin <sergio.martin@artica.es>
* util/pandora_recode_db.pl: Checked if the tables exists to avoid the recodification in case of purely open installations git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3553 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
adee2af5fe
commit
63f076a151
|
@ -1,3 +1,9 @@
|
|||
2010-11-08 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* 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 <sergio.martin@artica.es>
|
||||
|
||||
* util/pandora_sync_db.pl: Changed from DELETE to
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue