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

Merged 5.1 with maria 5.1

This commit is contained in:
Michael Widenius
2008-10-10 18:28:41 +03:00
1924 changed files with 487105 additions and 167345 deletions

View File

@@ -695,7 +695,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if (thd->slave_thread &&
(info.handle_duplicates == DUP_UPDATE) &&
(table->next_number_field != NULL) &&
rpl_master_has_bug(&active_mi->rli, 24432))
rpl_master_has_bug(&active_mi->rli, 24432, TRUE, NULL, NULL))
goto abort;
#endif
@@ -2308,7 +2308,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
if (!(di->table->file->ha_table_flags() & HA_CAN_INSERT_DELAYED))
{
thd->fatal_error();
my_error(ER_ILLEGAL_HA, MYF(0), di->table_list.table_name);
my_error(ER_DELAYED_NOT_SUPPORTED, MYF(0), di->table_list.table_name);
goto err;
}
if (di->table->triggers)
@@ -2970,7 +2970,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (thd->slave_thread &&
(info.handle_duplicates == DUP_UPDATE) &&
(table->next_number_field != NULL) &&
rpl_master_has_bug(&active_mi->rli, 24432))
rpl_master_has_bug(&active_mi->rli, 24432, TRUE, NULL, NULL))
DBUG_RETURN(1);
#endif
@@ -3068,9 +3068,10 @@ bool select_insert::send_data(List<Item> &values)
DBUG_RETURN(1);
}
}
error= write_record(thd, table, &info);
table->auto_increment_field_not_null= FALSE;
if (!error)
{
if (table->triggers || info.handle_duplicates == DUP_UPDATE)
@@ -3526,7 +3527,8 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
temporary table, we need to start a statement transaction.
*/
if ((thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) == 0 &&
thd->current_stmt_binlog_row_based)
thd->current_stmt_binlog_row_based &&
mysql_bin_log.is_open())
{
thd->binlog_start_trans_and_stmt();
}
@@ -3622,10 +3624,11 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
result= store_create_info(thd, &tmp_table_list, &query, create_info);
DBUG_ASSERT(result == 0); /* store_create_info() always return 0 */
thd->binlog_query(THD::STMT_QUERY_TYPE,
query.ptr(), query.length(),
/* is_trans */ TRUE,
/* suppress_use */ FALSE);
if (mysql_bin_log.is_open())
thd->binlog_query(THD::STMT_QUERY_TYPE,
query.ptr(), query.length(),
/* is_trans */ TRUE,
/* suppress_use */ FALSE);
}
void select_create::store_values(List<Item> &values)
@@ -3723,7 +3726,7 @@ void select_create::abort()
select_insert::abort();
thd->transaction.stmt.modified_non_trans_table= FALSE;
reenable_binlog(thd);
thd->binlog_flush_pending_rows_event(TRUE);
if (m_plock)
{