Created attachment 68858 [details] excerpt from mysql log originally reported as - https://bugzilla.novell.com/show_bug.cgi?id=443873 LO produces a bogus query for tables without a primary key. Steps to reproduce: 1) Load https://bugzilla.novell.com/attachment.cgi?id=251407 into a MySQL server of your choice 2) Create new database and connect to above database 3) optional: enable logging for your MySQL server 4) double click on table accounts which does have a primary key 5) double click on table accounts_ext which does not Observe the difference between 4 and 5 in that cells in 4 are editable where those from 5 are not. Find some excerpts from my MySQL log in the attachment. Pay attention to the bogus "WHERE 0=1" in both cases.
1) Yes, LibreOffice cannot open tables that don't have a primary key in read/write mode, only read-only. Write access to tables without primary key is not supported. 2) The queries with "WHERE 0=1" are not bogus, but they are LibreOffice's method of getting information on the structure of the result of the query without fetching any data.