https://bugs.documentfoundation.org/show_bug.cgi?id=169424

--- Comment #5 from Neil Roberts <[email protected]> ---
Please don’t close the bug. This bug is specifically about the function
InsertJoin in QueryDesignView.cxx that can’t parse a natural join when the
right side of the join is not a simple table name. These queries are generated
by the design view when you select the “natural” tickbox in the “insert
relation” dialog box. The bug happens without ever trying to execute the query
so the database backend really doesn’t matter. I would like to try and fix the
bug later on and I wanted to have a bug number to reference. There are of
course a lot of other problems in the area and it would make sense to file
separate bugs for those, but there is no need to close this one. It’s maybe
clearer what is going on if you create the database from scratch with these
steps:

1. Create a new database. It doesn’t matter what backend you choose.
2. Create three tables. Make sure they all have primary keys and that all of
the names of the primary keys are unique. In table 2, add a field with the name
of the primary key in table 1. In table 3, add a field with the name of the
primary key in table 2.
3. Create a new query in design view.
4. Add tables 1 and 2 using the dialog box.
5. Select “Insert -> New relation” from the menu.
6. Select table1 and table2 in the dialog box.
7. Click the “natural” checkbox.
8. Press “ok”.
9. Add key1 and key2 to the grid of selected fields at the bottom of the
window.
10. Press F5 twice to toggle to design view and SQL view and back again. This
works fine even if the backend doesn’t understand natural joins.
11. Add the third table to the query in the design view.
12. Select “Insert -> New relation” from the menu.
13. Select table2 and table3 in the dialog box. (this is quite difficult to do
because of a separate UI bug)
14. Click the “natural” checkbox.
15. Press “ok”.
16. Add key3 to the grid of selected fields at the bottom of the window.
17. Now press F5 twice. It will no longer let you get back into design view.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to