File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,11 @@ class WriteStreamSQLite : public WriteStream {
199199 void createRelationTable () {
200200 std::stringstream createTableText;
201201 createTableText << " CREATE TABLE IF NOT EXISTS '_" << relationName << " ' (" ;
202- // 8 bytes per datum worst case + 1 byte per datum in header + 1 byte header length < ~1/20 DB page
202+ // 8 bytes per datum worst case + 1 byte per datum in header + 1 byte header length < ~1/20 DB page (4096 bytes)
203203 // size See https://sqlite.org/withoutrowid.html#when_to_use_without_rowid and
204204 // https://sqlite.org/fileformat2.html#record_format for justification
205- bool shouldUseWithoutRowid = (arity * 9 + 1 ) < 200 ;
205+ // 22*9+1 = 199 < 200
206+ bool shouldUseWithoutRowid = (arity>0 && arity<23 );
206207 if (arity > 0 ) {
207208 createTableText << " '0' INTEGER" ;
208209 for (unsigned int i = 1 ; i < arity; i++) {
You can’t perform that action at this time.
0 commit comments