Open leonardlaw opened 11 years ago
Exactly the same problem here. The statistics tables are not created when the database layout is made.
No statement to this issue?
It seems statistics tables are created now from a different sql file: https://raw.github.com/metabrainz/musicbrainz-server/master/admin/sql/statistics/CreateTables.sql
As a workaround you will need to manually run the sql file and rename files statistics.statistic and statistic.statistic_event from mbdump directory to statistic and statistic_event prior to loading data.
An (untested) patch has been commited. Please check if the current version solves the issue.
No dice:
DBD::mysql::st execute failed: Incorrect table name 'statistics.statistic' at backend/mysql.pl line 194. DBD::mysql::st fetchrow_array failed: fetch() without execute() at backend/mysql.pl line 195. Undefined subroutine &main::strlen called at backend/mysql.pl line 125.
I've not tested the patch yet ( https://github.com/elliotchance/mbzdb/pull/51, https://github.com/elliotchance/mbzdb/commit/75ab1c82dd15eecd8a96143fbb0f0fb097b555d5 ) , but I think it solves the issue. Are you using the last version?
Yes, using the latest. The tables don't seem to get created. But I do see your patches to backend/mysql.pl and settings.pl
woops! yes, there's still a bug: on line 118 $file should be $table AND both if's should be swapped ($table should be fixed if we're iterating on a statistics table prior to colum_exists call).
I'm going to add a pull request for this, but we'll need to wait until elliot merges it on the master branch.
Seems like it would work, but the statistics tables are not actually created. I suspect if I manually created them, the script would work fine. Haven't had a chance to try, though.
Yes, downloading and executing the CreateTables.sql for statistics is still missing...
Working on the patch.
DBD::mysql::st execute failed: Incorrect table name 'statistics.statistic' at backend/mysql.pl line 189. DBD::mysql::st fetchrow_array failed: fetch() without execute() at backend/mysql.pl line 190.
Sun Jan 13 18:23:12 2013: Loading data into 'statistics.statistic' (94 of 112)... DBD::mysql::db do failed: Incorrect table name 'statistics.statistic' at src/functions.pl line 93. [ERROR] SQL: 'LOAD DATA LOCAL INFILE 'mbdump/statistics.statistic' INTO TABLE
statistics.statistic
FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\' LINES TERMINATED BY '\n' STARTING BY '''