insert warning - how to look at

insert warning - how to look at

am 30.10.2009 13:02:30 von Sydney Puente

--0-1519750952-1256904150=:42012
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello, I have an application which is inserting rows into a Mysql 5.02=
4 db.=0AIt seems to stop when an insert generates a warning.=0Awhen I inser=
t the suspect line on the mysql commandline I get this: =0AQuery OK, 1 row =
affected, 1 warning (0.05 sec)=0AOther inserts that succeed seem not to gen=
erate warnings when I make the insertion on the command line. What can=
I do to troubleshoot this?=0AFor example how can I access the actual warni=
ng? TIA Syd =0A
--0-1519750952-1256904150=:42012--

Re: insert warning - how to look at

am 30.10.2009 14:44:47 von Johan Andersson

Hi,
mysql> show warnings;

BR
johan

Sydney Puente wrote:
> Hello,
>
> I have an application which is inserting rows into a Mysql 5.024 db.
> It seems to stop when an insert generates a warning.
> when I insert the suspect line on the mysql commandline I get this:
> Query OK, 1 row affected, 1 warning (0.05 sec)
> Other inserts that succeed seem not to generate warnings when I make the insertion on the command line.
>
> What can I do to troubleshoot this?
> For example how can I access the actual warning?
>
> TIA
>
> Syd
>
>
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: insert warning - how to look at

am 30.10.2009 15:36:01 von Sydney Puente

--0-760244372-1256913361=:88907
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Thanks johan,=0AVery useful - it seems so obvious now!=0AThere is an associ=
ated problem with transferring data into mysql.=0Abecause if the applicatio=
n pushing the data finds a warning it just silently stops.=0Aanyway I can d=
etect a warning 1265 Data truncated on the mysqldb?=0Aand make this visible=
- at worst I could tail a log file. TIA Syd =0A>Hi,=0A>mysq=
l> show warnings; >BR=0A>johan Sydney Puente wrote:=0A> Hello,=0A=
> =0A> I have an application which is inserting rows into a Mysql 5.024 db.=
=0A> It seems to stop when an insert generates a warning.=0A> when I insert=
the suspect line on the mysql commandline I get this: =0A> Query OK, 1 row=
affected, 1 warning (0.05 sec)=0A> Other inserts that succeed seem not to =
generate warnings when I make the insertion on=0A> the command line.=0A> =
=0A> What can I do to troubleshoot this?=0A> For example how can I access t=
he actual warning?=0A> =0A> TIA=0A> =0A> Syd=0A> =0A> =0A> =0A> =0A=
=0A
--0-760244372-1256913361=:88907--

RE: insert warning - how to look at

am 30.10.2009 16:01:10 von Jerry Schwartz

>-----Original Message-----
>From: Sydney Puente [mailto:sydneypuente@yahoo.com]
>Sent: Friday, October 30, 2009 10:36 AM
>To: mysql@lists.mysql.com
>Subject: Re: insert warning - how to look at
>
>Thanks johan,
>Very useful - it seems so obvious now!
>There is an associated problem with transferring data into mysql.
>because if the application pushing the data finds a warning it just silently
>stops.
>anyway I can detect a warning 1265 Data truncated on the mysqldb?
>and make this visible - at worst I could tail a log file.
>
[JS] If you can enter the query manually and generate the warning, then you
can use the brute force technique that I've used: do a

SELECT ... WHERE LENGTH(...) = [length of troublesome field]

By the way, I //think// that you'll get the same message if you try to insert
a "bad" character for the character set being used.

>TIA
>
>Syd
>
>
>>Hi,
>>mysql> show warnings;
>
>>BR
>>johan
>
>Sydney Puente wrote:
>> Hello,
>>
>> I have an application which is inserting rows into a Mysql 5.024 db.
>> It seems to stop when an insert generates a warning.
>> when I insert the suspect line on the mysql commandline I get this:
>> Query OK, 1 row affected, 1 warning (0.05 sec)
>> Other inserts that succeed seem not to generate warnings when I make the
>insertion on
>> the command line.
>>
>> What can I do to troubleshoot this?
>> For example how can I access the actual warning?
>>
>> TIA
>>
>> Syd
>>
>>
>>
>>
>
>
>
>




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org