2 messages in com.mysql.lists.perlMysql.pm??
FromSent OnAttachments
Thomas Stevenson19 Feb 2000 10:52 
Paul Sharpe19 Feb 2000 11:44 
Subject:Mysql.pm??
From:Thomas Stevenson (cw@hostmaine.com)
Date:02/19/2000 10:52:38 AM
List:com.mysql.lists.perl

Hello -

The stage- MySQL version 3.22.25 We have been replicating an Access database to a Mysql (web) db successfully for some months now. We recently created a flag field that is a boolean. MS Access sets this field to -1 for false by default. We want 1 or 0. We cannot overcome this problem so we are dealing with it in the Mysql DB and that is fine, but....

We use a replace test of this field for what to "web display":

IF (b.article_show=-1, b.article_file_name,'file.html')

Now this test/replace works just fine in the Mysql monitor but when the same sql is run in our Perl script it fails...

Escapes were tried out of desperation and do not work and they really shouldn't need to be used anyway.

If I update these fields from -1 to 1 after replication, all works fine.

Our test is now: IF (b.article_show=1, b.article_file_name,'file.html') That is our current fix right now, post field update.

I feel the problem is in Mysql.pm but I can't for the life of me see it there.

If anyone would be so kind as to shed some light on this, I'd appreciate it greatly. Our fix is fine for now but an understanding of what is happening would be more desireable.

Tom