tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
11.25k stars 286 forks source link

preserve original lines during dump load in order to not break around comments #1565

Closed sivukhin closed 4 months ago

sivukhin commented 4 months ago

Context

Current code trim lines from dump which leads too incorrect statements which ending comments:

So, next example will become single line incorrect statement: CREATE TABLE (id INTEGER -- comment);

CREATE TABLE (
    id INTEGER -- comment
);

This PR fixes this and preserve original lines + add bad line number in the error to simplify issue resolution process