aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-06-10 19:31:18 +0000
committerdan <Dan Kennedy>2024-06-10 19:31:18 +0000
commitdc9a262319d734b9a8023e34ded1f426459766bd (patch)
tree50e995b83b1e6cb4ad6f51f3c2616a96dad5473e /test
parentb111f1cb2a32d0bc49436e90e162b82c5aa50060 (diff)
downloadsqlite-dc9a262319d734b9a8023e34ded1f426459766bd.tar.gz
sqlite-dc9a262319d734b9a8023e34ded1f426459766bd.zip
Fix a crash that could occur when the SELECT in an EXISTS(SELECT ...) used an unknown collation sequence.
FossilOrigin-Name: f3009a6d7facd1ead520d588c5ad089db76d8641cd3dae076f2405492d7defcd
Diffstat (limited to 'test')
-rw-r--r--test/existsexpr.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/existsexpr.test b/test/existsexpr.test
index 344f8cff6..836560f2d 100644
--- a/test/existsexpr.test
+++ b/test/existsexpr.test
@@ -363,6 +363,18 @@ do_subquery_test 5.7 1 "
2 5
}
+#-------------------------------------------------------------------------
+reset_db
+do_execsql_test 6.0 {
+ CREATE TABLE t1(a, b UNIQUE, c UNIQUE);
+ CREATE TABLE t2(a INfEGER PRIMARY KEY, b);
+ CREATE UNIQUE INDEX t2b ON t2(b);
+}
+
+do_catchsql_test 6.1 {
+ SELECT a FROM t1 WHERE EXISTS (SELECT 1 FROM t2 WHERE c COLLATE f = a)
+} {1 {no such collation sequence: f}}
+
finish_test