Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 61361 invoked from network); 13 Mar 2008 14:02:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2008 14:02:26 -0000 Received: (qmail 54790 invoked by uid 500); 13 Mar 2008 14:02:23 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 54776 invoked by uid 500); 13 Mar 2008 14:02:23 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 54765 invoked by uid 99); 13 Mar 2008 14:02:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2008 07:02:23 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2008 14:01:33 +0000 Received: from [192.168.15.18] (helo=www.seitenbau.net) by router.seitenbau.net with esmtp (Exim 4.43) id 1JZo08-0002v7-4O for torque-user@db.apache.org; Thu, 13 Mar 2008 15:01:53 +0100 In-Reply-To: <1205416059.3037.18.camel@hte53> Subject: RE: Possible incorrect unique.vm in mysql To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Thomas Fischer Date: Thu, 13 Mar 2008 15:01:42 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 7.0.1|January 17, 2006) at 13.03.2008 03:01:44 PM MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Spam-Report: -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Virus-Checked: Checked by ClamAV on apache.org Ah ok, I overlooked that a name could be specified. But the dtd says and in this case you are right, the name should be used. Would you min= d to create a jira issue ? Thanks, Thomas Peter Fr=FChberger schrieb am 13.03.= 2008 14:47:39: > Thx for your reply, > > Yes it is totally correct for mysql to create unique index without > special naming. mysql just uses the Name auf die Index-column as the > unique index name. > > But, if you do want to specify your own index naming, it is not > possible. The name attribut from is ignored tot= ally. > > > In my opinion, torque should treat this like the following: > > if ("unique name" is specified) { > unique $uniq.name ('column') > } > else { > unique ('column') > } > > Thx > Peter > > Am Donnerstag, den 13.03.2008, 14:36 +0100 schrieb Thomas Fischer: > > As far as I know, you CAN define and index name, but you need not. = For > > example, I have thested the following works with mysql 5.0 > > > > CREATE TABLE `test` (`test` VARCHAR( 10 ) NOT NULL , UNIQUE (test))= > > > > So in my eyes, the SQL generated by Torque is perfectly valid. Or d= id I > > miss something ? > > > > Thomas > > > > Peter Fr=FChberger schrieb am 13.03.2008 > > 11:46:08: > > > > > I am using version 3.3-RC3 of the torque maven plugin. > > > > > > > > > The following snippet of code: > > > > > > > > > > > > > > > generates the following mysql code: > > > > > > Create ... > > > ... > > > UNIQUE (NAME) > > > ); > > > > > > The unique index name (NAME_IDX) is missing, it should correctly = be: > > > > > > Create ... > > > UNIQUE NAME_IDX (NAME); > > > ); > > > > > > > > > changing the unique.vm in sql/base/mysql/unique.vm from > > > #foreach ($unique in $table.Unices) > > > UNIQUE($unique.ColumnList), > > > #end > > > > > > to > > > #foreach ($unique in $table.Unices) > > > UNIQUE $unique.Name ($unique.ColumnList), > > > #end > > > > > > > > > fixes this problem for me. > > > > > > Thx > > > Peter Fr=FChberger > > > (sorry for sending through an exchange server ;-)) > > > > > > > > > > > > > > > -----------------------------------------------------------------= ---- > > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > > For additional commands, e-mail: torque-user-help@db.apache.org > > > > > > > > > -------------------------------------------------------------------= -- > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > For additional commands, e-mail: torque-user-help@db.apache.org > > > > ---------------------------------------------------------------------= > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >= --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org