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.
Logged In: YES
user_id=192186
You're right, new import system doesn't handle correctly
escaped chars.
Logged In: YES
user_id=210714
Michal, is this a big job to fix?
Logged In: YES
user_id=192186
I think it is not, I will look at this today.
Logged In: YES
user_id=192186
However I will need new message, so it's probably not fix
for 2.7.0.
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.
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 ?
Logged In: YES
user_id=192186
Fixed in CVS HEAD, I'm going to backport for 2.7.0.
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.
Logged In: YES
user_id=210714
OK so I'm preparing to release 2.7.0.
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?
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.
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
Logged In: YES
user_id=192186
There is different bugs for this issue, please keep this closed.
See bug 1373386
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.
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.