Issue 101947

Summary: opening the query-edit dialog adds brackets to from statement
Product: Base Reporter: pirlo <admin>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: drewjensen.inbox, issues
Version: OOo 3.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
error message
none
sql dump of table MDE_ruest
none
sql dump of table MDE_stoer
none
sql dump of table MDE_121 none

Description pirlo 2009-05-15 10:14:30 UTC
when i build a select on an mysql table it works as long as i open the 
query-editor or save and reopen the query.

this is the select which dose not work (after reopening):
SELECT `MDE121`.`auftrag`, `MDE121`.`POSITION`, `MDE121`.`status`, 
`MDE121`.`ruestcode`, `MDE121`.`stoercode`, `MDE121`.`startzeit`, 
`MDE121`.`endzeit`, `MDE_ruest`.`code`, `MDE_ruest`.`ruesten`, 
`MDE121`.`lid`, `MDE_stoer`.`stoergrund` FROM { OJ ( `p2`.`MDE121` AS 
`MDE121` LEFT OUTER JOIN `p2`.`MDE_ruest` AS `MDE_ruest` ON 
`MDE121`.`ruestcode` = `MDE_ruest`.`code` ) LEFT OUTER JOIN `p2`.`MDE_stoer` 
AS `MDE_stoer` ON `MDE121`.`stoercode` = `MDE_stoer`.`code` }

i use the mysql-odbc driver version 3.51

if i change the select like this one it works again - as long until i reopen 
the select:
SELECT MDE121.auftrag, MDE121.position, MDE121.status, MDE121.ruestcode, 
MDE121.stoercode, MDE121.startzeit, MDE121.endzeit, MDE_ruest.code, 
MDE_ruest.ruesten, MDE121.lid, MDE_stoer.stoergrund FROM p2.MDE121 AS MDE121 
LEFT OUTER JOIN p2.MDE_ruest AS MDE_ruest ON MDE121.ruestcode = 
MDE_ruest.code  LEFT OUTER JOIN p2.MDE_stoer AS MDE_stoer ON MDE121.stoercode 
= MDE_stoer.code

if i change to the design-view and back again to query-editor the brackets get 
added and i get an error message.
Comment 1 pirlo 2009-05-15 10:15:36 UTC
Created attachment 62283 [details]
error message
Comment 2 pirlo 2009-05-15 10:16:07 UTC
Created attachment 62284 [details]
sql dump of table MDE_ruest
Comment 3 pirlo 2009-05-15 10:16:27 UTC
Created attachment 62285 [details]
sql dump of table MDE_stoer
Comment 4 pirlo 2009-05-15 10:16:50 UTC
Created attachment 62286 [details]
sql dump of table MDE_121
Comment 5 drewjensen.inbox 2009-05-18 01:57:06 UTC
Using MySQL 5.0 and JDBC 5.16 the query designer does alter the query and
generates and error. (Have found other examples as well)

The problem appears generalized with the Advanced Connection setting - Use Outer
Join Syntax { OJ }

If I change the setting to false then there is no error.
If the setting is true then the error occurs.

I'll follow up checking this wit ODBC from a Windows Client and also with the
MySQL/Native connection.