Closed GCRVL closed 7 years ago
BTW, I fixed it in my source by placing the line path << DB_DATA_DIR + "/" + mod_file;
above the threaded_insert(
It works fine on my side and I remember not putting an absolute path. On my Debian, MySQL does not expect the file path to be absolute if this file is in the MySQL data folder. Since your tweak also works, I guess I'll update all the loops to use your approach in order to be compatible with everybody.
When the various loops write the temporary files it's done this way:
path << DB_DATA_DIR << "/mods_" << random_id(10) << ".txt";
mod_file.open( path.str());
However, when the parser tries to read them for DB insertion, this happens:
threaded_insert( "LOAD DATA CONCURRENT INFILE '" + mod_file + "' REPLACE INTO TABLE
ModsFIELDS TERMINATED BY ',' ENCLOSED BY '\"' ESCAPED BY '\"' LINES TERMINATED BY '\n'" );
path << DB_DATA_DIR + "/" + mod_file;
This causes all insertions to fail as it will attempt to load the files from the same folder as the indexer itself, while the user might have specified another location.