diff options
author | drh <> | 2024-06-28 17:14:00 +0000 |
---|---|---|
committer | drh <> | 2024-06-28 17:14:00 +0000 |
commit | 076bd5758b7a7e06cd2de9677ea9ba077d9dba2f (patch) | |
tree | 29ab9bbb7cddd0a5202078f6f8d46b2f1e2c5baa /test | |
parent | 105c20648e1b05839fd0638686b95f2e3998abcb (diff) | |
download | sqlite-076bd5758b7a7e06cd2de9677ea9ba077d9dba2f.tar.gz sqlite-076bd5758b7a7e06cd2de9677ea9ba077d9dba2f.zip |
Do not convert an expression node that is already TK_REGISTER into a
new TK_REGISTER. This is a follow-up to [663f5dd32d9db832] that fixes a
bug discovered by dbsqlfuzz.
FossilOrigin-Name: fcb669cfaa8a59ca710504d5aaa1936f65a6da8ff13473ad84458f97a6fd1f49
Diffstat (limited to 'test')
-rw-r--r-- | test/distinct2.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/distinct2.test b/test/distinct2.test index 023e2e333..980b0b1e3 100644 --- a/test/distinct2.test +++ b/test/distinct2.test @@ -362,4 +362,22 @@ do_execsql_test 5070 { SELECT v4.e FROM t3 LEFT JOIN v4 ON true GROUP BY 1; } NULL +# 2024-06-28 dbsqlfuzz 46343912848a603e32c6072cae792eb056bac897 +# Do not call sqlite3ExprToRegister() on an expression that is already +# a register. +# +do_execsql_test 5080 { + CREATE TABLE dual(dummy TEXT); + INSERT INTO dual VALUES('X'); + SELECT 11 = ( + SELECT b + FROM ( + SELECT a AS b + FROM dual + LEFT JOIN (SELECT 22 AS a FROM dual) + ) + GROUP BY b, b + ); +} 0 + finish_test |