Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-15 Thread Federico Razzoli
should be prepared to handle this, for the same reasons an application should normally be able to handle InnoDB's deadlocks. Regards Federico Dom 14/12/14, Roberto Spadim robe...@spadim.com.br ha scritto: Oggetto: Re: [Maria-discuss] Doubt about

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-15 Thread Roberto Spadim
should normally be able to handle InnoDB's deadlocks. Regards Federico Dom 14/12/14, Roberto Spadim robe...@spadim.com.br ha scritto: Oggetto: Re: [Maria-discuss] Doubt about 'atomic' insert A: Elena Stepanova ele...@montyprogram.com Cc: Maria

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-15 Thread Federico Razzoli
: Oggetto: Re: [Maria-discuss] Doubt about 'atomic' insert A: Federico Razzoli federico_...@yahoo.it Cc: Maria Discuss maria-discuss@lists.launchpad.net Data: Lunedì 15 dicembre 2014, 18:23 Hi guys, i agree with you federico, sql is a language, only, and engine do what it's supossed to do

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-15 Thread Roberto Spadim
error 1213. Don't know about TokuDB, but I suppose it's the same. Regards Federico Lun 15/12/14, Roberto Spadim robe...@spadim.com.br ha scritto: Oggetto: Re: [Maria-discuss] Doubt about 'atomic' insert A: Federico Razzoli federico_

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-14 Thread Roberto Spadim
Hi elena! I'm considering all engines The query insert into table select max(pk)+1 from table; Should be executed different with different storage engines? Or the results should be the same? For example, i consider that max(pk)+1 Will always get the highest value of pk, and never insert a

[Maria-discuss] Doubt about 'atomic' insert

2014-12-13 Thread Roberto Spadim
Hi guys i'm with a doubt about the standard (sql standand?) error reporting , about INSERT SELECT... should this insert select return duplicate key? INSERT INTO errorsX (id) SELECT MAX(id)+1 FROM errorsX; considering: CREATE TABLE errorsX( id INT NOT NULL DEFAULT 0, PRIMARY KEY (id) ) ;

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-13 Thread Elena Stepanova
Hi Roberto, On 13.12.2014 21:13, Roberto Spadim wrote: Hi guys i'm with a doubt about the standard (sql standand?) error reporting , about INSERT SELECT... should this insert select return duplicate key? INSERT INTO errorsX (id) SELECT MAX(id)+1 FROM errorsX; considering: CREATE TABLE

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-13 Thread Sergei Golubchik
Hi, Roberto! On Dec 13, Roberto Spadim wrote: Hi guys i'm with a doubt about the standard (sql standand?) error reporting , about INSERT SELECT... should this insert select return duplicate key? INSERT INTO errorsX (id) SELECT MAX(id)+1 FROM errorsX; considering: CREATE TABLE

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-13 Thread Roberto Spadim
Hi Elena! 2014-12-13 21:02 GMT-02:00 Elena Stepanova ele...@montyprogram.com: I suppose you forgot to mention that you are doing it on an Aria table, concurrently, simultaneously from several threads? no, i'm considering any engine, just to know when it's possible to a insert return duplicate

Re: [Maria-discuss] Doubt about 'atomic' insert

2014-12-13 Thread Roberto Spadim
Hi Sergei! 2014-12-13 21:06 GMT-02:00 Sergei Golubchik s...@mariadb.org: Depends on how many rows the table errorsX has. If it has only one row, than this INSERT ... SELECT will insert a one row with a different id. No error. If it has more than one row, this INSERT ... SELECT will try to