1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

WL#1012: All changes as one single changeset.

This includes both code and test cases.


BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17:
  Delete: mysql-test/r/ctype_ucs_binlog.result
BitKeeper/deleted/.del-rpl_delete_all.result~7c050d592614b3f:
  Delete: mysql-test/r/rpl_delete_all.result
BitKeeper/deleted/.del-rpl000013-slave.opt~18266ad8a2403e8d:
  Delete: mysql-test/t/rpl000013-slave.opt
BitKeeper/deleted/.del-rpl_delete_all.test~700a1490277780e0:
  Delete: mysql-test/t/rpl_delete_all.test
mysql-test/extra/binlog_tests/binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/blackhole.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_cp932.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/drop_temp_table.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/insert_select-binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_ddl.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_deadlock.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_loaddata_m.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_log.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_multi_query.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_reset_slave.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_000001.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_EE_err.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_user_variables.test:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_binlog.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_blackhole.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_ctype_cp932.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_ctype_ucs.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_drop_tmp_tbl.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_insert_select.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Import patch wl1012.patch
mysql-test/r/rpl_000012.result:
  Import patch wl1012.patch
mysql-test/r/rpl_000015.result:
  Import patch wl1012.patch
mysql-test/r/rpl_deadlock_innodb.result:
  Import patch wl1012.patch
mysql-test/r/rpl_flushlog_loop.result:
  Import patch wl1012.patch
mysql-test/r/rpl_loaddata_s.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_000001.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_EE_err.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_charset.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_ddl.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_err_ignoredtable.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_flsh_tbls.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_loaddata_m.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_log.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_max_relay_size.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_multi_query.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_mystery22.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_reset_slave.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_rewrt_db.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_sp.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_timezone.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_until.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_user_variables.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_view.result:
  Import patch wl1012.patch
mysql-test/t/binlog_row_binlog-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_000012.test:
  Import patch wl1012.patch
mysql-test/t/rpl_000015-slave.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_000015.slave-mi:
  Import patch wl1012.patch
mysql-test/t/rpl_000015.test:
  Import patch wl1012.patch
mysql-test/t/rpl_deadlock_innodb-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-master.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-slave.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop.test:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata_s-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata_s.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_000001-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_err_ignoredtable-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_loaddata_m-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_log-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_log-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_mystery22.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_rewrt_db-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_rewrt_db.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone-slave.opt:
  Import patch wl1012.patch
BUILD/SETUP.sh:
  Import patch wl1012.patch
Makefile.am:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_until.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_view.test:
  Import patch wl1012.patch
client/Makefile.am:
  Import patch wl1012.patch
client/client_priv.h:
  Import patch wl1012.patch
client/mysqlbinlog.cc:
  Import patch wl1012.patch
configure.in:
  Import patch wl1012.patch
include/Makefile.am:
  Import patch wl1012.patch
include/base64.h:
  Import patch wl1012.patch
include/config-win.h:
  Import patch wl1012.patch
include/my_base.h:
  Import patch wl1012.patch
include/my_global.h:
  Import patch wl1012.patch
mysql-test/Makefile.am:
  Import patch wl1012.patch
mysql-test/mysql-test-run.pl:
  Import patch wl1012.patch
mysql-test/mysql-test-run.sh:
  Import patch wl1012.patch
mysql-test/r/date_formats.result:
  Import patch wl1012.patch
mysql-test/r/flush_block_commit.result:
  Import patch wl1012.patch
mysql-test/r/innodb.result:
  Import patch wl1012.patch
mysql-test/r/rpl000017.result:
  Import patch wl1012.patch
mysql-test/r/rpl_change_master.result:
  Import patch wl1012.patch
mysql-test/r/rpl_commit_after_flush.result:
  Import patch wl1012.patch
mysql-test/r/rpl_create_database.result:
  Import patch wl1012.patch
mysql-test/r/rpl_do_grant.result:
  Import patch wl1012.patch
mysql-test/r/rpl_loaddata.result:
  Import patch wl1012.patch
mysql-test/r/rpl_log_pos.result:
  Import patch wl1012.patch
mysql-test/r/rpl_multi_delete.result:
  Import patch wl1012.patch
mysql-test/r/rpl_multi_update.result:
  Import patch wl1012.patch
mysql-test/r/rpl_openssl.result:
  Import patch wl1012.patch
mysql-test/r/rpl_replicate_do.result:
  Import patch wl1012.patch
mysql-test/r/rpl_rotate_logs.result:
  Import patch wl1012.patch
mysql-test/r/rpl_server_id1.result:
  Import patch wl1012.patch
mysql-test/r/rpl_server_id2.result:
  Import patch wl1012.patch
