I am uploading a CSV file with 314 columns to a MariaDB 5.5 server. Currently my code looks like this:
CREATE TABLE table_name
(column_1 TEXT,
column_2 TEXT,
...
column_314 TEXT)
ROW_FORMAT=DYNAMIC;
LOAD DATA LOCAL INFILE filepath
INTO TABLE table_name
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
This results in the following error:
ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB
may help. In current row format, BLOB prefix of 0 bytes is stored inline.
I am using the Barracuda InnoDB file format with file per table enabled:
innodb_file_format=Barracuda
innodb_file_per_table=1
I believe the problem is the innodb page size, which is set to 16k. Since I am on MariaDB 5.5 and not 10.1+ I don't believe there is a way to increase the page size either. The database is managed by an organization and cannot currently be upgraded to a newer version.