René's URL Explorer Experiment


Title: Offset without limit fails on SQLite: LIMIT 18446744073709551615 is out of range · Issue #42 · php-db/phpdb-sqlite · GitHub

Open Graph Title: Offset without limit fails on SQLite: LIMIT 18446744073709551615 is out of range · Issue #42 · php-db/phpdb-sqlite

X Title: Offset without limit fails on SQLite: LIMIT 18446744073709551615 is out of range · Issue #42 · php-db/phpdb-sqlite

Description: A Select with an offset and no limit fails on SQLite with General error: 20 datatype mismatch. Cause When only an offset is set, SelectDecorator::localizeVariables() replaces the LIMIT specification with a hard-coded MySQL value: phpdb-s...

Open Graph Description: A Select with an offset and no limit fails on SQLite with General error: 20 datatype mismatch. Cause When only an offset is set, SelectDecorator::localizeVariables() replaces the LIMIT specificatio...

X Description: A Select with an offset and no limit fails on SQLite with General error: 20 datatype mismatch. Cause When only an offset is set, SelectDecorator::localizeVariables() replaces the LIMIT specificatio...

Opengraph URL: https://github.com/php-db/phpdb-sqlite/issues/42

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Offset without limit fails on SQLite: LIMIT 18446744073709551615 is out of range","articleBody":"A Select with an offset and no limit fails on SQLite with `General error: 20 datatype mismatch`.\n\n## Cause\n\nWhen only an offset is set, `SelectDecorator::localizeVariables()` replaces the LIMIT specification with a hard-coded MySQL value:\n\nhttps://github.com/php-db/phpdb-sqlite/blob/8bfcfaa2f7859108f374d59cf1596c1a56417526/src/Sql/SelectDecorator.php#L33\n\n```php\nif ($this->limit === null && $this->offset !== null) {\n    $this->setSpecification(self::LIMIT, 'LIMIT 18446744073709551615');\n}\n```\n\n`18446744073709551615` is 2^64 − 1, MySQL's documented \"no limit\" value. SQLite's LIMIT takes a signed 64-bit integer, so the number does not fit and SQLite rejects it.\n\n## Reproduction\n\nPlain PDO, SQLite 3.53.4, PHP 8.3:\n\n```php\n$pdo = new PDO('sqlite::memory:');\n$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n$pdo->exec('CREATE TABLE t (id INTEGER)');\n$pdo->exec('INSERT INTO t VALUES (1), (2), (3)');\n\n$pdo->query('SELECT id FROM t LIMIT 18446744073709551615 OFFSET 1');\n// SQLSTATE[HY000]: General error: 20 datatype mismatch\n\n$pdo->query('SELECT id FROM t LIMIT -1 OFFSET 1')->fetchAll(PDO::FETCH_COLUMN);\n// [2, 3]\n```\n\nBinding the value as a parameter gives the same error.\n\n## Suggested fix\n\nUse SQLite's own idiom for \"no limit\", `LIMIT -1`, as documented in the [SQLite SELECT documentation](https://www.sqlite.org/lang_select.html#limitoffset): \"If the LIMIT expression evaluates to a negative value, then there is no upper bound on the number of rows returned\". Add an integration test that runs an offset-only Select against a real SQLite database. The existing unit tests only compare SQL strings, so they did not catch this.\n","author":{"url":"https://github.com/simon-mundy","@type":"Person","name":"simon-mundy"},"datePublished":"2026-10-12T02:48:05Z","url":"https://github.com/php-db/phpdb-sqlite/issues/42"}

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:6d184b8b-4518-a142-53bf-4c8b0cd777e4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE176:4FEF:12E778:1A699A:6AFD6DF7
html-safe-nonce78b2b050649b67b0e0e055d39e2ec8ab41917a2d275eb6159619da50e497a060
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTc2OjRGRUY6MTJFNzc4OjFBNjk5QTo2QUZENkRGNyIsInZpc2l0b3JfaWQiOiI4NTExNDEwODAxOTM4ODg2MTM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac22102cc5f238b5242fe0c4ea3284f30c32fa682ff8d3395c59ad1f9e96ae23f3
hovercard-subject-tagissue:5807639356
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/php-db/phpdb-sqlite/42/issue_layout
twitter:imagehttps://opengraph.githubassets.com/33317c13763d6fa0171aec025a26669ee2798e6fabb7de115c7a81eda3f4505b/php-db/phpdb-sqlite/issues/42
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/33317c13763d6fa0171aec025a26669ee2798e6fabb7de115c7a81eda3f4505b/php-db/phpdb-sqlite/issues/42
og:image:altA Select with an offset and no limit fails on SQLite with General error: 20 datatype mismatch. Cause When only an offset is set, SelectDecorator::localizeVariables() replaces the LIMIT specificatio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesimon-mundy
hostnamegithub.com
expected-hostnamegithub.com
None9985ca2e21b59673104d4d830d4afeb946c67f248f273ab2e824c31c8db46e4a
turbo-cache-controlno-preview
go-importgithub.com/php-db/phpdb-sqlite git https://github.com/php-db/phpdb-sqlite.git
octolytics-dimension-user_id219474457
octolytics-dimension-user_loginphp-db
octolytics-dimension-repository_id946916064
octolytics-dimension-repository_nwophp-db/phpdb-sqlite
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id946916064
octolytics-dimension-repository_network_root_nwophp-db/phpdb-sqlite
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
release0db9e8d463c3f4540570e6ad3c501a06db9dc02a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/php-db/phpdb-sqlite/issues/42#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphp-db%2Fphpdb-sqlite%2Fissues%2F42
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%2Fphp-db%2Fphpdb-sqlite%2Fissues%2F42
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=php-db%2Fphpdb-sqlite
Reloadhttps://github.com/php-db/phpdb-sqlite/issues/42
Reloadhttps://github.com/php-db/phpdb-sqlite/issues/42
Reloadhttps://github.com/php-db/phpdb-sqlite/issues/42
php-dbhttps://github.com/php-db
phpdb-sqlitehttps://github.com/php-db/phpdb-sqlite
Codehttps://github.com/php-db/phpdb-sqlite
Issues2 (2)https://github.com/php-db/phpdb-sqlite/issues
Pull requests2 (2)https://github.com/php-db/phpdb-sqlite/pulls
Actionshttps://github.com/php-db/phpdb-sqlite/actions
Projectshttps://github.com/php-db/phpdb-sqlite/projects
Security and qualityhttps://github.com/php-db/phpdb-sqlite/security
Insightshttps://github.com/php-db/phpdb-sqlite/insights
https://github.com/php-db/phpdb-sqlite
New issuehttps://github.com/login?return_to=https://github.com/php-db/phpdb-sqlite/issues/42
New issuehttps://github.com/login?return_to=https://github.com/php-db/phpdb-sqlite/issues/42
Offset without limit fails on SQLite: LIMIT 18446744073709551615 is out of rangehttps://github.com/php-db/phpdb-sqlite/issues/42#top
https://github.com/simon-mundy
simon-mundyhttps://github.com/simon-mundy
on Oct 12, 2026https://github.com/php-db/phpdb-sqlite/issues/42#issue-5807639356
phpdb-sqlite/src/Sql/SelectDecorator.phphttps://github.com/php-db/phpdb-sqlite/blob/8bfcfaa2f7859108f374d59cf1596c1a56417526/src/Sql/SelectDecorator.php#L33
8bfcfaahttps://github.com/php-db/phpdb-sqlite/commit/8bfcfaa2f7859108f374d59cf1596c1a56417526
SQLite SELECT documentationhttps://www.sqlite.org/lang_select.html#limitoffset
Sign up for freehttps://github.com/signup?return_to=https://github.com/php-db/phpdb-sqlite/issues/42
Sign in to commenthttps://github.com/login?return_to=https://github.com/php-db/phpdb-sqlite/issues/42
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.