1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1

into  janus.mylan:/usr/home/serg/Abk/mysql-maria


Makefile.am:
  Auto merged
configure.in:
  Auto merged
BitKeeper/triggers/post-commit:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_dbug.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
server-tools/instance-manager/CMakeLists.txt:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  merged
sql/handler.h:
  merged
sql/mysql_priv.h:
  merged
sql/mysqld.cc:
  merged
sql/set_var.cc:
  merged
sql/sql_select.cc:
  merged
sql/sql_show.cc:
  merged
unittest/mysys/my_atomic-t.c:
  merged
This commit is contained in:
unknown
2007-12-27 18:16:02 +01:00
385 changed files with 97334 additions and 2452 deletions

View File

@ -3516,6 +3516,15 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
thd->binlog_start_trans_and_stmt();
}
/*
If error during the CREATE SELECT we drop the table, so no need for
engines to do logging of insertions (optimization). We don't do it for
temporary tables (yet) as re-enabling causes an undesirable commit.
*/
if (((thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) == 0) &&
ha_enable_transaction(thd, FALSE))
DBUG_RETURN(-1);
if (!(table= create_table_from_items(thd, create_info, create_table,
alter_info, &values,
&extra_lock, hook_ptr)))
@ -3667,8 +3676,10 @@ bool select_create::send_eof()
nevertheless.
*/
if (!table->s->tmp_table)
{
ha_enable_transaction(thd, TRUE);
ha_commit(thd); // Can fail, but we proceed anyway
}
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
if (m_plock)
@ -3694,6 +3705,9 @@ void select_create::abort()
select_insert::abort();
reenable_binlog(thd);
if (table && !table->s->tmp_table)
ha_enable_transaction(thd, TRUE);
/*
We roll back the statement, including truncating the transaction
cache of the binary log, if the statement failed.