Database statements via python but database left intact

Ned Batchelder ned at nedbatchelder.com
Sat Oct 5 17:39:55 EDT 2013


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.



More information about the Python-list mailing list