Return-Path: X-Original-To: apmail-empire-db-commits-archive@www.apache.org Delivered-To: apmail-empire-db-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B0D317674 for ; Mon, 29 Sep 2014 08:20:34 +0000 (UTC) Received: (qmail 61831 invoked by uid 500); 29 Sep 2014 08:20:34 -0000 Delivered-To: apmail-empire-db-commits-archive@empire-db.apache.org Received: (qmail 61813 invoked by uid 500); 29 Sep 2014 08:20:34 -0000 Mailing-List: contact commits-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@empire-db.apache.org Delivered-To: mailing list commits@empire-db.apache.org Received: (qmail 61547 invoked by uid 500); 29 Sep 2014 08:20:33 -0000 Delivered-To: apmail-incubator-empire-db-commits@incubator.apache.org Received: (qmail 61544 invoked by uid 99); 29 Sep 2014 08:20:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 08:20:33 +0000 Date: Mon, 29 Sep 2014 08:20:33 +0000 (UTC) From: "Ivan Arrizabalaga Getino (JIRA)" To: empire-db-commits@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (EMPIREDB-212) MySQL Nested Union bad syntax MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/EMPIREDB-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ivan Arrizabalaga Getino updated EMPIREDB-212: ---------------------------------------------- Attachment: DBDatabaseDriverMySQL.groovy Since I needed a quick fix I opted for extending DBDatabaseDriverMySQL overriding 'createCombinedCommand'. > MySQL Nested Union bad syntax > ----------------------------- > > Key: EMPIREDB-212 > URL: https://issues.apache.org/jira/browse/EMPIREDB-212 > Project: Empire-DB > Issue Type: Bug > Components: CodeGenerator > Affects Versions: empire-db-2.4.2 > Reporter: Ivan Arrizabalaga Getino > Labels: mysql, nested, union > Attachments: DBDatabaseDriverMySQL.groovy > > > If you try to create a union with several tables: > {quote} > select 1 UNION select 2 UNION select 3 > {quote} > the DBDatabaseDriverMySQL driver generates: > {quote} > ( (select 1) UNION (select 2)) UNION (select 3) > {quote} > and MySQL does NOT support nested UNIONs. > If could solved by changing the anonymous class in *DBDatabaseDriverMySQL.createCombinedCommand* but it should be done by default. -- This message was sent by Atlassian JIRA (v6.3.4#6332)