[MDEV-4532] TokuDB: Behavior of auto_increment_offset + auto_increment_increment differs from MySQL spec Created: 2013-05-14  Updated: 2014-06-06

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.31
Fix Version/s: 5.5

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: tokudb, upstream

Issue Links:
Relates
relates to MDEV-4507 Include TokuDB storage engine Closed

 Description   

According to MySQL manual (http://dev.mysql.com/doc/refman/5.5/en/replication-options-master.html#sysvar_auto_increment_increment), if the combination of values is valid, the auto-increment sequence should start from auto_increment_offset. With TokuDB, it starts from auto_increment_offset+auto_increment_increment – in other words, the first value is omitted.

SET auto_increment_offset = 200;
SET auto_increment_increment = 300;
CREATE TABLE t1 (a int AUTO_INCREMENT, b char(8), primary key(a)) ENGINE=TokuDB;
INSERT INTO t1 VALUES (NULL,'a'),(NULL,'b'),(NULL,'c');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
500
SELECT a,b FROM t1;
a	b
500	a
800	b
1100	c

Test case:

install soname 'ha_tokudb.so';
 
SET auto_increment_offset = 200;
SET auto_increment_increment = 300;
CREATE TABLE t1 (a int AUTO_INCREMENT, b char(8), primary key(a)) ENGINE=TokuDB;
INSERT INTO t1 VALUES (NULL,'a'),(NULL,'b'),(NULL,'c');
SELECT LAST_INSERT_ID();
SELECT a,b FROM t1;

bzr version-info

revision-id: holyfoot@askmonty.org-20130514121908-d6tp4zsdkim0q4dg
revno: 3768
branch-nick: 5.5-hf-tokudb



 Comments   
Comment by Elena Stepanova [ 2013-05-14 ]

Also reproducible on MariaDB-5.5.30-TokuDB-7.0.1

Generated at Thu Feb 08 06:57:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.