mirror of
https://github.com/status-im/sqlcipher.git
synced 2026-08-30 22:11:14 +00:00
Snapshot of upstream SQLite 3.25.0
This commit is contained in:
+51
-3
@@ -93,6 +93,7 @@ do_catchsql_test 3.2 {
|
||||
SELECT rowid, a FROM t3;
|
||||
} {1 {no such column: rowid}}
|
||||
|
||||
# Multi-column WITHOUT ROWID virtual tables may not be writable.
|
||||
do_catchsql_test 4.0 {
|
||||
DROP TABLE t3;
|
||||
CREATE VIRTUAL TABLE temp.t4 USING csv_wr(
|
||||
@@ -100,13 +101,60 @@ do_catchsql_test 4.0 {
|
||||
'1,2,3,4
|
||||
5,6,7,8
|
||||
9,10,11,12
|
||||
13,14,15,16
|
||||
',
|
||||
13,14,15,16',
|
||||
columns=4,
|
||||
schema=
|
||||
'CREATE TABLE t3(a PRIMARY KEY,b TEXT,c TEXT,d TEXT) WITHOUT ROWID',
|
||||
'CREATE TABLE t3(a,b,c,d,PRIMARY KEY(a,b)) WITHOUT ROWID',
|
||||
testflags=1
|
||||
);
|
||||
} {1 {vtable constructor failed: t4}}
|
||||
|
||||
# WITHOUT ROWID tables with a single-column PRIMARY KEY may be writable.
|
||||
do_catchsql_test 4.1 {
|
||||
DROP TABLE IF EXISTS t4;
|
||||
CREATE VIRTUAL TABLE temp.t4 USING csv_wr(
|
||||
data=
|
||||
'1,2,3,4
|
||||
5,6,7,8
|
||||
9,10,11,12
|
||||
13,14,15,16',
|
||||
columns=4,
|
||||
schema=
|
||||
'CREATE TABLE t3(a,b,c,d,PRIMARY KEY(b)) WITHOUT ROWID',
|
||||
testflags=1
|
||||
);
|
||||
} {0 {}}
|
||||
|
||||
do_catchsql_test 4.2 {
|
||||
DROP TABLE IF EXISTS t5;
|
||||
CREATE VIRTUAL TABLE temp.t5 USING csv_wr(
|
||||
data=
|
||||
'1,2,3,4
|
||||
5,6,7,8
|
||||
9,10,11,12
|
||||
13,14,15,16',
|
||||
columns=4,
|
||||
schema=
|
||||
'CREATE TABLE t3(a,b,c,d) WITHOUT ROWID',
|
||||
testflags=1
|
||||
);
|
||||
} {1 {vtable constructor failed: t5}}
|
||||
|
||||
# 2018-04-24
|
||||
# Memory leak reported on the sqlite-users mailing list by Ralf Junker.
|
||||
#
|
||||
do_catchsql_test 4.3 {
|
||||
CREATE VIRTUAL TABLE IF NOT EXISTS temp.t1
|
||||
USING csv(filename='FileDoesNotExist.csv');
|
||||
} {1 {cannot open 'FileDoesNotExist.csv' for reading}}
|
||||
|
||||
# 2018-06-02
|
||||
# Problem with single-column CSV support reported on the mailing list
|
||||
# by Trent W. Buck.
|
||||
#
|
||||
do_execsql_test 4.4 {
|
||||
CREATE VIRTUAL TABLE temp.trent USING csv(data='1');
|
||||
SELECT * FROM trent;
|
||||
} {1}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user