Menu

#1884 (in 2.7.0) CSV Import Broken

2.7.0-pl2
fixed
1
2013-06-11
2005-12-01
No

CSV Import seems broken in 2.7.0 RC 1.

Two issues:
(1) I cannot enter \t in the "Fields Terminated" box - it only allows a
single character

(2) If I set that as the default in config.inc.php, when I try to upload a text
file, it says that it was successful, but no data is added to the database.

Here are my import settings:

$cfg['Import']['csv_replace'] = FALSE;
$cfg['Import']['csv_terminated'] = '\t';
$cfg['Import']['csv_enclosed'] = '"';
$cfg['Import']['csv_enclosed_optionally'] = TRUE;
$cfg['Import']['csv_escaped'] = '';
$cfg['Import']['csv_new_line'] = '\r';
$cfg['Import']['csv_columns'] = '';

I am trying to upload a file created on MacOS X. Upload in this way has
always worked for me in the past, as I regularly upload data from CSV
files.

Using MySQL 5.0.16, Safari Browser 2.0.2.

Discussion

  • Michal Čihař

    Michal Čihař - 2005-12-04
    • assigned_to: nobody --> nijel
     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    You're right, new import system doesn't handle correctly
    escaped chars.

     
  • Marc Delisle

    Marc Delisle - 2005-12-04

    Logged In: YES
    user_id=210714

    Michal, is this a big job to fix?

     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    I think it is not, I will look at this today.

     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    However I will need new message, so it's probably not fix
    for 2.7.0.

     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    However LOAD DATA plugin should work as it worked in
    previous versions, so it's not that big issue as you can use
    it to load data.

     
  • Marc Delisle

    Marc Delisle - 2005-12-04

    Logged In: YES
    user_id=210714

    Just put an English string (hardcoded) for 2.7.0 and a new
    message in HEAD. I guess we'll need 2.7.0-rc2 ?

     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    Fixed in CVS HEAD, I'm going to backport for 2.7.0.

     
  • Michal Čihař

    Michal Čihař - 2005-12-04

    Logged In: YES
    user_id=192186

    Fixed also in QA_2_7_0.

    I don't feel need for another rc beacuse of this, as this
    can't break anything else.

     
  • Michal Čihař

    Michal Čihař - 2005-12-04
    • summary: CSV Import Broken in 2.7.0rc1 --> (in 2.7.0) CSV Import Broken in 2.7.0rc1
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2005-12-04

    Logged In: YES
    user_id=210714

    OK so I'm preparing to release 2.7.0.

     
  • Michal Čihař

    Michal Čihař - 2005-12-04
    • status: open-fixed --> closed-fixed
     
  • Ralph Martin

    Ralph Martin - 2005-12-05

    Logged In: YES
    user_id=1394538

    I'm not clear how people are supposed to be able to use LOAD DATA if they can't
    tell it what field and record separators to use. Can you explain further?

    Or have you fixed it so that people can use correct record separators now?

     
  • Ralph Martin

    Ralph Martin - 2005-12-05

    Logged In: YES
    user_id=1394538

    This is not fixed. I have filed a new bug report for 2.7.0.

    While you CAN put in a record spearator, you stil CANNOT put in a field
    spearator like \t for both of CSV and CSV LOAD DATA import.

    These are unusuable.

     
  • richard hornsby

    richard hornsby - 2006-01-06

    Logged In: YES
    user_id=105953

    This is not fixed as of 2.7.0pl2.

    Changing line 15 of libraries/import/csv.php to

    array('type' => 'text', 'name' => 'terminated', 'text' =>
    'strFieldsTerminatedBy', 'size' => 2, 'len' => 2)

    Doesn't fix the problem, because somewhere else phpMyAdmin dies:

    Error
    Invalid parameter for CSV import: Lines terminated by

     
  • Marc Delisle

    Marc Delisle - 2006-01-07
    • milestone: 542285 --> 2.7.0-pl2
    • priority: 1 --> 5
    • summary: (in 2.7.0) CSV Import Broken in 2.7.0rc1 --> CSV Import Broken in 2.7.0-pl2
    • status: closed-fixed --> open
     
  • Michal Čihař

    Michal Čihař - 2006-01-07
    • summary: CSV Import Broken in 2.7.0-pl2 --> (in 2.7.0) CSV Import Broken
    • priority: 5 --> 1
    • status: open --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2006-01-07

    Logged In: YES
    user_id=192186

    There is different bugs for this issue, please keep this closed.

    See bug 1373386

     
  • richard hornsby

    richard hornsby - 2006-01-07

    Logged In: YES
    user_id=105953

    With all due respect, please this time and in the future
    change the resolution to 'duplicate' and not 'fixed' if the
    bug is being tracked elsewhere. This is why it keeps
    getting reopened. Thanks.

     
  • Michal Čihař

    Michal Čihař - 2006-01-07

    Logged In: YES
    user_id=192186

    We usually do so, but here it's caused by history: First
    this bug was reported and "fixed". Then another bug for new
    version appeared, so I (maybe wrongly) kept new one opened
    and this closed.

     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB