summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_binlog.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-02-02 02:22:16 +0300
committerKonstantin Osipov <kostja@sun.com>2010-02-02 02:22:16 +0300
commit665100b69dfebe45e2d3b68116c6718560bf63b2 (patch)
treea19075577cf795c631e5ac514d6dac52880f9b86 /sql/ha_ndbcluster_binlog.cc
parent5eed6cc55db0f99aff7845397a824fb2f5ef069e (diff)
parent4e8d1c6bf30abfd45a993b058ff2a33d4671b73d (diff)
downloadmariadb-git-665100b69dfebe45e2d3b68116c6718560bf63b2.tar.gz
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/ha_ndbcluster_binlog.cc')
-rw-r--r--sql/ha_ndbcluster_binlog.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index d178b16520c..5184a34ad6e 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -349,7 +349,7 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
int error;
DBUG_ENTER("ndbcluster_binlog_open_table");
- safe_mutex_assert_owner(&LOCK_open);
+ mysql_mutex_assert_owner(&LOCK_open);
init_tmp_table_share(thd, table_share, share->db, 0, share->table_name,
share->key);
if ((error= open_table_def(thd, table_share, 0)))
@@ -897,9 +897,9 @@ int ndbcluster_setup_binlog_table_shares(THD *thd)
if (!ndb_schema_share &&
ndbcluster_check_ndb_schema_share() == 0)
{
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
ndb_create_table_from_engine(thd, NDB_REP_DB, NDB_SCHEMA_TABLE);
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
if (!ndb_schema_share)
{
ndbcluster_create_schema_table(thd);
@@ -911,9 +911,9 @@ int ndbcluster_setup_binlog_table_shares(THD *thd)
if (!ndb_apply_status_share &&
ndbcluster_check_ndb_apply_status_share() == 0)
{
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
ndb_create_table_from_engine(thd, NDB_REP_DB, NDB_APPLY_TABLE);
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
if (!ndb_apply_status_share)
{
ndbcluster_create_ndb_apply_status_table(thd);
@@ -923,12 +923,12 @@ int ndbcluster_setup_binlog_table_shares(THD *thd)
}
if (!ndbcluster_find_all_files(thd))
{
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
ndb_binlog_tables_inited= TRUE;
if (ndb_extra_logging)
sql_print_information("NDB Binlog: ndb tables writable");
close_cached_tables(NULL, NULL, TRUE, FALSE);
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
/* Signal injector thread that all is setup */
pthread_cond_signal(&injector_cond);
}
@@ -1571,8 +1571,8 @@ end:
(void) pthread_mutex_lock(&ndb_schema_object->mutex);
if (have_lock_open)
{
- safe_mutex_assert_owner(&LOCK_open);
- (void) pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_assert_owner(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
}
while (1)
{
@@ -1631,7 +1631,7 @@ end:
}
if (have_lock_open)
{
- (void) pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
}
(void) pthread_mutex_unlock(&ndb_schema_object->mutex);
}
@@ -1715,7 +1715,7 @@ ndb_handle_schema_change(THD *thd, Ndb *ndb, NdbEventOperation *pOp,
{
DBUG_DUMP("frm", (uchar*) altered_table->getFrmData(),
altered_table->getFrmLength());
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
Ndb_table_guard ndbtab_g(dict, tabname);
const NDBTAB *old= ndbtab_g.get_table();
if (!old &&
@@ -1753,7 +1753,7 @@ ndb_handle_schema_change(THD *thd, Ndb *ndb, NdbEventOperation *pOp,
dbname= table_share->db.str;
tabname= table_share->table_name.str;
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
}
my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));
@@ -1980,7 +1980,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
}
// fall through
case SOT_CREATE_TABLE:
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
if (ndbcluster_check_if_local_table(schema->db, schema->name))
{
DBUG_PRINT("info", ("NDB Binlog: Skipping locally defined table '%s.%s'",
@@ -1994,7 +1994,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
{
print_could_not_discover_error(thd, schema);
}
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
log_query= 1;
break;
case SOT_DROP_DB:
@@ -2263,7 +2263,7 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
free_share(&share);
share= 0;
}
- pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
if (ndbcluster_check_if_local_table(schema->db, schema->name))
{
DBUG_PRINT("info", ("NDB Binlog: Skipping locally defined table '%s.%s'",
@@ -2277,7 +2277,7 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
{
print_could_not_discover_error(thd, schema);
}
- pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
}
break;
default:
@@ -3140,8 +3140,8 @@ ndbcluster_handle_drop_table(Ndb *ndb, const char *event_name,
#ifdef SYNC_DROP_
thd->proc_info= "Syncing ndb table schema operation and binlog";
(void) pthread_mutex_lock(&share->mutex);
- safe_mutex_assert_owner(&LOCK_open);
- (void) pthread_mutex_unlock(&LOCK_open);
+ mysql_mutex_assert_owner(&LOCK_open);
+ mysql_mutex_unlock(&LOCK_open);
int max_timeout= opt_ndb_sync_timeout;
while (share->op)
{
@@ -3167,7 +3167,7 @@ ndbcluster_handle_drop_table(Ndb *ndb, const char *event_name,
type_str, share->key);
}
}
- (void) pthread_mutex_lock(&LOCK_open);
+ mysql_mutex_lock(&LOCK_open);
(void) pthread_mutex_unlock(&share->mutex);
#else
(void) pthread_mutex_lock(&share->mutex);