#At file:///home/tomas/mysql_src/mysql-5.1-telco-6.3/
2694 Tomas Ulin 2008-10-02
post merge fixes to handle embedded
modified:
sql/ha_ndbcluster.cc
sql/handler.cc
sql/handler.h
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2008-09-30 10:42:32 +0000
+++ b/sql/ha_ndbcluster.cc 2008-10-02 06:43:17 +0000
@@ -8712,9 +8712,7 @@ static int ndbcluster_init(void *p)
h->alter_partition_flags=
ndbcluster_alter_partition_flags; /* Alter table flags */
h->fill_files_table= ndbcluster_fill_files_table;
-#ifdef HAVE_NDB_BINLOG
ndbcluster_binlog_init_handlerton();
-#endif
h->flags= HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
h->discover= ndbcluster_discover;
h->find_files= ndbcluster_find_files;
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2008-09-30 10:42:32 +0000
+++ b/sql/handler.cc 2008-10-02 06:43:17 +0000
@@ -3757,7 +3757,7 @@ int ha_table_exists_in_engine(THD* thd,
DBUG_RETURN(args.err);
}
-#ifdef HAVE_NDB_BINLOG
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
/*
TODO: change this into a dynamic struct
List<handlerton> does not work as
@@ -3812,6 +3812,7 @@ static my_bool binlog_func_foreach(THD *
return FALSE;
}
+#ifdef HAVE_NDB_BINLOG
int ha_reset_logs(THD *thd)
{
binlog_func_st bfn= {BFN_RESET_LOGS, 0};
@@ -3851,6 +3852,7 @@ int ha_binlog_index_purge_file(THD *thd,
return 1;
return 0;
}
+#endif
int ha_global_schema_lock(THD *thd)
{
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2008-09-30 10:42:32 +0000
+++ b/sql/handler.h 2008-10-02 06:43:17 +0000
@@ -2206,16 +2206,25 @@ void trans_register_ha(THD *thd, bool al
#define trans_need_2pc(thd, all) ((total_ha_2pc > 1) && \
!((all ? &thd->transaction.all :
&thd->transaction.stmt)->no_2pc))
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
#ifdef HAVE_NDB_BINLOG
int ha_reset_logs(THD *thd);
int ha_binlog_index_purge_file(THD *thd, const char *file);
int ha_reset_slave(THD *thd);
+void ha_binlog_wait(THD *thd);
+int ha_binlog_end(THD *thd);
+#else
+inline int ha_int_dummy() { return 0; }
+#define ha_reset_logs(a) ha_int_dummy()
+#define ha_binlog_index_purge_file(a,b) ha_int_dummy()
+#define ha_reset_slave(a) ha_int_dummy()
+#define ha_binlog_wait(a) do {} while (0)
+#define ha_binlog_end(a) do {} while (0)
+#endif
void ha_binlog_log_query(THD *thd, handlerton *db_type,
enum_binlog_command binlog_command,
const char *query, uint query_length,
const char *db, const char *table_name);
-void ha_binlog_wait(THD *thd);
-int ha_binlog_end(THD *thd);
int ha_global_schema_lock(THD *thd);
int ha_global_schema_unlock(THD *thd);
class Ha_global_schema_lock_guard
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (tomas.ulin:2694) | Tomas Ulin | 2 Oct |