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 single quote and backslash when writing GUIDs as byte arrays. #265

merged 1 commit into from May 26, 2017


Copy link

@adampoit adampoit commented May 25, 2017

This code is copied from writing a byte array.

These byte values were not escaped when writing a GUID as a byte array, causing syntax errors when doing something like

var query = @"insert into table(value) select @value from dual";
database.Connection.Execute(query, new { value = Guid.NewGuid() });

when OldGuids=true.

Since the code is duplicated, I can refactor it into a method if we feel that's appropriate.

@bgrainger bgrainger merged commit affbb9c into mysql-net:master May 26, 2017
2 checks passed
bgrainger added a commit that referenced this issue May 26, 2017
Escape single quote and backslash when writing GUIDs as byte arrays.
Copy link

@bgrainger bgrainger commented May 26, 2017

Fixed in 0.19.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants