René's URL Explorer Experiment


Title: Execute SQL doesn't play nicely with one-line comments · Issue #1004 · sqlitebrowser/sqlitebrowser · GitHub

Open Graph Title: Execute SQL doesn't play nicely with one-line comments · Issue #1004 · sqlitebrowser/sqlitebrowser

X Title: Execute SQL doesn't play nicely with one-line comments · Issue #1004 · sqlitebrowser/sqlitebrowser

Description: Single-line SQL comments cause peculiar behaviour if run in the "Execute SQL" tab. Say I run the following: -- This comment prevents line count working and "changes the database" SELECT * FROM events WHERE logid=81991 AND type='content' ...

Open Graph Description: Single-line SQL comments cause peculiar behaviour if run in the "Execute SQL" tab. Say I run the following: -- This comment prevents line count working and "changes the database" SELECT * FROM even...

X Description: Single-line SQL comments cause peculiar behaviour if run in the "Execute SQL" tab. Say I run the following: -- This comment prevents line count working and "changes the database"...

Opengraph URL: https://github.com/sqlitebrowser/sqlitebrowser/issues/1004

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Execute SQL doesn't play nicely with one-line comments","articleBody":"Single-line SQL comments cause peculiar behaviour if run in the \"Execute SQL\" tab.\r\n\r\nSay I run the following:\r\n`-- This comment prevents line count working and \"changes the database\"`\r\n`SELECT * FROM events WHERE logid=81991 AND type='content'`\r\nthen \r\n- I don't get the usual \"N rows returned\" message\r\n- the database is locked and Write/Revert changes are enabled\r\n- the correct result is returned\r\n\r\nAlternatively, if I run:\r\n`SELECT * FROM events WHERE logid=81991 AND type='content'`\r\n`-- This comment causes an error`\r\nthen \r\n- I get an \"Error executing query: ...\" response\r\n- no result is returned\r\n\r\nIn this case I can see that the SQL submitted by the application has had the line breaks removed, so the extra `SELECT COUNT(*) ...` that's added to give a line count is syntactically wrong, as the terminating `);` has become commented-out.\r\n\r\nFinally (so far), if I try to execute:\r\n`SELECT 40+2 -- get the answer`\r\n`AS answer`\r\n(N.B. `AS` is at the start of the line) then \r\n- I get an \"Error executing query: ...\" response\r\n- no result is returned\r\n\r\nIn this case the comment and newline have been removed completely, with the result that what's executed is `SELECT 40+2AS answer` (no whitespace between `2` and `AS`).\r\n\r\nI'd suggest the quick approach is to replace single-line comments with a single space, if you don't mind them being discarded from the submitted SQL. If you want to leave them in then you can't discard the newlines, as they're syntactically significant...\r\n\r\n\u003c!--\r\n\r\nThanks for coming here to report an issue. :)\r\n\r\nPlease describe it in this section, fill out the correct check boxes\r\nbelow with an \"x\", then click the \"Submit new issue\" button at the bottom\r\n\r\n-->\r\n\r\n\r\n\r\n### Useful extra information\r\n\r\n\u003c!-- The info below often helps, please fill it out if you're able to. :) -->\r\n\r\n#### I'm opening this issue because:\r\n\r\n- [ ] DB4S is crashing\r\n- [x] DB4S has a bug\r\n- [ ] DB4S needs a feature\r\n- [ ] DB4S has another problem\r\n\r\n#### I'm using DB4S on:\r\n\r\n- [x] Windows: ( _version:_ 7___ )\r\n- [ ] Linux: ( _distro:_ ___ )\r\n- [ ] Mac OS: ( _version:_ ___ )\r\n- [ ] Other: ___\r\n\r\n#### I'm using DB4S version:\r\n\r\n- [x] 3.9.1\r\n- [ ] 3.9.0\r\n- [ ] Other: ___\r\n\r\n#### I have also:\r\n\r\n- [ ] Tried out the nightly version: https://github.com/sqlitebrowser/sqlitebrowser#windows\r\n- [x] Searched for an existing similar issue: https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20\r\n","author":{"url":"https://github.com/h4yn0nnym0u5e","@type":"Person","name":"h4yn0nnym0u5e"},"datePublished":"2017-05-03T08:25:36Z","url":"https://github.com/sqlitebrowser/sqlitebrowser/issues/1004"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d200096a-cfb7-45a2-a289-60c2b243ad68
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD57A:1007B2:3F9F7:59524:6AFD4879
html-safe-nonceeb97051f7192c3db3e6edc3cd2e304709f47c9a65db6a37adafe0981459feb6e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTdBOjEwMDdCMjozRjlGNzo1OTUyNDo2QUZENDg3OSIsInZpc2l0b3JfaWQiOiIxNTE1MjgzMTU1NTIxNDU2MjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1175f3007d1b97122f1d58bfc6ebb219aece06c81dfa55f71f11a6554b508a00
hovercard-subject-tagissue:225913797
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlitebrowser/sqlitebrowser/1004/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4cefdb1197623324db143f3be224bdc5c8df7f1c79d15a1236b1d490300495ca/sqlitebrowser/sqlitebrowser/issues/1004
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4cefdb1197623324db143f3be224bdc5c8df7f1c79d15a1236b1d490300495ca/sqlitebrowser/sqlitebrowser/issues/1004
og:image:altSingle-line SQL comments cause peculiar behaviour if run in the "Execute SQL" tab. Say I run the following: -- This comment prevents line count working and "changes the database" SELECT * FROM even...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameh4yn0nnym0u5e
hostnamegithub.com
expected-hostnamegithub.com
Nonebdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474
turbo-cache-controlno-preview
go-importgithub.com/sqlitebrowser/sqlitebrowser git https://github.com/sqlitebrowser/sqlitebrowser.git
octolytics-dimension-user_id7454271
octolytics-dimension-user_loginsqlitebrowser
octolytics-dimension-repository_id19416551
octolytics-dimension-repository_nwosqlitebrowser/sqlitebrowser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id19416551
octolytics-dimension-repository_network_root_nwosqlitebrowser/sqlitebrowser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release556dd37bb0aceffb25724e151b5d858b3265b40b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlitebrowser%2Fsqlitebrowser%2Fissues%2F1004
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlitebrowser%2Fsqlitebrowser%2Fissues%2F1004
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sqlitebrowser%2Fsqlitebrowser
Reloadhttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004
Reloadhttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004
Reloadhttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004
sqlitebrowserhttps://github.com/sqlitebrowser
sqlitebrowserhttps://github.com/sqlitebrowser/sqlitebrowser
Codehttps://github.com/sqlitebrowser/sqlitebrowser
Issues786 (786)https://github.com/sqlitebrowser/sqlitebrowser/issues
Pull requests30 (30)https://github.com/sqlitebrowser/sqlitebrowser/pulls
Discussionshttps://github.com/sqlitebrowser/sqlitebrowser/discussions
Actionshttps://github.com/sqlitebrowser/sqlitebrowser/actions
Projectshttps://github.com/sqlitebrowser/sqlitebrowser/projects
Wikihttps://github.com/sqlitebrowser/sqlitebrowser/wiki
Security and qualityhttps://github.com/sqlitebrowser/sqlitebrowser/security
Insightshttps://github.com/sqlitebrowser/sqlitebrowser/insights
https://github.com/sqlitebrowser/sqlitebrowser
New issuehttps://github.com/login?return_to=https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
New issuehttps://github.com/login?return_to=https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
Execute SQL doesn't play nicely with one-line commentshttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004#top
windowshttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22windows%22
3.10.0 - A Rubber Cactus Has Many Useshttps://github.com/sqlitebrowser/sqlitebrowser/milestone/11
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issue-225913797
https://github.com/sqlitebrowser/sqlitebrowser#windowshttps://github.com/sqlitebrowser/sqlitebrowser#windows
https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20
Nexthttps://github.com/sqlitebrowser/sqlitebrowser/issues/1004?timeline_page=1
https://github.com/chrisjlocke
chrisjlockehttps://github.com/chrisjlocke
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298860238
https://cloud.githubusercontent.com/assets/7872218/25654381/b7fabc94-2fe8-11e7-8bb1-bf350c3b0a16.png
https://nightlies.sqlitebrowser.org/win64/https://nightlies.sqlitebrowser.org/win64/
https://nightlies.sqlitebrowser.org/win32/https://nightlies.sqlitebrowser.org/win32/
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298860941
@h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
@chrisjlockehttps://github.com/chrisjlocke
https://nightlies.sqlitebrowser.org/win32/https://nightlies.sqlitebrowser.org/win32/
https://nightlies.sqlitebrowser.org/win64/https://nightlies.sqlitebrowser.org/win64/
justinclifthttps://github.com/justinclift
response requestedhttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22response%20requested%22
windowshttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22windows%22
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1066893691
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298925870
@justinclifthttps://github.com/justinclift
https://github.com/chrisjlocke
chrisjlockehttps://github.com/chrisjlocke
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298929724
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298943261
@revolterhttps://github.com/revolter
https://github.com/revolter
revolterhttps://github.com/revolter
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-298998378
@justinclifthttps://github.com/justinclift
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-299017641
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-299036131
@revolterhttps://github.com/revolter
http://sqlite.org/lang_comment.htmlhttps://github.com/sqlitebrowser/sqlitebrowser/issues/url
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on May 3, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-299052585
@h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
https://github.com/revolter
revolterhttps://github.com/revolter
on May 4, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-299142283
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on May 4, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-299159258
@revolterhttps://github.com/revolter
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on May 8, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1073322704
Fix for end-of-line comment problems (Issue sqlitebrowser#1004)https://github.com/h4yn0nnym0u5e/sqlitebrowser/commit/0ee812b565e4fa4a9f19c8e5eee0189a030efb83
sqlitebrowser#1004https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
0ee812bhttps://github.com/h4yn0nnym0u5e/sqlitebrowser/commit/0ee812b565e4fa4a9f19c8e5eee0189a030efb83
Improved fix for Issue sqlitebrowser#1004https://github.com/h4yn0nnym0u5e/sqlitebrowser/commit/038030f69e7c401d90751c496be98e98823b5878
sqlitebrowser#1004https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
038030fhttps://github.com/h4yn0nnym0u5e/sqlitebrowser/commit/038030f69e7c401d90751c496be98e98823b5878
https://github.com/MKleusberg
MKleusberghttps://github.com/MKleusberg
on Aug 10, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321651743
@h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
https://github.com/MKleusberg
MKleusberghttps://github.com/MKleusberg
on Aug 10, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321653193
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on Aug 10, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321654760
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on Aug 11, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321919221
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on Aug 12, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321971468
@h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
justinclifthttps://github.com/justinclift
3.10.0 - A Rubber Cactus Has Many Useshttps://github.com/sqlitebrowser/sqlitebrowser/milestone/11
on Aug 12, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1203571254
https://github.com/MKleusberg
MKleusberghttps://github.com/MKleusberg
on Aug 12, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-321974753
https://github.com/h4yn0nnym0u5e
h4yn0nnym0u5ehttps://github.com/h4yn0nnym0u5e
on Aug 13, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-322033182
@MKleusberghttps://github.com/MKleusberg
justinclifthttps://github.com/justinclift
response requestedhttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22response%20requested%22
on Aug 13, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1203882904
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on Aug 20, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-323603152
justinclifthttps://github.com/justinclift
response requestedhttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22response%20requested%22
on Aug 20, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1213270723
https://github.com/justinclift
justinclifthttps://github.com/justinclift
on Nov 17, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#issuecomment-345302416
justinclifthttps://github.com/justinclift
completedhttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 17, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1347545089
justinclifthttps://github.com/justinclift
response requestedhttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22response%20requested%22
on Nov 17, 2017https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-1347545301
sqlitebrowserhttps://github.com/sqlitebrowser
tyson-rusthttps://github.com/tyson-rust
on Oct 20, 2025https://github.com/sqlitebrowser/sqlitebrowser/issues/1004#event-20383127828
Sign up for freehttps://github.com/signup?return_to=https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
Sign in to commenthttps://github.com/login?return_to=https://github.com/sqlitebrowser/sqlitebrowser/issues/1004
windowshttps://github.com/sqlitebrowser/sqlitebrowser/issues?q=state%3Aopen%20label%3A%22windows%22
3.10.0 - A Rubber Cactus Has Many Useshttps://github.com/sqlitebrowser/sqlitebrowser/milestone/11
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.