mysql-test/r/rpl_temporary.result:
  Import patch wl1012.patch
mysql-test/r/user_var-binlog.result:
  Import patch wl1012.patch
mysql-test/t/create_select_tmp.test:
  Import patch wl1012.patch
mysql-test/t/date_formats.test:
  Import patch wl1012.patch
mysql-test/t/disabled.def:
  Import patch wl1012.patch
mysql-test/t/innodb.test:
  Import patch wl1012.patch
mysql-test/t/mysqlbinlog.test:
  Import patch wl1012.patch
mysql-test/t/mysqlbinlog2.test:
  Import patch wl1012.patch
mysql-test/t/rpl000002.test:
  Import patch wl1012.patch
mysql-test/t/rpl000006.test:
  Import patch wl1012.patch
mysql-test/t/rpl000013.test:
  Import patch wl1012.patch
mysql-test/t/rpl000017.test:
  Import patch wl1012.patch
mysql-test/t/rpl_auto_increment.test:
  Import patch wl1012.patch
mysql-test/t/rpl_change_master.test:
  Import patch wl1012.patch
mysql-test/t/rpl_commit_after_flush.test:
  Import patch wl1012.patch
mysql-test/t/rpl_create_database.test:
  Import patch wl1012.patch
mysql-test/t/rpl_do_grant.test:
  Import patch wl1012.patch
mysql-test/t/rpl_drop.test:
  Import patch wl1012.patch
mysql-test/t/rpl_empty_master_crash.test:
  Import patch wl1012.patch
mysql-test/t/rpl_failed_optimize.test:
  Import patch wl1012.patch
mysql-test/t/rpl_heap.test:
  Import patch wl1012.patch
mysql-test/t/rpl_insert_id.test:
  Import patch wl1012.patch
mysql-test/t/rpl_insert_ignore.test:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata.test:
  Import patch wl1012.patch
mysql-test/t/rpl_log_pos.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_delete.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update2.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update3.test:
  Import patch wl1012.patch
mysql-test/t/rpl_openssl.test:
  Import patch wl1012.patch
mysql-test/t/rpl_redirect.test:
  Import patch wl1012.patch
mysql-test/t/rpl_relayrotate.test:
  Import patch wl1012.patch
mysql-test/t/rpl_replicate_do.test:
  Import patch wl1012.patch
mysql-test/t/rpl_rotate_logs.test:
  Import patch wl1012.patch
mysql-test/t/rpl_server_id1.test:
  Import patch wl1012.patch
mysql-test/t/rpl_sp_effects.test:
  Import patch wl1012.patch
mysql-test/t/rpl_temporary.test:
  Import patch wl1012.patch
mysql-test/t/rpl_trigger.test:
  Import patch wl1012.patch
mysql-test/t/sp.test:
  Import patch wl1012.patch
mysql-test/t/user_var-binlog.test:
  Import patch wl1012.patch
mysys/Makefile.am:
  Import patch wl1012.patch
mysys/base64.c:
  Import patch wl1012.patch
sql/Makefile.am:
  Import patch wl1012.patch
sql/ha_innodb.cc:
  Import patch wl1012.patch
sql/ha_innodb.h:
  Import patch wl1012.patch
sql/ha_partition.cc:
  Import patch wl1012.patch
sql/handler.cc:
  Import patch wl1012.patch
sql/handler.h:
  Import patch wl1012.patch
sql/item_sum.cc:
  Import patch wl1012.patch
sql/log.cc:
  Import patch wl1012.patch
sql/log_event.cc:
  Import patch wl1012.patch
sql/log_event.h:
  Import patch wl1012.patch
sql/mysql_priv.h:
  Import patch wl1012.patch
sql/mysqld.cc:
  Import patch wl1012.patch
sql/rpl_filter.h:
  Import patch wl1012.patch
sql/set_var.cc:
  Import patch wl1012.patch
sql/share/errmsg.txt:
  Import patch wl1012.patch
sql/slave.cc:
  Import patch wl1012.patch
sql/slave.h:
  Import patch wl1012.patch
sql/sp.cc:
  Import patch wl1012.patch
sql/sp_head.cc:
  Import patch wl1012.patch
sql/sql_acl.cc:
  Import patch wl1012.patch
sql/sql_base.cc:
  Import patch wl1012.patch
sql/sql_class.cc:
  Import patch wl1012.patch
sql/sql_class.h:
  Import patch wl1012.patch
sql/sql_delete.cc:
  Import patch wl1012.patch
sql/sql_insert.cc:
  Import patch wl1012.patch
sql/sql_lex.h:
  Import patch wl1012.patch
