Have fts5 reject attempts to insert a non-integer, non-null value into a rowid
column with SQLITE_MISMATCH. FossilOrigin-Name: 4a9483f81e9ca1aa41d6ca33cb3171370418ccc71fdee9741bbf6f694bf4fbaa
This commit is contained in:
@@ -134,6 +134,20 @@ do_test 3.1 {
|
||||
}
|
||||
} {}
|
||||
|
||||
do_execsql_test 4.0 {
|
||||
CREATE VIRTUAL TABLE x4 USING fts5(a, detail=%DETAIL%);
|
||||
INSERT INTO x4 VALUES('one two three');
|
||||
INSERT INTO x4(rowid, a) VALUES('2', 'one two three');
|
||||
INSERT INTO x4(rowid, a) VALUES('3.0', 'one two three');
|
||||
}
|
||||
do_catchsql_test 4.1 {
|
||||
INSERT INTO x4(rowid, a) VALUES('four', 'one two three');
|
||||
} {1 {datatype mismatch}}
|
||||
|
||||
do_catchsql_test 4.2 {
|
||||
UPDATE x4 SET rowid = 'four' WHERE rowid=1;
|
||||
} {1 {datatype mismatch}}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user