mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
When constructing the virtual MATCH term of the WHERE clause for a virtual
table that is in a LEFT JOIN, be sure to set the correct Expr.iRightJoinTable value. This value does not appear to ever be used, except inside of a single assert(). But it is good to set it correctly, nevertheless. This fixes ticket [7929c1efb2d67e98], which as far as I can tell is completely harmless. FossilOrigin-Name: ef604882a275d3d5ebd4d5a08e3fe43e148f169b7d5c3a81464fbe7f54f3582a
This commit is contained in:
@ -988,4 +988,18 @@ do_execsql_test join-22.10 {
|
||||
SELECT DISTINCT c FROM t0 LEFT JOIN (SELECT a+1 AS c FROM t0) ORDER BY c ;
|
||||
} {11}
|
||||
|
||||
# 2019-12-22 ticket 7929c1efb2d67e98
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test join-23.10 {
|
||||
CREATE TABLE t0(c0);
|
||||
INSERT INTO t0(c0) VALUES(123);
|
||||
CREATE VIEW v0(c0) AS SELECT 0 GROUP BY 1;
|
||||
SELECT t0.c0, v0.c0, vt0.name
|
||||
FROM v0, t0 LEFT JOIN pragma_table_info('t0') AS vt0
|
||||
ON vt0.name LIKE 'c0'
|
||||
WHERE v0.c0 == 0;
|
||||
} {123 0 c0}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user