Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » MySQL behavior about Warning/Exception [RSS Feed]

#1 Jan. 25, 2011 19:21:27

e.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

MySQL behavior about Warning/Exception


I would like to understand how Warning/Exception are treated in the
MySQL backend because I have a weird bug.

When I run the test suite of django-reversion on my production server
(Ubuntu 10.04) one test fail because MySQL give a warning instead of
an exception. If I run the same test on my testing server (again
Ubuntu 10.04 but in VirtualBox, so it's mostly the same software)
MySQL give the exception so the test didn't fail. I tried on both
server with DEBUG = True and DEBUG = False with the same result.

For more info you could check here:https://github.com/etianen/django-reversion/issues/closed#issue/18/comment/566932Anyone have an idea on this bug or, at least, explain how Warning/
Exception are treated in the MySQL backend?

Thanks

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 25, 2011 23:34:49

Dirk E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

MySQL behavior about Warning/Exception


Am Dienstag, 25. Januar 2011, 19:48:48 schrieb etienned:
> I would like to understand how Warning/Exception are treated in the
> MySQL backend because I have a weird bug.
>
> When I run the test suite of django-reversion on my production server
> (Ubuntu 10.04) one test fail because MySQL give a warning instead of
> an exception. If I run the same test on my testing server (again
> Ubuntu 10.04 but in VirtualBox, so it's mostly the same software)
> MySQL give the exception so the test didn't fail. I tried on both
> server with DEBUG = True and DEBUG = False with the same result.
>
> For more info you could check here:
>https://github.com/etianen/django-reversion/issues/closed#issue/18/comment/> 566932
>
> Anyone have an idea on this bug or, at least, explain how Warning/
> Exception are treated in the MySQL backend?

Hello,

the behaviour depends on the "non-strict" setting of the MySQL server. If i
remember correctly in non-strict mode an error will be raised. You should
compare the server configs of both machines.

Best Regards,
Dirk Eschler

--
Dirk Eschler <esch...@gmail.com>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 26, 2011 16:57:13

e.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

MySQL behavior about Warning/Exception


Thanks for your answer.

I have compared the .cnf on both of my servers and they are identical?

Then, in my settings.py file, I set my database options to
'sql_mode' : 'TRADITIONAL' and now I don't have the error anymore. So
that fix my problem.

But that doesn't explain the 2 different behaviors on 2 mostly
identical servers?

Etienne

On Jan 25, 6:34 pm, Dirk Eschler <esch...@gmail.com> wrote:
> Am Dienstag, 25. Januar 2011, 19:48:48 schrieb etienned:
>
>
>
> > I would like to understand how Warning/Exception are treated in the
> > MySQL backend because I have a weird bug.
>
> > When I run the test suite of django-reversion on my production server
> > (Ubuntu 10.04) one test fail because MySQL give a warning instead of
> > an exception. If I run the same test on my testing server (again
> > Ubuntu 10.04 but in VirtualBox, so it's mostly the same software)
> > MySQL give the exception so the test didn't fail. I tried on both
> > server with DEBUG = True and DEBUG = False with the same result.
>
> > For more info you could check here:
> >https://github.com/etianen/django-reversion/issues/closed#issue/18/co...
> > 566932
>
> > Anyone have an idea on this bug or, at least, explain how Warning/
> > Exception are treated in the MySQL backend?
>
> Hello,
>
> the behaviour depends on the "non-strict" setting of the MySQL server. If i
> remember correctly in non-strict mode an error will be raised. You should
> compare the server configs of both machines.
>
> Best Regards,
> Dirk Eschler
>
> --
> Dirk Eschler <esch...@gmail.com>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 26, 2011 17:16:46

Tom E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

MySQL behavior about Warning/Exception


On Wed, Jan 26, 2011 at 4:57 PM, etienned <etienne.desaut...@gmail.com> wrote:
> Thanks for your answer.
>
> I have compared the .cnf on both of my servers and they are identical?
>
> Then, in my settings.py file, I set my database options to
> 'sql_mode' : 'TRADITIONAL' and now I don't have the error anymore. So
> that fix my problem.
>
> But that doesn't explain the 2 different behaviors on 2 mostly
> identical servers?
>
> Etienne
>

I can't help you with your problem, I don't know why they are behaving
differently. However, it is a universal truth of computing that given
the same input and environment, the same software will produce the
same result.
Somewhere along the way therefore, you must not have the same input,
environment or software. Establishing where the two differ will help
you solve the issue, I am sure.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » MySQL behavior about Warning/Exception [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support