1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Convert the LSM1 virtual table to be WITHOUT ROWID and get UPDATE and DELETE

operations working on it.

FossilOrigin-Name: 2164031b509dc6eae367ffb9d915f3e1d33d26210506b2de8b2bfca38c53465f
This commit is contained in:
drh
2017-08-11 12:49:59 +00:00
parent f41a8d3d9a
commit 037a2bacb0
4 changed files with 62 additions and 49 deletions

View File

@ -23,7 +23,7 @@ do_execsql_test 1.0 {
CREATE VIRTUAL TABLE x1 USING lsm1(testlsm.db,a,UINT,b,c,d);
PRAGMA table_info(x1);
} {
0 a UINT 0 {} 0
0 a UINT 1 {} 1
1 b {} 0 {} 0
2 c {} 0 {} 0
3 d {} 0 {} 0
@ -35,13 +35,15 @@ do_execsql_test 1.1 {
SELECT a, quote(b), quote(c), quote(d) FROM x1;
} {8 'banjo' X'333231' NULL 12 NULL 3.25 -559281390 15 11 22 33}
do_catchsql_test 1.2 {
do_execsql_test 1.2 {
UPDATE x1 SET d = d+1.0 WHERE a=15;
} {1 {cannot UPDATE}}
SELECT a, quote(b), quote(c), quote(d) FROM x1;
} {8 'banjo' X'333231' NULL 12 NULL 3.25 -559281390 15 11 22 34.0}
do_catchsql_test 1.3 {
do_execsql_test 1.3 {
DELETE FROM x1 WHERE a=15;
} {1 {cannot DELETE}}
SELECT a, quote(b), quote(c), quote(d) FROM x1;
} {8 'banjo' X'333231' NULL 12 NULL 3.25 -559281390}
do_test 1.4 {
lsort [glob testlsm.db*]