3107 Magnus Blåudd 2010-11-09 [merge]
Merge 7.0 -> 5.5-telco-7.0
modified:
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_glue.h
3106 Magnus Blåudd 2010-11-09 [merge]
Merge 7.0 -> 5.5-telco-7.0
modified:
sql/ha_ndbcluster.cc
3105 Magnus Blåudd 2010-11-09 [merge]
Merge 7.0 -> 5.5-telco-7.0
renamed:
storage/ndb/include/portlib/prefetch.h => storage/ndb/include/portlib/ndb_prefetch.h
modified:
storage/ndb/CMakeLists.txt
storage/ndb/include/ndb_config.h.in
storage/ndb/ndb_configure.cmake
storage/ndb/ndb_configure.m4
storage/ndb/src/kernel/vm/FastScheduler.cpp
storage/ndb/src/kernel/vm/FastScheduler.hpp
storage/ndb/src/kernel/vm/mt.cpp
storage/ndb/include/portlib/ndb_prefetch.h
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2010-11-08 15:37:40 +0000
+++ b/sql/ha_ndbcluster.cc 2010-11-09 12:09:48 +0000
@@ -6710,6 +6710,7 @@ int ndbcluster_commit(handlerton *hton,
if (thd_ndb->m_handler &&
thd_ndb->m_handler->m_read_before_write_removal_possible)
{
+#ifndef NDB_WITHOUT_READ_BEFORE_WRITE_REMOVAL
/* Autocommit with read-before-write removal
* Some operations in this autocommitted statement have not
* yet been executed
@@ -6754,6 +6755,9 @@ int ndbcluster_commit(handlerton *hton,
/* Modify execution result + optionally message */
thd->main_da.modify_affected_rows(affected, msg);
}
+#else
+ abort(); // Should never come here without rbwr support
+#endif
}
else
res= execute_commit(thd_ndb, trans, THDVAR(thd, force_send), FALSE);
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2010-11-09 06:51:33 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2010-11-09 12:13:51 +0000
@@ -587,9 +587,9 @@ static int ndbcluster_reset_logs(THD *th
so reset state if not an error as not to hit asserts
in upper layers
*/
- while (thd->main_da.is_error())
+ while (thd_stmt_da(thd)->is_error())
{
- if (thd->main_da.sql_errno() == ER_NO_SUCH_TABLE)
+ if (thd_stmt_da(thd)->sql_errno() == ER_NO_SUCH_TABLE)
{
/*
If table does not exist ignore the error as it
@@ -599,7 +599,7 @@ static int ndbcluster_reset_logs(THD *th
}
DBUG_RETURN(1);
}
- thd->main_da.reset_diagnostics_area();
+ thd_stmt_da(thd)->reset_diagnostics_area();
DBUG_RETURN(0);
}
@@ -693,14 +693,14 @@ ndbcluster_binlog_index_purge_file(THD *
" WHERE File='"), file), "'");
run_query(thd, buf, end, NULL, TRUE, FALSE);
- if (thd->main_da.is_error() &&
- thd->main_da.sql_errno() == ER_NO_SUCH_TABLE)
+ if (thd_stmt_da(thd)->is_error() &&
+ thd_stmt_da(thd)->sql_errno() == ER_NO_SUCH_TABLE)
{
/*
If table does not exist ignore the error as it
is a consistant behavior
*/
- thd->main_da.reset_diagnostics_area();
+ thd_stmt_da(thd)->reset_diagnostics_area();
}
if (save_thd == 0)
@@ -836,14 +836,14 @@ static void ndbcluster_reset_slave(THD *
char buf[1024];
char *end= strmov(buf, "DELETE FROM " NDB_REP_DB "." NDB_APPLY_TABLE);
run_query(thd, buf, end, NULL, TRUE, FALSE);
- if (thd->main_da.is_error() &&
- ((thd->main_da.sql_errno() == ER_NO_SUCH_TABLE)))
+ if (thd_stmt_da(thd)->is_error() &&
+ ((thd_stmt_da(thd)->sql_errno() == ER_NO_SUCH_TABLE)))
{
/*
If table does not exist ignore the error as it
is a consistant behavior
*/
- thd->main_da.reset_diagnostics_area();
+ thd_stmt_da(thd)->reset_diagnostics_area();
}
DBUG_VOID_RETURN;
@@ -3418,8 +3418,8 @@ static int open_and_lock_ndb_binlog_inde
sql_print_error("NDB Binlog: Opening ndb_binlog_index: killed");
else
sql_print_error("NDB Binlog: Opening ndb_binlog_index: %d, '%s'",
- thd->main_da.sql_errno(),
- thd->main_da.message());
+ thd_stmt_da(thd)->sql_errno(),
+ thd_stmt_da(thd)->message());
thd->proc_info= save_proc_info;
return -1;
}
=== modified file 'sql/ha_ndbcluster_glue.h'
--- a/sql/ha_ndbcluster_glue.h 2010-11-08 16:34:07 +0000
+++ b/sql/ha_ndbcluster_glue.h 2010-11-09 12:12:59 +0000
@@ -122,6 +122,17 @@ ulonglong thd_options(const THD * thd)
#endif
}
+/* get pointer to diagnostic area for statement from THD */
+static inline
+Diagnostics_area* thd_stmt_da(THD* thd)
+{
+#if MYSQL_VERSION_ID < 50500
+ return &(thd->main_da);
+#else
+ /* "main_da" has been made private and one should use "stmt_da*" */
+ return thd->stmt_da;
+#endif
+}
/* extract the list of warnings from THD */
static inline
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-5.5-telco-7.0 branch (magnus.blaudd:3105 to 3107) | Magnus Blåudd | 9 Nov |