aboutsummaryrefslogtreecommitdiff
path: root/test/indexexpr2.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/indexexpr2.test')
-rw-r--r--test/indexexpr2.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/indexexpr2.test b/test/indexexpr2.test
index 8c1171e03..3cc030f86 100644
--- a/test/indexexpr2.test
+++ b/test/indexexpr2.test
@@ -372,4 +372,18 @@ foreach {tn expr} {
" {1 1}
}
+# 2023-03-24 https://sqlite.org/forum/forumpost/79cf371080
+#
+reset_db
+do_execsql_test 9.0 {
+ CREATE TABLE t1(a INT, b INT);
+ CREATE INDEX t1x ON t1(a, abs(b));
+ CREATE TABLE t2(c INT, d INT);
+ INSERT INTO t1(a,b) VALUES(4,4),(5,-5),(5,20),(6,6);
+ INSERT INTO t2(c,d) VALUES(100,1),(200,1),(300,2);
+ SELECT *,
+ (SELECT max(c+abs(b)) FROM t2 GROUP BY d ORDER BY d LIMIT 1) AS subq
+ FROM t1 WHERE a=5;
+} {5 -5 205 5 20 220}
+
finish_test