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
WITHOUT ROWID for TEXT column #240
Comments
should be fixed: |
Cool. 😄 @fu-hsi Do you have time to test the next nightly build, and let us know if it works ok now? |
Of course. |
My current table schema:
When I try modify the table schema and check Unique checkbox, application not respond and crashes. Inserting data from Browse Data tab don't work, I don't know why... Manually insert works:
Look on SQL Log on right panel... I am usung now SQLiteStudio since two weeks (sorry guys :)) and works like a charm :) |
Editing and deleting also doesn't work :) Log:
Field When I create new table with NUMERIC key, then it works. |
@rp- Sounds like the fix really didn't work. 😉 |
This is more complex than the programmer thought. |
well, all i did was enabling to have tables without rowid and pks of any type, as allowed by sqlite3. |
At least the thing with the crash when adding a UNIQUE constraint in that special case seems to be a bug in SQLite itself. The same happens when executing this code using the command line utility: CREATE TABLE `test` (
`Field1` TEXT UNIQUE NOT NULL,
`Field2` INTEGER NOT NULL DEFAULT 1,
PRIMARY KEY(Field1)
) WITHOUT ROWID; In the latest development version of SQLite, however, I couldn't reproduce this anymore. |
Ok. What's the right way forward here? Should we go back to having "without rowid" only for numeric columns? |
Add support for non-integer primary keys, especially on table without rowid column. The previous code often assumed that the rowid column or its equivalent was a 64bit integer but SQLite allows any data, including text, to be stored in there. See issue #240.
Ok, to quickly summarise the situation:
So I think we don't need to go back because it as easy enough to fix the problematic parts. The new code needs a bit of testing (in a scenario like the one described in this issue as well as under normal circumstances) but should fix all the problems described in this issue (except for the SQLite bug that is of course). |
Add support for non-integer primary keys, especially on table without rowid column. The previous code often assumed that the rowid column or its equivalent was a 64bit integer but SQLite allows any data, including text, to be stored in there. See issue #240.
Cool. 😄 Is this something we should ask @fu-hsi to test again in the next nightly build? |
Yes definitely, if he has the time and motivation 😄 |
Somebody willing to test this? If not I'd suggest closing this issue and if there should be any more problems with this it can always be reopened. |
Closing it for now. @fu-hsi Do you have a few minutes to test our latest nightly build, and let us know if it's not working after all? |
SqliteBrowser allows using WITHOUT ROWID only for INTEGER column.
SQLite does not have this limitation:
https://www.sqlite.org/withoutrowid.html
The text was updated successfully, but these errors were encountered: