EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #02645


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: IRStats 1.0.3. - update_metadata error


Hi,

I answered my own question. I used this tip <https://github.com/eprints/eprints/issues/188> and I patched the file /perl_lib/IRStats/DatabaseInterface/mysql.pm (a "homemade" patch). I add ENGINE=MyISAM

///////////////////////////////////////
    my $index_id = "irs_".$set_id."_eprintid";
    $self->do("CREATE TABLE IF NOT EXISTS `$table` (`set_member_id` INT, `eprint_id` INT, PRIMARY KEY (`set_member_id`,`eprint_id`), INDEX `$index_id` (eprint_id)) ENGINE=MyISAM");
    $self->do("CREATE TABLE IF NOT EXISTS `$citation_table` (`set_member_id` INT, `short_citation` TINYTEXT, `full_citation` TEXT, `url` TEXT, PRIMARY KEY (`set_member_id`)) ENGINE=MyISAM");
    $self->do("CREATE TABLE IF NOT EXISTS `$code_table` (`set_member_code` VARCHAR(128), `set_member_id` INT, PRIMARY KEY (`set_member_code`(128))) ENGINE=MyISAM");
///////////////////////////////////////





On Tue, Feb 18, 2014 at 1:40 PM, Centro de Documentación <cendocu@gmail.com> wrote:
Hi,

When I tried to run update-metadata I got the following error message. update_table works fine.

Any clue?

Regards, Cristian

eprints@eprints:~$ ./cgi/irstats.cgi nulan update_metadata --verbose
UNIVERSAL->import is deprecated and will be removed in a future perl at /usr/share/eprints3/perl_lib/IRStats/Params.pm line 4
Reading eprint ids
Reading eprint citations and groups
Adding field 'Divisions' as set
Adding field 'Subjects' as set
Adding field 'Autores' as set
IMPORTING GROUPS: subjects, creators_name, divisions, eprint
--subjects--
DBD::mysql::db do failed: Table './nulan/irs_set_subjects' already exists at /usr/share/eprints3/perl_lib/IRStats/DatabaseInterface.pm line 609.
Execution of -- RENAME TABLE `irs_set_subjects` TO `irs_set_subjects_old`,`irs_set_subjects_new` TO `irs_set_subjects` () -- failed: Table './nulan/irs_set_subjects' already exists
 at /usr/share/eprints3/perl_lib/IRStats/DatabaseInterface.pm line 609
    IRStats::DatabaseInterface::do('IRStats::DatabaseInterface::mysql=HASH(0x142ff58)', 'RENAME TABLE `irs_set_subjects` TO `irs_set_subjects_old`,`ir...') called at /usr/share/eprints3/perl_lib/IRStats/DatabaseInterface/mysql.pm line 212
    IRStats::DatabaseInterface::mysql::rename_tables('IRStats::DatabaseInterface::mysql=HASH(0x142ff58)', 'irs_set_subjects', 'irs_set_subjects_old', 'irs_set_subjects_new', 'irs_set_subjects') called at /usr/share/eprints3/perl_lib/IRStats/CLI/update_metadata.pm line 313
    IRStats::CLI::update_metadata::write_to_database('IRStats::CLI::update_metadata=HASH(0x147cfa8)', 'HASH(0x62d7d48)') called at /usr/share/eprints3/perl_lib/IRStats/CLI/update_metadata.pm line 38
    IRStats::CLI::update_metadata::execute('IRStats::CLI::update_metadata=HASH(0x147cfa8)') called at /usr/share/eprints3/perl_lib/IRStats/CLI.pm line 62
    IRStats::CLI::handler() called at /usr/share/eprints3/perl_lib/IRStats.pm line 73
    IRStats::handler() called at ./cgi/irstats.cgi line 22