mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge mysql-5.1-bugteam -> mysql-5.1-innodb
This commit is contained in:
commit
3e56680632
100 changed files with 1938 additions and 471 deletions
|
|
@ -765,6 +765,16 @@ convert_error_code_to_mysql(
|
|||
|
||||
my_error(ER_QUERY_INTERRUPTED, MYF(0));
|
||||
return(-1);
|
||||
} else if (error == DB_FOREIGN_EXCEED_MAX_CASCADE) {
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
HA_ERR_ROW_IS_REFERENCED,
|
||||
"InnoDB: Cannot delete/update "
|
||||
"rows with cascading foreign key "
|
||||
"constraints that exceed max "
|
||||
"depth of %d. Please "
|
||||
"drop extra constraints and try "
|
||||
"again", DICT_FK_MAX_RECURSIVE_LOAD);
|
||||
return(-1);
|
||||
} else {
|
||||
return(-1); // Unknown error
|
||||
}
|
||||
|
|
@ -2712,12 +2722,19 @@ ha_innobase::innobase_initialize_autoinc()
|
|||
err = row_search_max_autoinc(index, col_name, &read_auto_inc);
|
||||
|
||||
switch (err) {
|
||||
case DB_SUCCESS:
|
||||
/* At the this stage we do not know the increment
|
||||
or the offset, so use a default increment of 1. */
|
||||
auto_inc = read_auto_inc + 1;
|
||||
break;
|
||||
case DB_SUCCESS: {
|
||||
ulonglong col_max_value;
|
||||
|
||||
col_max_value = innobase_get_int_col_max_value(field);
|
||||
|
||||
/* At the this stage we do not know the increment
|
||||
nor the offset, so use a default increment of 1. */
|
||||
|
||||
auto_inc = innobase_next_autoinc(
|
||||
read_auto_inc, 1, 1, col_max_value);
|
||||
|
||||
break;
|
||||
}
|
||||
case DB_RECORD_NOT_FOUND:
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB: MySQL and InnoDB data "
|
||||
|
|
@ -2943,8 +2960,6 @@ retry:
|
|||
/* Init table lock structure */
|
||||
thr_lock_data_init(&share->lock,&lock,(void*) 0);
|
||||
|
||||
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
|
||||
|
||||
/* Only if the table has an AUTOINC column. */
|
||||
if (prebuilt->table != NULL && table->found_next_number_field != NULL) {
|
||||
dict_table_autoinc_lock(prebuilt->table);
|
||||
|
|
@ -2961,6 +2976,8 @@ retry:
|
|||
dict_table_autoinc_unlock(prebuilt->table);
|
||||
}
|
||||
|
||||
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue