Bug #30358 mysqlimport seems to implicitly enable --ignore when --local is used

Submitted: 10 Aug 2007 12:57 Modified: 10 Aug 2007 13:17
Reporter: Tobias Asplund Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[10 Aug 2007 12:57] Tobias Asplund
Description:
mysqlimport behaves differently with --local than without.
The flag (or at least one of them) that behaves different is the --ignore option, see below:

How to repeat:
# Cut and paste friendly script
mysql -e "CREATE DATABASE IF NOT EXISTS test"
mysql -e "CREATE TABLE bugtest ( a INT PRIMARY KEY ) ENGINE = MyISAM" test
mysql -e "INSERT INTO bugtest VALUES (1)" test
echo "1" > /tmp/bugtest.csv
mysql -e "SELECT * INTO OUTFILE 'bugtest.csv' FROM bugtest" test
mysqlimport test bugtest.csv
#mysqlimport: Error: Duplicate entry '1' for key 1, when using table: bugtest
mysqlimport --local test /tmp/bugtest.csv
#test.bugtest: Records: 1  Deleted: 0  Skipped: 1  Warnings: 0
rm /tmp/bugtest.csv 
# Also have to delete the bugtest.csv in $DATADIR/test
# Note that even if you run this last one with --help it doesn't show ignore as TRUE
[10 Aug 2007 13:15] Tobias Asplund
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
says:

With LOCAL, the default behavior is the same as if IGNORE is specified; this is because the server has no way to stop transmission of the file in the middle of the operation.
So, the original submission is !Bg

However, the --help output should still show that ignore is set to TRUE if local is set.

flupps@flupps:~$ mysqlimport --local --help
...
ignore                            FALSE
...
[10 Aug 2007 13:17] Sveta Smirnova
Thank you for the report.

Verified as described in last comment.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.