Menu

#4891 (ok 4.4.6) CSV Import ignores "Replace table data with file" checkbox

3.5.1
fixed
None
Normal
2015-05-07
2015-05-07
No

As reported at http://stackoverflow.com/questions/29947195/phpmyadmin-csv-upload-replace-data-not-working

Selecting the checkbox does not replace the table data with the data in the import file; it only adds the file's contents to the existing data.

Discussion

  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    This directive is used to add ON DUPLICATE KEY UPDATE clause which updates an already existing row when the new row has the same value for a PRIMARY KEY or a UNIQUE index. It does not perform any TRUNCATE operation before importing.

    So, obviously the text is misleading. I suggest to change the text.

     
  • Isaac Bennetch

    Isaac Bennetch - 2015-05-07

    Looks like there are three places to change this.

    What about changing "Replace table data with file" to "Update data when duplicate keys found on import (add ON DUPLICATE KEY UPDATE)" -- is that too long? Maybe a shorter form: "Update data with ON DUPLICATE KEY UPDATE"?

     
  • Madhura Jayaratne

    I think the former one is more clearer. I'm changing now.

     
  • Madhura Jayaratne

    It looked little too long for the settings page. How about https://github.com/phpmyadmin/phpmyadmin/pull/1663

     
  • Madhura Jayaratne

    • summary: CSV Import ignores "Replace table data with file" checkbox --> (ok 4.4.6) CSV Import ignores "Replace table data with file" checkbox
     
  • Marc Delisle

    Marc Delisle - 2015-05-07
    • Status: open --> fixed