-
Notifications
You must be signed in to change notification settings - Fork 615
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
SQL query length default changed in 3.36 #681
Comments
You explain quite well what happened and what's in sqlite, but you don't really explain what symptom or issue your experienced because of that. Would you be able to expand on that? |
The issue was with us bumping from version 3.34 --> 3.36, and few of our existing queries started failing due to
We have few large queries which were breaching the threshold. On looking at the commit diff, we would the above change which had inadvertently lowered the default limit. |
So what do you expect from this issue ticket then? Some kind of fix, or was it raised to make other people aware? |
My expectation would be to fix the default value back to what it was to maintain backward compatibility. Awareness and search-ability of this was the secondary reason. |
I don't think reverting the limit to no value is a good solution. Having sane defaults is good. The release mentions the change, but not the fact that it could break existing long queries. Maybe that's something that could be added in the release notes. |
I don't think reverting the limit to no value is a good solution. Having sane defaults is good.
Also i don't see any reason why the limits of this library should defer from what SQLite provides. I would argue that the library should be as transparent as possible, and allow clients to configure appropriate limits based on their usecase. |
The defaults in the driver are the same as the one in SQLite. |
I've come across the same problem and was glad to find this issue towards getting the cause.
But I am unable to find any mention of the
This mentions a default of 1G. So I wonder where the 1M default actually comes from? Is there any documentation of this in sqlite? If not, this may also be an issue for the sqlite docs. Well, reading a bit deeper an odd mention is this sentence
but this also does not state that there is a default limit of 1M bytes... |
Hi,
In SQLite 3.36, the default max SQL length has regressed from 1,000,000,000 bytes --> 1073741824 bytes
This was introduced in 57d597e
I believe we may have picked up this limit from SQLite documentation which states it as so: https://www.sqlite.org/rescode.html#toobig , however the real limit is actually larger and documented here: https://www.sqlite.org/limits.html#max_sql_length
I was able to validate the same in SQLite code as well: https://sqlite.org/src/file?name=src/sqliteLimit.h&ci=trunk
We can get around this by setting the limit via the SQLiteConfig, so not blocking in any manner. This was an FYI for this behavior.
Getting around it:
Regards,
Kanishka
The text was updated successfully, but these errors were encountered: