#At file:///home/tomas/mysql_src/mysql-5.1-telco-6.3/
2718 Tomas Ulin 2008-10-17 [merge]
merge
modified:
sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2008-10-16 11:44:22 +0000
+++ b/sql/ha_ndbcluster.cc 2008-10-17 08:23:43 +0000
@@ -5451,12 +5451,12 @@ int ha_ndbcluster::external_lock(THD *th
(long) this, (long) thd, (long) thd_ndb,
thd_ndb->lock_count));
- if (thd_ndb->trans && m_rows_changed &&
- global_system_variables.query_cache_type)
+ if (m_rows_changed && global_system_variables.query_cache_type)
{
DBUG_PRINT("info", ("Rows has changed"));
- if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
+ if (thd_ndb->trans &&
+ thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
{
DBUG_PRINT("info", ("Add share to list of changed tables, %p",
m_share));
@@ -5773,6 +5773,8 @@ static int ndbcluster_rollback(handlerto
NdbTransaction *trans= thd_ndb->trans;
DBUG_ENTER("ndbcluster_rollback");
+ DBUG_PRINT("enter", ("all: %d", all));
+ PRINT_OPTION_FLAGS(thd);
DBUG_ASSERT(ndb);
thd_ndb->start_stmt_count= 0;
if (trans == NULL)
@@ -5791,9 +5793,14 @@ static int ndbcluster_rollback(handlerto
*/
DBUG_PRINT("info", ("Rollback before start or end-of-statement only"));
mark_transaction_to_rollback(thd, 1);
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_WARN_ENGINE_TRANSACTION_ROLLBACK,
- ER(ER_WARN_ENGINE_TRANSACTION_ROLLBACK), "NDB");
+ /*
+ This warning is not useful in the slave sql thread.
+ The slave sql thread code will handle the full rollback.
+ */
+ if (!thd->slave_thread)
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_WARN_ENGINE_TRANSACTION_ROLLBACK,
+ ER(ER_WARN_ENGINE_TRANSACTION_ROLLBACK), "NDB");
DBUG_RETURN(0);
}
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (tomas.ulin:2718) | Tomas Ulin | 17 Oct |