List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:January 22 2009 4:37am
Subject:Re: REPOST: ON DUPLICATE failure
View as plain text  
You might try explicitly formatting your date as the string-type you
are expecting, but it looks to me like it should wokr exactly as you
have it.  I would agree with your suspicion about your v5.0.37. It
worked fine as you wrote it on my v5.0.45, although it reported 2 rows
affected on each subsequent run of the insert statement.  I thought
this odd as I only ran the same statement repeatedly  leaving me with
one row ever, but the value updated just fine.

 - michael dykman

On Wed, Jan 21, 2009 at 10:54 PM, Ashley M. Kirchner <ashley@stripped> wrote:
>
>   Anyone?
>
>
>   I'm trying to diagnose this and not having much luck.  I can't even
> figure out where to even begin to look.  I have two MySQL servers and
> getting different results for the same query on both:
>
>   SERVER 1:
>       mysqladmin  Ver 8.41 Distrib 5.0.37, for pc-linux-gnu on i686
>
>
>   SERVER 2:
>       mysqladmin  Ver 8.42 Distrib 5.1.30, for pc-linux-gnu on i686
>
>
>   TABLE description:
>       +-------+--------------+------+-----+---------+-------+
>       | Field | Type         | Null | Key | Default | Extra |
>       +-------+--------------+------+-----+---------+-------+
>       | name  | varchar(40)  | NO   | PRI |         |       |
>       | value | varchar(255) | NO   |     |         |       |
>       +-------+--------------+------+-----+---------+-------+
>
>   Query run on both systems:
>      INSERT INTO $TABLE SET NAME='atest', value=now() ON DUPLICATE KEY
> UPDATE value=now();
>
>
>
>   On SERVER 1 it fails to update, where on SERVER 2 it works just fine
> and updates the record as I would expect it.  Is this a problem with
> that specific version (5.0.37) ?  Or is there something else I should be
> looking for here?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>



-- 
 - michael dykman
 - mdykman@stripped

 - All models are wrong.  Some models are useful.
Thread
REPOST: ON DUPLICATE failureAshley M. Kirchner22 Jan
  • Re: REPOST: ON DUPLICATE failureMichael Dykman22 Jan
    • Re: [MySQL] Re: REPOST: ON DUPLICATE failureAshley M. Kirchner22 Jan
      • Re: [MySQL] Re: REPOST: ON DUPLICATE failureIan Simpson22 Jan