Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export adding extra backslash on linebreaks #12765

Closed
NHcoder opened this issue Nov 30, 2016 · 7 comments

Comments

Projects
None yet
7 participants
@NHcoder
Copy link

commented Nov 30, 2016

Steps to reproduce

  1. Export a table that has \r\n (the actual binary values) in TEXT fields

Expected behaviour

Notice \\r\\n in the output.

Actual behaviour

This should be just \r\n

Server configuration

Operating system:
CentOS 6.8

Web server:
Apache 2.2.15

Database:
MySQL 5.5.53-1

PHP version:
5.6.28

phpMyAdmin version:
4.6.5.1-2

Client configuration

Browser:
Firefox 50.0

Operating system:
Windows 7 Home Premium

@knubew

This comment has been minimized.

Copy link

commented Nov 30, 2016

I can confirm this error !
Since version 4.6.4 phpMyAdmin is too buggy. :-(

I'll go back to the stable version 4.6.3.

@NHcoder

This comment has been minimized.

Copy link
Author

commented Nov 30, 2016

Going back through my update logs and when exports where done, this used to work in phpMyAdmin v4.6.4.

@knubew

This comment has been minimized.

Copy link

commented Nov 30, 2016

Yes, it was ok in 4.6.4. But this version has different other bugs, f.e. in the "Enum" function.
Version 4.6.3 was the last stable version for me.

@NHcoder

This comment has been minimized.

Copy link
Author

commented Nov 30, 2016

I think the issues is with libraries/plugins/export/ExportSql.php being changed to use $GLOBALS['dbi']->escapeString($db) instead of Util::sqlAddSlashes($db) which is no longer defined in libraries/Util.php.

@aommundsen

This comment has been minimized.

Copy link

commented Dec 1, 2016

Does anyone have a patch for this issue? If not I will have to downgrade to a older version.

@devenbansod devenbansod added the bug label Dec 1, 2016

devenbansod added a commit to devenbansod/phpmyadmin that referenced this issue Dec 1, 2016

Prevent extra back-slash while exporting new-lines
Fix phpmyadmin#12765

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

devenbansod added a commit to devenbansod/phpmyadmin that referenced this issue Dec 1, 2016

Prevent extra back-slash while exporting new-lines
Fix phpmyadmin#12765

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

devenbansod added a commit to devenbansod/phpmyadmin that referenced this issue Dec 1, 2016

Prevent extra back-slash while exporting new-lines
Fix phpmyadmin#12765

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

@nijel nijel self-assigned this Dec 1, 2016

@nijel nijel referenced this issue Dec 1, 2016

Merged

Fixed SQL export with newlines #12768

3 of 4 tasks complete

@nijel nijel added this to the 4.6.6 milestone Dec 1, 2016

@nijel nijel closed this in e61b213 Dec 1, 2016

ibennetch added a commit that referenced this issue Dec 5, 2016

Fixed SQL export with newlines
Remove manual escaping where we do proper escaping through MySQL
extension.

Fixes #12765

Signed-off-by: Michal Čihař <michal@cihar.com>
@bmbermn

This comment has been minimized.

Copy link

commented Jan 6, 2017

If anyone finds this and is using Plesk you can use the following work around until Plesk releases the updated version: https://support.plesk.com/hc/en-us/articles/115000064889?input_string=known+bug+w%2F+phpmyadmin+4.6.5.1

@lionel-m

This comment has been minimized.

Copy link

commented Jan 23, 2017

@nijel: This seems to be the same problem (?). It adds \\n in all the texts when exporting the DB.

I modified the libraries/plugins/export/ExportSql.php file according to the commit e61b213 but the problem persists.

Thanks

UPDATE: Sorry the changes I made were incomplete because d76c118 was missing. Now it works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.