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

Escape backslashes in PDODBMultiIngestor for MySQL LOAD DATA INFILE #52

Merged
merged 1 commit into from Feb 15, 2017

Conversation

jtpalmer
Copy link
Contributor

Description

Escape backslashes in data fields.

Motivation and Context

Backslashes must be escaped in data fields (see https://dev.mysql.com/doc/refman/5.5/en/load-data.html). Depending on what character directly follows the backslash a variety of issues arise. If a field contains only a backslash it escapes the enclosing character corrupting all data that follows.

Tests performed

Shredded and ingested data containing a backslash. Confirmed that the correct data was ingested.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jtpalmer jtpalmer added the bug Bugfixes label Feb 13, 2017
@jtpalmer jtpalmer added this to the v6.6.0 milestone Feb 13, 2017
Copy link
Contributor

@smgallo smgallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do the same in ETLv2.

@jtpalmer jtpalmer merged commit 63d6648 into ubccr:xdmod6.6 Feb 15, 2017
@jtpalmer jtpalmer deleted the ingestor-escape-backslash branch February 15, 2017 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes
Projects
None yet
2 participants