-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"Execute SQL" strips newlines #1334
Comments
Yes, the same issue is in the nightly version. MacOS 10.13.4 Beta. I know this has worked ok before, so it sure sounds like an OS related thingy. |
Thanks for replying back and confirming. |
I can reproduce it under Ubuntu 16.04. This is probably related to issue #1270 In fact, this: INSERT INTO "Manuel's"("my column") VALUES ('
-- Hello
-- World
'); becomes:
|
@remisture Is this a workaround for you? INSERT INTO "Manuel's"("my column") VALUES ('This is some text:
' || '
- List item
- This is another item
' || '
More text here'); Just placing a space at the empty lines would also work. I hope it helps. |
In order to avoid removing multiple line breaks inside strings, the replacement is only done when removeCommentsFromQuery has performed some substitution. Otherwise the query is left as is. This will improve the problem described in issue #1334 for simple cases. There will be still problems when the query has comments and multiple line breaks inside strings.
@remisture I've made a change that should fix at least the simple cases like the one you have reported. If there are comments, or something that we mistake with comments, in the query, it might still remove your line breaks. Could you try with the next nightly build, when it is available, and report your results? |
@mgrojo Thank you, I will try the next nightly build :) Sadly I'm not able to use your workaround, as I don't control the queries (exported from another system). Thanks anyway. |
I can confirm that |
Going to close this issue then because the original problem was solved a while ago and the more complex problem behind it was solved in #1455 a few days ago. If you feel like I closed this issue to early, feel free to reopen it anytime with some details on what still needs be improved 😄 |
When is this released? I'm in a situation now where the stable version has this bug, and the nightly version can't export to SQL file :/ Well, I guess I can import with the nightly and export with the stable 💃 Ref. #1476 |
As a thought, if you grab the nightly from Mar 6, that might not have this crash bug with the SQL export. The multi-threading stuff we've been working on, which might be behind this crash, was added in May with 51dbe72. If that does turn out to be the cause, then grabbing one of the builds before that should do the trick too. 😄 |
Details for the issue
There seems to be an issue with newlines in the "Execute SQL" feature. If I have more than one, they get stripped out. It seems to work as expected when going through "Browse data" -> "New record".
Any idea how I can get around this problem until a fix is released? (I have hundreds of thousands records I need to import, so manual typing is not an option).
Useful extra information
I'm opening this issue because:
I'm using DB4S on:
I'm using DB4S version:
I have also:
The text was updated successfully, but these errors were encountered: