List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:April 27 2011 4:13pm
Subject:Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872
View as plain text  
Hello,

Andrei Elkin a écrit, Le 27.04.2011 17:52:
> That looks good. Approved.

Thank you!

Independently of this patch, your remarks triggered some more thoughts; 
I observe (in 5.1, didn't test other versions) that this test:

--source include/have_innodb.inc
create table t1(a int auto_increment primary key, b char(1)) engine=innodb;
connect (con1,localhost,root,,test);

connection default;
send insert into t1 values 
(null,'A'),(null,'A'),(1025,'A'),(null+sleep(5),'A');
connection con1;
sleep 1;
insert into t1 values(null,'B');
connection default;
--error 1062
reap;
select * from t1;
drop table t1;


yields this result:


create table t1(a int auto_increment primary key, b char(1)) engine=innodb;
insert into t1 values (null,'A'),(null,'A'),(1025,'A'),(null+sleep(5),'A');
insert into t1 values(null,'B');
ERROR 23000: Duplicate entry '1026' for key 'PRIMARY'
select * from t1;
a	b
1026	B
drop table t1;

Notice how the "reap" gets "dup entry" error: the 4-row INSERT fails.
This is no replication bug (only the second INSERT was committed and 
sent to binlog).
I think this is no bug at all; by specifying an explicit value the user 
is bound to get dup key errors sometimes anyway in collision with 
autoinc values from other threads. Just wanted to share this, I don't 
plan to file a bug. I am using all default values of options.
Thread
bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot27 Apr
  • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Sven Sandberg28 Apr
    • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot28 Apr
      • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Sven Sandberg28 Apr
        • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot30 Apr
    • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot2 May
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot27 Apr
  • Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot27 Apr
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot27 Apr
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Guilhem Bichot27 Apr
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Sven Sandberg28 Apr
Re: bzr commit into mysql-trunk branch (guilhem.bichot:3350) WL#5872Sven Sandberg28 Apr