sql/sql_list.h:
  Import patch wl1012.patch
sql/sql_load.cc:
  Import patch wl1012.patch
sql/sql_parse.cc:
  Import patch wl1012.patch
sql/sql_plugin.cc:
  Import patch wl1012.patch
sql/sql_rename.cc:
  Import patch wl1012.patch
sql/sql_repl.h:
  Import patch wl1012.patch
sql/sql_select.cc:
  Import patch wl1012.patch
sql/sql_show.cc:
  Import patch wl1012.patch
sql/sql_table.cc:
  Import patch wl1012.patch
sql/sql_udf.cc:
  Import patch wl1012.patch
sql/sql_union.cc:
  Import patch wl1012.patch
sql/sql_update.cc:
  Import patch wl1012.patch
sql/sql_yacc.yy:
  Import patch wl1012.patch
sql/table.cc:
  Import patch wl1012.patch
sql/table.h:
  Import patch wl1012.patch
storage/innobase/include/lock0lock.h:
  Import patch wl1012.patch
storage/innobase/include/row0mysql.h:
  Import patch wl1012.patch
storage/innobase/include/row0vers.h:
  Import patch wl1012.patch
storage/innobase/lock/lock0lock.c:
  Import patch wl1012.patch
storage/innobase/row/row0mysql.c:
  Import patch wl1012.patch
storage/innobase/row/row0sel.c:
  Import patch wl1012.patch
storage/innobase/row/row0vers.c:
  Import patch wl1012.patch
This commit is contained in:
unknown
2005-12-22 06:39:02 +01:00
parent 65c560e9b8
commit 09346e6e2d
447 changed files with 34742 additions and 3216 deletions

View File

