SQLite Forum

SQLite diff tool doesn't work with CRLF new line characters
I use the SQLDiff tool to keep a backup of a main SQLite database. The backup DB is stored on an external storage device and is written to periodically. The SQL output of the diff tool is used to apply the changes to keep it up to date.

I have noticed that some text columns that contain new lines do not seem to be diffed correctly. The application that writes to the main database is a Universal Windows Platform (UWP) app and so I think it uses CRLF new lines in its text area controls.

When I run the diff tool on the backup and main databases I will get some SQL output like this even though the two DBs are identical:

~\Downloads\sqlite-tools-win32-x86-3360000\sqlite-tools-win32-x86-3360000\sqldiff.exe '~\Desktop\Test Diff\test_diff - Copy.db' '~\Desktop\Test Diff\test_diff.db'
UPDATE "Test Table" SET "Test Text"='THIS TEXT


I can execute this SQL query against the backup DB, run the diff tool again, and get the exact same output ad nauseum.

This becomes as a problem as we create more and more records in our DB with new lines causing the backup process takes longer and longer each time due to an ever increasing number of records to update.

Could this be an issue with the `sqldiff.exe` tool's handling of certain new line characters or is it my usage of the tool?

I have a minimum reproducible example DB I could share but I'm not sure where to host the file.

Many thanks in advance.