Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

v5.1 AUTOINC - handler::get_auto_increment() - question

From: Sunny Bains <Sunny.Bains(at)oracle.com>
Date: Mon Aug 13 2007 - 21:22:31 EDT


Hi,

Given the table def:

CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
`c2` varchar(10) DEFAULT NULL,

  PRIMARY KEY (`c1`)
) ENGINE=InnoDB;

for the following statement:

INSERT INTO t1(c1,c2) VALUES(1, 'a'), (NULL, 'b'), (3, 'c'), (NULL,'d');

When MySQL calls the engine's get_auto_increment() method it passes a value of 4 for the nb_desired_values parameter.

Breakpoint 4, ha_innobase::get_auto_increment (this=0x86c5740, offset=1,

    increment=1, nb_desired_values=4, first_value=0x8eb1d1c0,     nb_reserved_values=0x8eb1d1b8) at handler/ha_innodb.cc:7631

Do you need help?X

Is there a reason for this ? I think it should be 3.

Regards,
-sunny

-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Mon Aug 13 21:24:08 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:12 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library