mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 05:15:49 +03:00
[PR #77] Fix compare of data fields for NULL values #252
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#252
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/DBDiff/DBDiff/pull/77
Author: @dev-jan
Created: 4/26/2018
Status: 🔄 Open
Base:
master← Head:fix-null-data-compare📝 Commits (2)
18f42c1Fix compare of data fields for NULL valuesdd7cc73Fix test suite: Only run tests with php 7 and higher📊 Changes
2 files changed (+14 additions, -7 deletions)
View changed files
📝
.travis.yml(+0 -3)📝
src/DB/Data/LocalTableData.php(+14 -4)📄 Description
The MySQL md5() function will return NULL if one of the given columns has
a NULL values in it. So if one field in the row is NULL, the whole MD5
will be NULL and the compare not actually work.
If the values is wrapped into a "IFNULL", all NULL values will be replaced
with '' (an empty string) for the compare of the values. This can maybe be
bad also, as the values '' and NULL are threaded the same. For this reason
all NULL values are joined together to check if there are still the same
as before.
Fixes #53
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.