Snapshot of upstream SQLite 3.25.0

This commit is contained in:
Stephen Lombardo
2018-09-18 12:31:37 -04:00
parent 1f3bc22483
commit bf3fa86130
558 changed files with 76379 additions and 20890 deletions
+62 -5
View File
@@ -256,7 +256,7 @@ do_test shell1-3.1.3 {
do_test shell1-3.1.4 {
# too many arguments
catchcmd "test.db" ".backup FOO BAR BAD"
} {1 {too many arguments to .backup}}
} {1 {Usage: .backup ?DB? ?--append? FILENAME}}
# .bail ON|OFF Stop after hitting an error. Default OFF
do_test shell1-3.2.1 {
@@ -495,7 +495,7 @@ do_test shell1-3.15.2 {
do_test shell1-3.15.3 {
# too many arguments
catchcmd "test.db" ".output FOO BAD"
} {1 {Usage: .output FILE}}
} {1 {Usage: .output [-e|-x|FILE]}}
# .output stdout Send output to the screen
do_test shell1-3.16.1 {
@@ -504,7 +504,7 @@ do_test shell1-3.16.1 {
do_test shell1-3.16.2 {
# too many arguments
catchcmd "test.db" ".output stdout BAD"
} {1 {Usage: .output FILE}}
} {1 {Usage: .output [-e|-x|FILE]}}
# .prompt MAIN CONTINUE Replace the standard prompts
do_test shell1-3.17.1 {
@@ -581,8 +581,10 @@ do_test shell1-3.21.4 {
}
catchcmd "test.db" ".schema"
} {0 {CREATE TABLE t1(x);
CREATE VIEW v2 AS SELECT x+1 AS y FROM t1;
CREATE VIEW v1 AS SELECT y+1 FROM v2;}}
CREATE VIEW v2 AS SELECT x+1 AS y FROM t1
/* v2(y) */;
CREATE VIEW v1 AS SELECT y+1 FROM v2
/* v1("y+1") */;}}
db eval {DROP VIEW v1; DROP VIEW v2; DROP TABLE t1;}
}
@@ -635,6 +637,19 @@ do_test shell1-3.23b.4 {
catchcmd "test.db" ".stats OFF BAD"
} {1 {Usage: .stats ?on|off?}}
# Ticket 7be932dfa60a8a6b3b26bcf7623ec46e0a403ddb 2018-06-07
# Adverse interaction between .stats and .eqp
#
do_test shell1-3.23b.5 {
catchcmd "test.db" [string map {"\n " "\n"} {
CREATE TEMP TABLE t1(x);
INSERT INTO t1 VALUES(1),(2);
.stats on
.eqp full
SELECT * FROM t1;
}]
} {/1\n2\n/}
# .tables ?TABLE? List names of tables
# If TABLE specified, only list tables matching
# LIKE pattern TABLE.
@@ -1095,4 +1110,46 @@ do_test shell1-6.1 {
} {}
}
db close
forcedelete test.db test.db-journal test.db-wal
sqlite3 db test.db
# The shell tool ".schema" command uses virtual table "pragma_database_list"
#
ifcapable vtab {
do_test shell1-7.1.1 {
db eval {
CREATE TABLE Z (x TEXT PRIMARY KEY);
CREATE TABLE _ (x TEXT PRIMARY KEY);
CREATE TABLE YY (x TEXT PRIMARY KEY);
CREATE TABLE __ (x TEXT PRIMARY KEY);
CREATE TABLE WWW (x TEXT PRIMARY KEY);
CREATE TABLE ___ (x TEXT PRIMARY KEY);
}
} {}
do_test shell1-7.1.2 {
catchcmd "test.db" ".schema _"
} {0 {CREATE TABLE Z (x TEXT PRIMARY KEY);
CREATE TABLE _ (x TEXT PRIMARY KEY);}}
do_test shell1-7.1.3 {
catchcmd "test.db" ".schema \\\\_"
} {0 {CREATE TABLE _ (x TEXT PRIMARY KEY);}}
do_test shell1-7.1.4 {
catchcmd "test.db" ".schema __"
} {0 {CREATE TABLE YY (x TEXT PRIMARY KEY);
CREATE TABLE __ (x TEXT PRIMARY KEY);}}
do_test shell1-7.1.5 {
catchcmd "test.db" ".schema \\\\_\\\\_"
} {0 {CREATE TABLE __ (x TEXT PRIMARY KEY);}}
do_test shell1-7.1.6 {
catchcmd "test.db" ".schema ___"
} {0 {CREATE TABLE WWW (x TEXT PRIMARY KEY);
CREATE TABLE ___ (x TEXT PRIMARY KEY);}}
do_test shell1-7.1.7 {
catchcmd "test.db" ".schema \\\\_\\\\_\\\\_"
} {0 {CREATE TABLE ___ (x TEXT PRIMARY KEY);}}
}
finish_test