@ -22,6 +22,7 @@
#include <my_dir.h>
#include "sp_head.h"
#include "sql_trigger.h"
#include "sql_show.h"
#ifdef __WIN__
#include <io.h>
@ -53,14 +54,15 @@ static bool check_engine(THD *thd, const char *table_name,
file
*/
static void write_bin_log(THD *thd, bool clear_error)
static void write_bin_log(THD *thd, bool clear_error,
char const* query, ulong query_length)
{
if (mysql_bin_log.is_open())
{
if (clear_error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
mysql_bin_log.write(&qinfo);
thd->binlog_query(THD::STMT_QUERY_TYPE,
query, query_length, FALSE, FALSE);
}
}
@ -277,9 +279,19 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
char path[FN_REFLEN], *alias;
String wrong_tables;
int error;
int non_temp_tables_count= 0;
bool some_tables_deleted=0, tmp_table_deleted=0, foreign_key_error=0;
String built_query;
DBUG_ENTER("mysql_rm_table_part2");
if (binlog_row_based && !dont_log_query)
{
built_query.set_charset(system_charset_info);
if (if_exists)
built_query.append("DROP TABLE IF EXISTS ");
else
built_query.append("DROP TABLE ");
}
/*
If we have the table in the definition cache, we don't have to check the
.frm file to find if the table is a normal table (not view) and what
@ -313,6 +325,30 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
continue; // removed temporary table
}
/*
If row-based replication is used and the table is not a
temporary table, we add the table name to the drop statement
being built. The string always end in a comma and the comma
will be chopped off before being written to the binary log.
*/
if (binlog_row_based && !dont_log_query)
{
++non_temp_tables_count;
/*
Don't write the database name if it is the current one (or if
thd->db is NULL).
*/
built_query.append("`");
if (thd->db == NULL || strcmp(db,thd->db) != 0)
{
built_query.append(db);
built_query.append("`.`");
}
built_query.append(table->table_name);
built_query.append("`,");
}
error=0;
table_type= table->db_type;
if (!drop_temporary)
@ -401,12 +437,48 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (some_tables_deleted || tmp_table_deleted || !error)
{
query_cache_invalidate3(thd, tables, 0);
if (!dont_log_query && mysql_bin_log.is_open())
if (!dont_log_query)
{
if (!error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
mysql_bin_log.write(&qinfo);
if (!binlog_row_based ||
non_temp_tables_count > 0 && !tmp_table_deleted)
{
/*
In this case, we are either using statement-based
replication or using row-based replication but have only
deleted one or more non-temporary tables (and no temporary
tables). In this case, we can write the original query into
the binary log.
*/
write_bin_log(thd, !error, thd->query, thd->query_length);
}
else if (binlog_row_based &&
non_temp_tables_count > 0 &&
tmp_table_deleted)
{
/*
In this case we have deleted both temporary and
non-temporary tables, so:
- since we have deleted a non-temporary table we have to
binlog the statement, but
- since we have deleted a temporary table we cannot binlog
the statement (since the table has not been created on the
slave, this might cause the slave to stop).
Instead, we write a built statement, only containing the
non-temporary tables, to the binary log
*/
built_query.chop(); // Chop of the last comma
built_query.append(" /* generated by server */");
write_bin_log(thd, !error, built_query.ptr(), built_query.length());
}
/*
The remaining cases are:
- no tables where deleted and
- only temporary tables where deleted and row-based
replication is used.
In both these cases, nothing should be written to the binary
log.
*/
}
}
@ -1837,13 +1909,17 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
}
thd->tmp_table_used= 1;
}
if (!internal_tmp_table && mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
mysql_bin_log.write(&qinfo);
}
/*
Don't write statement if:
- It is an internal temporary table,
- Row-based logging is used and it we are creating a temporary table, or
- The binary log is not open.
*/
if (!internal_tmp_table &&
!(binlog_row_based &&
(create_info->options & HA_LEX_CREATE_TMP_TABLE)))
write_bin_log(thd, TRUE, thd->query, thd->query_length);
error= FALSE;
unlock_and_end:
VOID(pthread_mutex_unlock(&LOCK_open));
@ -2982,8 +3058,63 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
goto err; /* purecov: inspected */
}
// Must be written before unlock
write_bin_log(thd, TRUE);
/*
We have to write the query before we unlock the tables.
*/
if (binlog_row_based)
{
/*
Since temporary tables are not replicated under row-based
replication, CREATE TABLE ... LIKE ... needs special
treatement. We have four cases to consider, according to the
following decision table:
==== ========= ========= ==============================
Case Target Source Write to binary log
==== ========= ========= ==============================
1 normal normal Original statement
2 normal temporary Generated statement
3 temporary normal Nothing
4 temporary temporary Nothing
==== ========= ========= ==============================
The variable 'tmp_table' below is used to see if the source
table is a temporary table: if it is set, then the source table
was a temporary table and we can take apropriate actions.
*/
if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
{
if (tmp_table) // Case 2
{
char buf[2048];
String query(buf, sizeof(buf), system_charset_info);
query.length(0); // Have to zero it since constructor doesn't
TABLE *table_ptr;
int error;
/*
Let's open and lock the table: it will be closed (and
unlocked) by close_thread_tables() at the end of the
statement anyway.
*/
if (!(table_ptr= open_ltable(thd, table, TL_READ_NO_INSERT)))
goto err;
int result= store_create_info(thd, table, &query, create_info);
DBUG_ASSERT(result == 0); // store_create_info() always return 0
write_bin_log(thd, TRUE, query.ptr(), query.length());
}
else // Case 1
write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
/*
Case 3 and 4 does nothing under RBR
*/
}
else if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
write_bin_log(thd, TRUE, thd->query, thd->query_length);
res= FALSE;
goto err;
@ -3089,7 +3220,7 @@ mysql_discard_or_import_tablespace(THD *thd,
error=1;
if (error)
goto err;
write_bin_log(thd, FALSE);
write_bin_log(thd, FALSE, thd->query, thd->query_length);
err:
close_thread_tables(thd);
thd->tablespace_op=FALSE;
@ -4057,7 +4188,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
if (!error)
{
write_bin_log(thd, TRUE);
write_bin_log(thd, TRUE, thd->query, thd->query_length);
if (do_send_ok)
send_ok(thd);
}
@ -4472,7 +4603,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (!error)
{
close_thread_tables(thd);
write_bin_log(thd, FALSE);
write_bin_log(thd, FALSE, thd->query, thd->query_length);
send_ok(thd);
DBUG_RETURN(FALSE);
}
@ -4609,7 +4740,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
my_free((gptr) new_table,MYF(0));
goto err;
}
write_bin_log(thd, TRUE);
/* We don't replicate alter table statement on temporary tables */
if (!binlog_row_based)
write_bin_log(thd, TRUE, thd->query, thd->query_length);
goto end_temporary;
}
@ -4751,7 +4884,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
}
thd->proc_info="end";
write_bin_log(thd, TRUE);
DBUG_ASSERT(!(mysql_bin_log.is_open() && binlog_row_based &&
(create_info->options & HA_LEX_CREATE_TMP_TABLE)));
write_bin_log(thd, TRUE, thd->query, thd->query_length);
VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open));
/*
@ -4928,7 +5064,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
{
copy_ptr->do_copy(copy_ptr);
}
if ((error=to->file->write_row((byte*) to->record[0])))
if ((error=to->file->ha_write_row((byte*) to->record[0])))
{
if ((!ignore &&
handle_duplicates != DUP_REPLACE) ||