Bug #3407 mysqlimport - Ability to handle better rows with repeating key fields
Submitted: 7 Apr 2004 1:20 Modified: 1 Oct 2008 11:53
Reporter: [ name withheld ] Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:Ver 3.4 Distrib 4.0.17 OS:Windows (Win95/98 i32)
Assigned to: CPU Architecture:Any
Tags: ufr

[7 Apr 2004 1:20] [ name withheld ]
When importing with mysqlimport there's no way to get output of any warnings.

When importing with -i (ignore) option (related also with -r (replace) option),
there is no way to manipulate rows with repeating primary key field.
  This is important to have for example in case when you import from table which is used remotely for current information, and import it to table which has much more data with history - I would like to be able to handle new data and combine it together with data in history table.

How to repeat:
import row of data to the table with primary key defined, where imported row(s) contain key-field with the same values as the one already in existing mysql table.

Suggested fix:
It would be very useful to have extra table(s) (maybe original table name with some predefined suffix) generated for: 

 - rows which have errors/warnings (structure of the new table could be all text fields, allowing longer strings, to accomodate all data that doesn't import to the defined format)

 - rows with key-fields already existing. (to use with option -i (ignore existing key-fields)
[1 Oct 2008 11:53] Valeriy Kravchuk
Thank you for a reasonable feature request. 

Oracle's SQL*Loader has a way to filter out rows that violates constraints and rows that do not conform to the format expected. So, it would be nice to have something similar in mysqlimport untility.