Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 34118 invoked from network); 26 Oct 2006 06:29:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 06:29:40 -0000 Received: (qmail 67209 invoked by uid 500); 25 Oct 2006 01:19:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 67169 invoked by uid 500); 25 Oct 2006 01:19:01 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 67158 invoked by uid 99); 25 Oct 2006 01:19:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 18:19:01 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [207.69.200.28] (HELO pop04.mail.atl.earthlink.net) (207.69.200.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 18:18:48 -0700 Received: from nc-71-51-254-71.dhcp.embarqhsd.net ([71.51.254.71] helo=flossware.homelinux.org) by pop04.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1GcXPX-0005k1-00 for user@ant.apache.org; Tue, 24 Oct 2006 21:18:27 -0400 Received: from [192.168.168.1] (adminserver.flossware.com [192.168.168.1]) by flossware.homelinux.org (Postfix) with ESMTP id DAAAC185CF2 for ; Tue, 24 Oct 2006 21:18:26 -0400 (EDT) Message-ID: <453EBB62.8010905@mindspring.com> Date: Tue, 24 Oct 2006 21:18:26 -0400 From: "Scot P. Floess" Reply-To: floess@mindspring.com User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: Ant Users List Subject: Re: Example: error loading a mysqldump file References: <3585b2e10610241715n5ef7e889jd98ea6095445df5a@mail.gmail.com> In-Reply-To: <3585b2e10610241715n5ef7e889jd98ea6095445df5a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hunter: Did you use the \ character between each line? I swear this is exactly the same problem I had with postgres... Ant is treating each line as ONE sql statement. If your sql statement doesnt end properly, it will complain... So, since you span multiple lines...its an issue. Hunter Peress wrote: > Ant file: > classpath="../lib/mysql-connector-java-3.1.12-bin.jar" > driver="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/" > userid="" > password="" > print="yes" > src="wtf.sql" > > > use what; > > > wtf.sql: > insert into properties (value) values(""); > insert into properties (value) values("Hi"); > > Ok so if in mysql console you source wtf.sql there are no problems, its > valid mysql. But ant bombs on it. > Ant can handle each line ,but put them together in a file and its bad. > > > On 10/24/06, Martin Gainty wrote: >> >> I know if I edit on windo and port to nix I will have >> appended at >> end of each line >> for small files >> vi -b >> will show you the extra CR and you can easily delete the CR (which >> show up >> as ^M) chars >> >> for comprehensive treatment of entire files to unix run the dostounix >> utility >> check out this link from the friendly folk from Santa Cruz for details >> http://people.ucsc.edu/~chengyus/CE12L/DOSTOUNIX.htm >> >> Martin -- >> >> This e-mail communication and any attachments may contain >> confidential and >> privileged information for the use of the >> designated recipients named above. If you are not the intended >> recipient, >> you are hereby notified that you have received >> this communication in error and that any review, disclosure, >> dissemination, distribution or copying of it or its >> contents >> ----- Original Message ----- >> From: "Scot P. Floess" >> To: "Ant Users List" >> Sent: Tuesday, October 24, 2006 10:03 AM >> Subject: Re: error loading a mysqldump file >> >> >> > Can you elaborate more on the error? >> > >> > Some years ago I was using the sql task and had a file full of SQL >> > statements... When I tried to use the sql task I was getting >> errors as >> > well. The solution, if memory serves, is that I had to use a \ >> > character at the end of each line until SQL termination. So, if I had >> > something like: >> > >> > create table foo >> > ( >> > bar as int >> > ); >> > >> > I had to do this kind of thing: >> > >> > create table foo \ >> > ( \ >> > bar as int \ >> > ); >> > >> > The problem (again if I can remember correctly) was that each line >> > (meaning new line/carriage return) was being interpreted as the >> "whole" >> > sql statement and submitted. >> > Hunter Peress wrote: >> >> using the sql task's src attribute i source a mysqldump file and it >> >> errors. >> >> mysql can source the file with no problems. >> >> but in ant I source it and theres a syntax error. >> >> There is no delimiter being set in the source. >> >> also if take individually two insert statement and source those it >> works. >> >> but i combine them and i get a syntax error. >> >> >> >> in the mysqldump the text fields are xml documents so they have >> almost >> >> every >> >> imagineable character. >> >> >> >> im using standard utf8 encoding. any ideas? >> >> >> > >> > -- >> > Scot P. Floess >> > 27 Lake Royale >> > Louisburg, NC 27549 >> > >> > 252-478-8087 (Home) >> > 919-754-4592 (Work) >> > >> > Chief Architect JPlate http://sourceforge.net/projects/jplate >> > Chief Architect JavaPIM http://sourceforge.net/projects/javapim >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> > For additional commands, e-mail: user-help@ant.apache.org >> > >> > > -- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org