Bug #70106 mysqlimport fails when the replace option is used and a column list
| Submitted: | 21 Aug 2013 13:53 | Modified: | 22 Aug 2013 18:12 |
|---|---|---|---|
| Reporter: | Philip Orleans | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
| Version: | 5.7.1-m11, 5.7.2-m12 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | load data infile mysqlimport | ||
[21 Aug 2013 13:53]
Philip Orleans
[22 Aug 2013 18:12]
MySQL Verification Team
Hello Philip, Thank you for the report. Verified as described. Thanks, Umesh
[22 Aug 2013 18:18]
MySQL Verification Team
#### Other than adding actual column names etc..another way is to add @variable i.e --columns=did,lrn,ocn,grtype.. and add @variableN in order to skip those columns you do not need and fetch their defaults... [ushastry@cluster-repo mysql-5.7.2-m12]$ [ushastry@cluster-repo mysql-5.7.2-m12]$ bin/mysqlimport -uroot -p --local --compress --ignore-lines=0 --replace --fields-terminated-by=',' --lines-terminated-by='\n' test /tmp/lrn.txt --columns=did,lrn,ocn,grtype,@variable1 Enter password: test.lrn: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 [ushastry@cluster-repo mysql-5.7.2-m12]$ // mysql> select * from lrn; +------------+------------+------+--------+----+ | did | lrn | ocn | grtype | dr | +------------+------------+------+--------+----+ | 2012000002 | 2018446199 | 8824 | 1 | 3 | | 2012000004 | 7327919933 | 7058 | 0 | 3 | +------------+------------+------+--------+----+ 2 rows in set (0.00 sec) Imho - mysqlimport client provides a command-line interface to the LOAD DATA INFILE SQL statement and hence it should also have some kind of "SET" option which can help avoid this..
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 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.