database is not responding for hours trying to import a 2mb csv with MariaDB I'm trying to import some csv files into my mysql mariadb database, but I'm having problems with some files.
Importing csv with a line with only spaces (2MB of space character) the database stops for hours without giving an answer. 
I then created a csv file with only spaces, copying it exactly from one of the many files that cause the problem: 1.888.653 byte of spaces and when I run the query by importing this file the server no longer responds.

MariaDB version: 10.1.31-MariaDB - mariadb.org binary distribution
Protocol version: 10

This is the query I run:

LOAD DATA LOCAL INFILE 
'x:/storage/sizetest.txt'
IGNORE
INTO TABLEdatatest
LINES TERMINATED BY "\n"
(@line)
SET
email= REGEXP_SUBSTR(@line, "^[^;:,]*"),
password= REGEXP_SUBSTR(@line, "[^;:,]+$");

This is the server structure:
email: varchar(255) utf8_bin
password: varchar(255) utf8_bin

My.ini configuration:

key_buffer = 64M
max_allowed_packet = 1M
sort_buffer_size = 5M 
net_buffer_length = 8M 
read_buffer_size = 5M 
read_rnd_buffer_size = 5M 
myisam_sort_buffer_size = 8M 
log_error = "mysql_error.log" 
innodb_buffer_pool_size = 2650M
innodb_additional_mem_pool_size = 64M
innodb_log_file_size = 2048M
innodb_log_buffer_size = 512M
bulk_insert_buffer_size = 2048M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50

Log files do not report any errors while waiting. I waited more than 2 hours and then I stopped loading, and every time I encounter a file like that the server no longer responds. How can I solve this problem?
Either there is a bug, or the system is ferociously swapping.

Do not blindly increase settings.  How much RAM do you have?  It sounds like you have over-committed RAM and are in the throws of heavy swapping.

innodb_buffer_pool_size = 2650M  -- OK if you have at least 6GB of RAM
innodb_log_buffer_size = 512M    -- go back to default
bulk_insert_buffer_size = 2048M  -- go back to default


All of these could be allocated simultaneously, adding up to 7GB, which would be tight in 8GB of RAM.  If you had multiple connections, running, the last one could be allocated multiple times, thereby needing even more RAM.

As a rule, anything named "buffer" or "cache" does not need to be set to huge values.  Large values help, but there are "diminishing returns".  When large values lead to swapping, performance suffers severely.

These may be directly relevant to loading a CSV file:

max_allowed_packet = 1M  -- change to 4M (due to the nature of your data)
net_buffer_length = 8M 
read_buffer_size = 5M 
bulk_insert_buffer_size = 2048M  -- go back to default (8M)


If you expect 1.8MB of spaces to be put into varchar(255), well, it will be truncated.

Which Engine is the table?