diff options
author | drh <> | 2025-02-21 17:03:22 +0000 |
---|---|---|
committer | drh <> | 2025-02-21 17:03:22 +0000 |
commit | ce25007db8df01e3271486574d520d4dea4cf97a (patch) | |
tree | ba6a3d33af56c5a0d13d80ab8eb7447e69319ce6 /src/sqliteLimit.h | |
parent | 220260b8965eb264cab8cb5ee42baacb08ef1eb4 (diff) | |
download | sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.tar.gz sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.zip |
Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need
to use more than SQLITE_LIMIT_COLUMN columns and raise an error.
Also include some unrelated compiler warning fixes.
FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
Diffstat (limited to 'src/sqliteLimit.h')
-rw-r--r-- | src/sqliteLimit.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sqliteLimit.h b/src/sqliteLimit.h index 620b0f8e5..0d15b3182 100644 --- a/src/sqliteLimit.h +++ b/src/sqliteLimit.h @@ -36,14 +36,16 @@ ** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. ** * Terms in the VALUES clause of an INSERT statement ** -** The hard upper limit here is 32676. Most database people will +** The hard upper limit here is 32767. Most database people will ** tell you that in a well-normalized database, you usually should ** not have more than a dozen or so columns in any table. And if ** that is the case, there is no point in having more than a few ** dozen values in any of the other situations described above. */ -#ifndef SQLITE_MAX_COLUMN +#if !defined(SQLITE_MAX_COLUMN) # define SQLITE_MAX_COLUMN 2000 +#elif SQLITE_MAX_COLUMN>32767 +# error SQLITE_MAX_COLUMN may not exceed 32767 #endif /* |