You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using REPLACE instead of INSERT with :copyfrom in MySQL doesn't add REPLACE to resulting LOAD DATA LOCAL INFILE query #4339
When using :copyfrom with MySQL, if original sql query is an INSERT one, resulting query string looks like
LOAD DATA LOCAL INFILE '%s' INTO TABLE locations %s (id, name, address, latitude, longitude)
However, when original query is a REPLACE one (so the operation is functionally an _up_sert), the resulting string is the exact same, when it, I believe, should be something like
LOAD DATA LOCAL INFILE '%s' REPLACE INTO TABLE locations %s (id, name, address, latitude, longitude)
Tested locally, the additional REPLACE seems to work
Relevant log output
Database schema
createtablelocations
(
id varchar(512) not nullprimary key,
name textnot null,
address textnot null,
latitude float null,
longitude float null
);
Activity