Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl

into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysqldump.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
mysql-test/r/mysqldump.result:
  Restoring rpl tree mysqldump test file to main tree test files
mysql-test/r/status.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Restoring rpl tree mysqldump test file to main tree test files
This commit is contained in:
unknown 2006-09-21 00:23:20 +02:00
commit c441c64e98
104 changed files with 3225 additions and 457 deletions

View file

@ -572,7 +572,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
free_underlaid_joins(thd, &thd->lex->select_lex);
joins_freed= TRUE;
table->file->ha_release_auto_increment();
/*
Now all rows are inserted. Time to update logs and sends response to
@ -591,6 +590,11 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
else
#endif
{
/*
Do not do this release if this is a delayed insert, it would steal
auto_inc values from the delayed_insert thread as they share TABLE.
*/
table->file->ha_release_auto_increment();
if (!thd->prelocked_mode && table->file->ha_end_bulk_insert() && !error)
{
table->file->print_error(my_errno,MYF(0));
@ -2114,8 +2118,16 @@ bool delayed_insert::handle_inserts(void)
thd.start_time=row->start_time;
thd.query_start_used=row->query_start_used;
/* for the binlog, forget auto_increment ids generated by previous rows */
// thd.auto_inc_intervals_in_cur_stmt_for_binlog.empty();
/*
To get the exact auto_inc interval to store in the binlog we must not
use values from the previous interval (of the previous rows).
*/
bool log_query= (row->log_query && row->query.str != NULL);
if (log_query)
{
table->file->ha_release_auto_increment();
thd.auto_inc_intervals_in_cur_stmt_for_binlog.empty();
}
thd.first_successful_insert_id_in_prev_stmt=
row->first_successful_insert_id_in_prev_stmt;
thd.stmt_depends_on_first_successful_insert_id_in_prev_stmt=
@ -2156,7 +2168,7 @@ bool delayed_insert::handle_inserts(void)
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
}
if (row->log_query && row->query.str != NULL && mysql_bin_log.is_open())
if (log_query && mysql_bin_log.is_open())
{
/*
If the query has several rows to insert, only the first row will come
@ -2552,7 +2564,6 @@ bool select_insert::send_data(List<Item> &values)
table->next_number_field->reset();
}
}
table->file->ha_release_auto_increment();
DBUG_RETURN(error);
}
@ -2626,6 +2637,7 @@ void select_insert::send_error(uint errcode,const char *err)
}
}
ha_rollback_stmt(thd);
table->file->ha_release_auto_increment();
DBUG_VOID_RETURN;
}
@ -2676,6 +2688,7 @@ bool select_insert::send_eof()
}
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
error=error2;
table->file->ha_release_auto_increment();
if (error)
{
table->file->print_error(error,MYF(0));