I know this disussion turned a bit away from the first posted problem ..
But I think I can shed some light into the ” Brighthouse: Session terminated unexpectedly, uncommitted transactions rolled back.” problem:
mysql> Set AUTOCOMMIT=0;
Query OK, 0 rows affected (0,00 sec)
mysql> LOAD DATA INFILE '/data/accesslogs/filecleaned.tsv' INTO TABLE referrer_access_log_200903 FIELDS TERMINATED BY "\t" ENCLOSED BY '"';
ERROR 1402 (XA100): Brighthouse: Session terminated unexpectedly, uncommitted transactions rolled back.
mysql> Set AUTOCOMMIT=1;
Query OK, 0 rows affected (0,01 sec)
mysql> LOAD DATA INFILE '/data/accesslogs/filecleaned.tsv' INTO TABLE referrer_access_log_200903 FIELDS TERMINATED BY "\t" ENCLOSED BY '"';
ERROR 2 (HY000): Wrong data or column definition. Row: 12773, field: 20.
It seems that the Brighthouse loader returns different error messages depending on whether or not the AUTOCOMMIT-flag is turned off.
In the end the problem is caused by some irregularities in the data (the data is simply longer than the allowed size for the field). Ommitting this line successfully loads the file - at least in my case