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


Groups > comp.lang.python > #56221

Re: Database statements via python but database left intact

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <nedbat@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.049
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'insert': 0.05; 'null,': 0.09; 'statements': 0.09; 'used.': 0.09; 'suggest': 0.14; "wouldn't": 0.14; 'development?': 0.16; 'hits': 0.16; 'subject:python': 0.16; 'index': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'commit': 0.19; 'seems': 0.21; 'header:User- Agent:1': 0.23; 'tables': 0.26; 'primary': 0.26; 'header:In-Reply- To:1': 0.27; 'subject:Database': 0.31; 'running': 0.33; 'not.': 0.33; 'table': 0.34; 'could': 0.34; 'test': 0.35; 'received:google.com': 0.35; 'being': 0.38; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'read': 0.60; 'ian': 0.60; 'more': 0.64; 'between': 0.67; 'it!': 0.67; 'default': 0.69; '8bit%:92': 0.71; '8bit%:100': 0.72; '(url)': 0.84; 'subject:via': 0.84; 'transactions': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gqeBWKOHLwifSGakwPG80Ki/vXKtVRDqMItNtvsxyCQ=; b=UrZQvvy7KtWGuYt/2QipqCHsAsNq3QH26ZBpSUSRL/WitENPbpYY5QkrmXKEghc3HG 3vUpHY1E/MwXx1j5iPbyqCMVfLx65L29zrpg93Z3oVyTgQxtTpbu9UmuUsaxbycwlr09 4tLIx7yW5xdO2Q4fRRRFCoJHGYfd3qeWtSOf9Y/rLPrYed+ziJKoFYsbJV+2e9sRMAq/ jQzppylwGLRcAvbrC5/u9S7IjKTeiDiSnhz1T3AjLT6wcdAnY8Kbqaan7qK+SEW6nzim N1J3xvzQ2DzBgXx5GWIG+0Gzf2TylE4lTURZG3UXGo6wLHoB+iJAfxEvJRnoGoCO+HJ7 2Mgw==
X-Received by 10.49.131.39 with SMTP id oj7mr19709596qeb.40.1381009196509; Sat, 05 Oct 2013 14:39:56 -0700 (PDT)
Sender Ned Batchelder <nedbat@gmail.com>
Date Sat, 05 Oct 2013 17:39:55 -0400
From Ned Batchelder <ned@nedbatchelder.com>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version 1.0
To python-list@python.org
Subject Re: Database statements via python but database left intact
References <l2pois$359$1@dont-email.me> <mailman.757.1381001416.18130.python-list@python.org> <l2ppnh$9fc$1@dont-email.me> <mailman.758.1381005431.18130.python-list@python.org> <l2puok$5i8$1@dont-email.me>
In-Reply-To <l2puok$5i8$1@dont-email.me>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
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.760.1381009198.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381009198 news.xs4all.nl 15874 [2001:888:2000:d::a6]:39741
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56221

Show key headers only | View raw


On 10/5/13 5:02 PM, Νίκος Αλεξόπουλος wrote:
> Στις 5/10/2013 11:31 μμ, ο/η Ian Kelly έγραψε:
>> 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.
>
>
> I cannot beleive it!
>
> I have deleted the database and tables and recreted it.
> By default it seems to use the InnoDB Engine which wouldn't let 
> anythign get inserted/updated.
>
> I then deleted the database recretaed and used at the end fo my create 
> table statements the:
>
> create table counters
> (
>   ID integer(5) not null auto_increment primary key,
>   URL varchar(100) not null,
>   hits integer(5) not null default 1,
>   unique index (URL)
> )ENGINE = MYISAM;
>
> After that all mysql queries executed(inserted/updated) properly!
>
> I neved had though of than an engine type could make so much mess.
> MyISAM is the way to go then for my web development?
> Why InnoDB failed to execute the queries?

Now is a good time to go read about transactions, and committing, and 
the difference between MyISAM and InnoDB.  Please don't ask more about 
it here.

--Ned.

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