Menu

#4670 (ok 4.3.4) CSV import reads both commas and values into first column after first row

4.3.3
fixed
1
2014-12-29
2014-12-24
Leon White
No

Importing a CSV file under 4.3.3 results in all entries except the first row ignoring comma separators and filling the first column up to its limit, writing both commas and values into the cell until it is full. Strangely, the following columns still contain the correct values as if they had observed the comma separators.

This import functions correctly under phpmyadmin 4.2.9, and also functions correctly under 4.3.3 with "CSV using LOAD DATA". The file was prepared with LibreOffice under Windows 7 x64, with CR and LF line termination. The behaviour is still observed when changing the separator to a semicolon and specifying this in the phpmyadmin import. I therefore think this is a regression in phpmyadmin 4.3+, since I also observed it in 4.3.2

Server side
phpmyadmin 4.3.3
MySQL 5.5.40
PHP 5.5.9
Ubuntu 14.04.1

Client side
LibreOffice 4.3.5.2
Chrome 39.0.2171.95

Table structure and sample import file to reproduce this attached. The CSV is ugly but semantically correct, database design is yuck, I know...

CREATE TABLE IF NOT EXISTS import_test_433 (
ArticleID varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
Headline varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
JiebaoLink varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
ArticleLink varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
OriginalArticle varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
MediaOutlet varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Section varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PublishDate datetime DEFAULT NULL,
MediaType varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
NewsSource varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
OriginalMedia varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
OriginalDate varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
ArticleLength varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
GPSpecialRequest varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
GPCampaign varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
GPProject varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Output varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
GPMention varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Tone varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Reactive varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
HookDescription varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
GPPhoto varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
RelatedArticle varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
NewlyAdded varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
Notes varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE import_test_433
ADD PRIMARY KEY (ArticleID);

3 Attachments

Discussion

  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    • summary: CSV import reads both commas and values into first column after first row --> (ok 4.3.4) CSV import reads both commas and values into first column after first row
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-12-29
    • Status: resolved --> fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.