Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: third_party/sqlite/src/test/sqllimits1.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/sqldiff1.test ('k') | third_party/sqlite/src/test/sqllog.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/sqllimits1.test
diff --git a/third_party/sqlite/src/test/sqllimits1.test b/third_party/sqlite/src/test/sqllimits1.test
index 57fc931f7c3d945d6e459cbb6bd50ff6a5ff3b6a..9508b5233dc7d931acae7d16e9fdb10521068814 100644
--- a/third_party/sqlite/src/test/sqllimits1.test
+++ b/third_party/sqlite/src/test/sqllimits1.test
@@ -250,6 +250,9 @@ do_test sqllimits1-4.10.1 {
# Test cases sqllimits1-5.* test that the SQLITE_MAX_LENGTH limit
# is enforced.
#
+# EVIDENCE-OF: R-61987-00541 SQLITE_LIMIT_LENGTH The maximum size of any
+# string or BLOB or table row, in bytes.
+#
db close
sqlite3 db test.db
set LARGESIZE 99999
@@ -406,6 +409,9 @@ unset strvalue
# Test cases sqllimits1-6.* test that the SQLITE_MAX_SQL_LENGTH limit
# is enforced.
#
+# EVIDENCE-OF: R-09808-17554 SQLITE_LIMIT_SQL_LENGTH The maximum length
+# of an SQL statement, in bytes.
+#
do_test sqllimits1-6.1 {
sqlite3_limit db SQLITE_LIMIT_SQL_LENGTH 50000
set sql "SELECT 1 WHERE 1==1"
@@ -567,6 +573,11 @@ do_test sqllimits1-7.7.4 {
#--------------------------------------------------------------------
# Test cases sqllimits1-8.* test the SQLITE_MAX_COLUMN limit.
#
+# EVIDENCE-OF: R-43996-29471 SQLITE_LIMIT_COLUMN The maximum number of
+# columns in a table definition or in the result set of a SELECT or the
+# maximum number of columns in an index or in an ORDER BY or GROUP BY
+# clause.
+#
set SQLITE_LIMIT_COLUMN 200
sqlite3_limit db SQLITE_LIMIT_COLUMN $SQLITE_LIMIT_COLUMN
do_test sqllimits1-8.1 {
@@ -632,7 +643,8 @@ do_test sqllimits1-8.8 {
for {set i 0} {$i <= $SQLITE_LIMIT_COLUMN} {incr i} {
lappend cols "c$i"
}
- catchsql "CREATE VIEW v1 AS SELECT [join $cols ,] FROM t1;"
+ execsql "CREATE VIEW v1 AS SELECT [join $cols ,] FROM t1;"
+ catchsql {SELECT * FROM v1}
} {1 {too many columns in result set}}
do_test sqllimits1-8.9 {
@@ -641,9 +653,12 @@ do_test sqllimits1-8.9 {
for {set i 0} {$i < $SQLITE_LIMIT_COLUMN} {incr i} {
lappend cols "c$i"
}
+ execsql {DROP VIEW IF EXISTS v1}
catchsql "CREATE TABLE t2([join $cols ,])"
catchsql "CREATE VIEW v1 AS SELECT *, c1 AS o FROM t2;"
+ catchsql "SELECT * FROM v1"
} {1 {too many columns in result set}}
+
do_test sqllimits1-8.10 {
# ORDER BY columns
set cols [list]
@@ -670,6 +685,9 @@ do_test sqllimits1-8.11 {
# limit is enforced. The limit refers to the number of terms in
# the expression.
#
+# EVIDENCE-OF: R-12723-08526 SQLITE_LIMIT_EXPR_DEPTH The maximum depth
+# of the parse tree on any expression.
+#
if {$SQLITE_MAX_EXPR_DEPTH==0} {
puts -nonewline stderr "WARNING: Compile with -DSQLITE_MAX_EXPR_DEPTH to run "
puts stderr "tests sqllimits1-9.X"
@@ -729,6 +747,9 @@ if 0 {
# Test the SQLITE_LIMIT_FUNCTION_ARG limit works. Test case names
# match the pattern "sqllimits1-11.*".
#
+# EVIDENCE-OF: R-59001-45278 SQLITE_LIMIT_FUNCTION_ARG The maximum
+# number of arguments on a function.
+#
for {set max 5} {$max<=$SQLITE_MAX_FUNCTION_ARG} {incr max} {
do_test sqllimits1-11.$max.1 {
set vals [list]
@@ -762,6 +783,9 @@ for {set max 5} {$max<=$SQLITE_MAX_FUNCTION_ARG} {incr max} {
#--------------------------------------------------------------------
# Test cases sqllimits1-12.*: Test the SQLITE_MAX_ATTACHED limit.
#
+# EVIDENCE-OF: R-41778-26203 SQLITE_LIMIT_ATTACHED The maximum number of
+# attached databases.
+#
ifcapable attach {
do_test sqllimits1-12.1 {
set max $::SQLITE_MAX_ATTACHED
@@ -785,6 +809,9 @@ ifcapable attach {
# Test cases sqllimits1-13.*: Check that the SQLITE_MAX_VARIABLE_NUMBER
# limit works.
#
+# EVIDENCE-OF: R-42363-29104 SQLITE_LIMIT_VARIABLE_NUMBER The maximum
+# index number of any parameter in an SQL statement.
+#
do_test sqllimits1-13.1 {
set max $::SQLITE_MAX_VARIABLE_NUMBER
catchsql "SELECT ?[expr {$max+1}] FROM t1"
@@ -806,6 +833,9 @@ do_test sqllimits1-13.2 {
# implementation by overriding the like() scalar function bypasses
# this limitation.
#
+# EVIDENCE-OF: R-12940-37052 SQLITE_LIMIT_LIKE_PATTERN_LENGTH The
+# maximum length of the pattern argument to the LIKE or GLOB operators.
+#
# These tests check that the limit is not incorrectly applied to
# the left-hand-side of the LIKE operator (the string being tested
# against the pattern).
@@ -844,6 +874,17 @@ do_test sqllimits1-16.2 {
}
} {1 {string or blob too big}}
+do_catchsql_test sqllimits1.17.0 {
+ SELECT *,*,*,*,*,*,*,* FROM (
+ SELECT *,*,*,*,*,*,*,* FROM (
+ SELECT *,*,*,*,*,*,*,* FROM (
+ SELECT *,*,*,*,*,*,*,* FROM (
+ SELECT *,*,*,*,*,*,*,* FROM (
+ SELECT 1,2,3,4,5,6,7,8,9,10
+ )
+ ))))
+} "1 {too many columns in result set}"
+
foreach {key value} [array get saved] {
catch {set $key $value}
« no previous file with comments | « third_party/sqlite/src/test/sqldiff1.test ('k') | third_party/sqlite/src/test/sqllog.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698