I found that the problems comes because I am using a middleware of
perform_bench... so no problem here, just write this info. in case any
other people falls the same trap. ;)

On Jan 13, 2:41 pm, pength <[EMAIL PROTECTED]> wrote:
> Thanks for your reply.
>
> I am using MySQL 5.0.24, with InnoDB engine. Actually I am not
> familiar with MySQL settings, but as far as I understand, as when I
> use the decorator @transaction.commit_on_success, thetransaction
> works well, does that means my database backend has no problem in
> supporttransaction? or I am wrong on this point?
>
> On 1月13日, 上午3时06分, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
>
>
> >Transactionbehaviour depends on database backend. What backend do you
> > use and have you setuptransactionsupport for it?
>
> > On 12 янв, 20:45, pength <[EMAIL PROTECTED]> wrote:
>
> > > At first, I tried to search in this group, but only got an un-answered
> > > question similar to 
> > > mine:http://groups.google.com/group/django-users/browse_thread/thread/7677...
>
> > > in my settings.py, i am using TransactionMiddleware. and my testing
> > > views.py as following:
>
> > > def index(request):
> > >     c=Myobject.objects.get(pk=45) ###Myobject with a field 'isUpdate'
> > > whichdefaultvalue is False.
> > >     c.isUpdate = True
> > >     c.save()
> > >     raise NameError
>
> > > after a request to this index view, I found in database that object's
> > > 'isUpdate' was set to True...
>
> > > then I added an decorator:
> > > @transaction.commit_on_success
> > > def index(request):
> > >     c=Myobject.objects.get(pk=45)
> > >     .....
>
> > > Then the object won't be changed.
>
> > > I am confused about this, because according to the Django document
> > > abouttransaction, I think thedefaultway is just commit_on_success?
> > > or what mistake I have made?
>
> > > Thanks!- 隐藏被引用文字 -
>
> > - 显示引用的文字 -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to