## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
CREATE TABLE map_integer (id INT, name);
INSERT INTO map_integer VALUES(1,'a');
CREATE TABLE map_text (id TEXT, name);
INSERT INTO map_text VALUES('4','e');
CREATE TABLE data (id TEXT, name);
INSERT INTO data VALUES(1,'abc');
INSERT INTO data VALUES('4','xyz');
CREATE VIEW idmap as SELECT * FROM map_integer UNION SELECT * FROM map_text;
CREATE TABLE mzed AS SELECT * FROM idmap;
PRAGMA automatic_index=ON;
SELECT * FROM data JOIN idmap USING(id);

SELECT * FROM data AS a LEFT JOIN map_integer AS b ON a.rowid = b.rowid;
CREATE TEMP  VIEW IF NOT EXISTS v_map_integer_6193 AS SELECT name FROM map_integer;
```

## Actual output

```sql
1|abc|a
1|abc|1|a
4|xyz||
```

## Expectation

```sql
4|xyz|e
1|abc|1|a
4|xyz||
```

## Flag

```

```

