1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl

into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge


mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/ndb_basic.test:
  Auto merged
mysql-test/t/ndb_charset.test:
  Auto merged
mysql-test/t/ndb_index_unique.test:
  Auto merged
mysql-test/t/ndb_insert.test:
  Auto merged
mysql-test/t/ndb_replace.test:
  Auto merged
mysql-test/t/ndb_update.test:
  Auto merged
mysql-test/t/rpl_000015.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/rpl_row_inexist_tbl.test:
  Auto merged
sql/Makefile.am:
  Auto merged
BitKeeper/deleted/.del-ndb_binlog_basic2.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
sql/item_create.cc:
  Manual merge
This commit is contained in:
unknown
2007-06-18 09:42:22 +02:00
230 changed files with 25292 additions and 925 deletions

View File

@@ -1674,6 +1674,7 @@ public:
Statement-based replication of INSERT DELAYED has problems with RAND()
and user vars, so in mixed mode we go to row-based.
*/
thd.lex->set_stmt_unsafe();
thd.set_current_stmt_binlog_row_based_if_mixed();
bzero((char*) &thd.net, sizeof(thd.net)); // Safety
@@ -3352,8 +3353,15 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
table->reginfo.lock_type=TL_WRITE;
hooks->prelock(&table, 1); // Call prelock hooks
if (! ((*lock)= mysql_lock_tables(thd, &table, 1,
MYSQL_LOCK_IGNORE_FLUSH, &not_used)))
MYSQL_LOCK_IGNORE_FLUSH, &not_used)) ||
hooks->postlock(&table, 1))
{
if (*lock)
{
mysql_unlock_tables(thd, *lock);
*lock= 0;
}
if (!create_info->table_existed)
drop_open_table(thd, table, create_table->db, create_table->table_name);
DBUG_RETURN(0);
@@ -3388,24 +3396,35 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
*/
class MY_HOOKS : public TABLEOP_HOOKS {
public:
MY_HOOKS(select_create *x) : ptr(x) { }
MY_HOOKS(select_create *x, TABLE_LIST *create_table,
TABLE_LIST *select_tables)
: ptr(x), all_tables(*create_table)
{
all_tables.next_global= select_tables;
}
private:
virtual void do_prelock(TABLE **tables, uint count)
virtual int do_postlock(TABLE **tables, uint count)
{
THD *thd= const_cast<THD*>(ptr->get_thd());
if (int error= decide_logging_format(thd, &all_tables))
return error;
TABLE const *const table = *tables;
if (ptr->get_thd()->current_stmt_binlog_row_based &&
if (thd->current_stmt_binlog_row_based &&
!table->s->tmp_table &&
!ptr->get_create_info()->table_existed)
{
ptr->binlog_show_create_table(tables, count);
}
return 0;
}
select_create *ptr;
TABLE_LIST all_tables;
};
MY_HOOKS hooks(this);
MY_HOOKS hooks(this, create_table, select_tables);
hook_ptr= &hooks;
unit= u;