Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #56218

Re: Database statements via python but database left intact

Path csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'insert': 0.05; 'debugging': 0.07; 'explicit': 0.07; 'committing': 0.09; 'used.': 0.09; 'runs': 0.10; 'suggest': 0.14; 'changes': 0.15; '(either': 0.16; 'evaluating': 0.16; 'executed.': 0.16; 'exiting': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'commit': 0.19; '>>>': 0.22; 'code,': 0.22; 'error': 0.23; 'issue,': 0.24; 'asking': 0.27; 'certain': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'subject:Database': 0.31; 'running': 0.33; 'not.': 0.33; 'transaction': 0.35; 'point.': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'url:org': 0.36; 'being': 0.38; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'today,': 0.61; "you're": 0.61; 'determine': 0.67; 'dont': 0.67; 'yes': 0.68; '05,': 0.84; 'database:': 0.84; 'instantly': 0.84; 'silently': 0.84; 'subject:via': 0.84; 'transactions': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=6MMz/tlMic2/oXuCevMAFFQrLHPLd2EZm4DhXCV7F5c=; b=Q3LYwmtnN4iZYcnMN3zJkVo6vfoQY7MFjXnha7i53djbIRp7zbpxFw+XzXD5J+EDaJ rqKKrt3ZyCeliYE2EG2Zr68JkUyb+mpEO4KkC59iRekJR5hcmvOuO2LED7Cdv1xHh/pi cZYVQVkGONUGNFfyXBj0jpIKCP+QhIDCHaFhzRJ5i25vEqsFs9ryJPbOlm8HIhf9tWCQ ApQy4l5JBoJdCsjAJHIZt19nwmM7XcVnrmCVtwvYx50au7CxC8vrnBm8GGwJ4ytE9Ej3 D2NZFU+WWH/Yp0n8IJJ6l+6M3bop9HiyauWAXwnUIUGPftgl8fqOIXn7nnEqfXv0IUbY 3Ylg==
X-Received by 10.68.240.2 with SMTP id vw2mr21871129pbc.80.1381005105026; Sat, 05 Oct 2013 13:31:45 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <l2ppnh$9fc$1@dont-email.me>
References <l2pois$359$1@dont-email.me> <mailman.757.1381001416.18130.python-list@python.org> <l2ppnh$9fc$1@dont-email.me>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sat, 5 Oct 2013 14:31:04 -0600
Subject Re: Database statements via python but database left intact
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-7
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.758.1381005431.18130.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381005432 news.xs4all.nl 15922 [2001:888:2000:d::a6]:49482
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56218

Show key headers only | View raw


On Sat, Oct 5, 2013 at 1:36 PM, Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> wrote:
> Στις 5/10/2013 10:29 μμ, ο/η Zero Piraeus έγραψε:
>>
>> :
>>
>> On Sat, Oct 05, 2013 at 10:16:46PM +0300, Νίκος Αλεξόπουλος wrote:
>>>
>>> Excuse me for asking again today, but i see no error in the
>>> following code, yes no isertion or update happens into the database:
>>>
>>> [...]
>>>
>>>
>>> When this code runs i check instantly my database via PHPMyAdmin and
>>> i see that it was left intact.
>>
>>
>> Are you sure that you're committing your changes (either by having
>> autocommit set or using an explicit con.commit() call)?
>>
>> http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/
>
>
>
> I dont think that is the issue, because up until now i never used commit and
> all transaction were successfully were happening.

Well, have you changed anything in your database configuration?
Whether MySQL uses transactions or not depends on which storage engine
is being used.  I suggest running a test insert with and without
commit to check whether you actually need it or not.

Also, are you certain that the code is actually being run?  Perhaps
the if condition is evaluating as false and the whole block is being
skipped, or perhaps the code is silently exiting for some reason
before it ever gets to this point.  Do some debugging to determine
what exactly is being executed.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-05 22:16 +0300
  Re: Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-05 22:27 +0300
  Re: Database statements via python but database left intact Zero Piraeus <z@etiol.net> - 2013-10-05 16:29 -0300
    Re: Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-05 22:36 +0300
      Re: Database statements via python but database left intact Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-05 14:31 -0600
        Re: Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-06 00:02 +0300
          Re: Database statements via python but database left intact Ned Batchelder <ned@nedbatchelder.com> - 2013-10-05 17:39 -0400
          Re: Database statements via python but database left intact Chris Angelico <rosuav@gmail.com> - 2013-10-06 09:51 +1100
          Database engine bindings for Python (was: Database statements via python but database left intact) Ben Finney <ben+python@benfinney.id.au> - 2013-10-06 12:05 +1100
          Re: Database engine bindings for Python (was: Database statements via python but database left intact) Chris Angelico <rosuav@gmail.com> - 2013-10-06 12:19 +1100
          Re: Database engine bindings for Python (was: Database statements via python but database left intact) Dan Sommers <dan@tombstonezero.net> - 2013-10-06 06:22 +0000
            Re: Database engine bindings for Python (was: Database statements via python but database left intact) Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-10-06 11:10 +0200
            Re: Database engine bindings for Python (was: Database statements via python but database left intact) Chris Angelico <rosuav@gmail.com> - 2013-10-07 00:37 +1100
              Re: Database engine bindings for Python (was: Database statements via python but database left intact) Roy Smith <roy@panix.com> - 2013-10-06 10:05 -0400
          Re: Database statements via python but database left intact Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-10-06 11:05 +0200
            Re: Database statements via python but database left intact rusi <rustompmody@gmail.com> - 2013-10-06 04:36 -0700
              Re: Database statements via python but database left intact Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-10-06 14:01 +0200
          Re: Database statements via python but database left intact Zero Piraeus <z@etiol.net> - 2013-10-05 18:45 -0300
            Re: Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-06 18:57 +0300
              Re: Database statements via python but database left intact Piet van Oostrum <piet@vanoostrum.org> - 2013-10-06 17:40 -0400
          Re: Database statements via python but database left intact Adam Tauno Williams <awilliam@whitemice.org> - 2013-10-06 11:55 -0400
      Re: Database statements via python but database left intact Adam Tauno Williams <awilliam@whitemice.org> - 2013-10-06 11:52 -0400
        Re: Database statements via python but database left intact Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-06 19:49 +0300

csiph-web