Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/home/mysql_src/mysql-5.1-new-WL3146-handler
This commit is contained in:
guilhem@mysql.com 2006-06-02 22:22:59 +02:00
commit 7921811e1f
22 changed files with 303 additions and 67 deletions

View file

@ -6946,17 +6946,21 @@ func_exit_early:
return(error);
}
/***********************************************************************
/*******************************************************************************
This function initializes the auto-inc counter if it has not been
initialized yet. This function does not change the value of the auto-inc
counter if it already has been initialized. Returns the value of the
auto-inc counter. */
auto-inc counter in *first_value, and ULONGLONG_MAX in *nb_reserved_values (as
we have a table-level lock). offset, increment, nb_desired_values are ignored.
*first_value is set to -1 if error (deadlock or lock wait timeout) */
ulonglong
ha_innobase::get_auto_increment()
/*=============================*/
/* out: auto-increment column value, -1 if error
(deadlock or lock wait timeout) */
void ha_innobase::get_auto_increment(
/*=================================*/
ulonglong offset, /* in */
ulonglong increment, /* in */
ulonglong nb_desired_values, /* in */
ulonglong *first_value, /* out */
ulonglong *nb_reserved_values) /* out */
{
longlong nr;
int error;
@ -6971,10 +6975,13 @@ ha_innobase::get_auto_increment()
ut_print_timestamp(stderr);
sql_print_error("Error %lu in ::get_auto_increment()",
(ulong) error);
return(~(ulonglong) 0);
*first_value= (~(ulonglong) 0);
return;
}
return((ulonglong) nr);
*first_value= (ulonglong) nr;
/* table-level autoinc lock reserves up to +inf */
*nb_reserved_values= ULONGLONG_MAX;
}
/* See comment in handler.h */