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: 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: References: From: Ian Kelly Date: Sat, 5 Oct 2013 14:31:04 -0600 Subject: Re: Database statements via python but database left intact To: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sat, Oct 5, 2013 at 1:36 PM, =CD=DF=EA=EF=F2 =C1=EB=E5=EE=FC=F0=EF=F5=EB= =EF=F2 wrote: > =D3=F4=E9=F2 5/10/2013 10:29 =EC=EC, =EF/=E7 Zero Piraeus =DD=E3=F1=E1=F8= =E5: >> >> : >> >> On Sat, Oct 05, 2013 at 10:16:46PM +0300, =CD=DF=EA=EF=F2 =C1=EB=E5=EE= =FC=F0=EF=F5=EB=EF=F2 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.