summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-05-31 16:16:04 +0200
committerunknown <mskold@mysql.com>2006-05-31 16:16:04 +0200
commit9dea1ccc2920c0d2f53f0851510f6a86f06fcc4e (patch)
treedfe5290691f366e5770a775443b10447f0ed5995 /sql/ha_ndbcluster.cc
parentf34e0a39145b8c8a5f1e3919b316939e8450a939 (diff)
parent2f333aae1fd2045b5c11d37995bd1346d887c171 (diff)
downloadmariadb-git-9dea1ccc2920c0d2f53f0851510f6a86f06fcc4e.tar.gz
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into mysql.com:/home/marty/MySQL/mysql-5.1-new storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged mysql-test/t/disabled.def: Auto merged sql/ha_ndbcluster.cc: Merge
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc27
1 files changed, 15 insertions, 12 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index ae03efaa963..c36ccdc41ca 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -4661,7 +4661,7 @@ int ha_ndbcluster::create(const char *name,
share->db, share->table_name,
m_table->getObjectId(),
m_table->getObjectVersion(),
- SOT_CREATE_TABLE);
+ SOT_CREATE_TABLE, 0, 0, 1);
break;
}
}
@@ -5052,7 +5052,7 @@ int ha_ndbcluster::rename_table(const char *from, const char *to)
old_dbname, m_tabname,
ndb_table_id, ndb_table_version,
SOT_RENAME_TABLE,
- m_dbname, new_tabname);
+ m_dbname, new_tabname, 1);
}
// If we are moving tables between databases, we need to recreate
@@ -5101,6 +5101,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
const char *db,
const char *table_name)
{
+ THD *thd= current_thd;
DBUG_ENTER("ha_ndbcluster::ndbcluster_delete_table");
NDBDICT *dict= ndb->getDictionary();
#ifdef HAVE_NDB_BINLOG
@@ -5132,7 +5133,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
ndb_table_version= h->m_table->getObjectVersion();
}
#endif
- h->release_metadata(current_thd, ndb);
+ h->release_metadata(thd, ndb);
}
else
{
@@ -5198,11 +5199,11 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
if (!IS_TMP_PREFIX(table_name) && share)
{
- ndbcluster_log_schema_op(current_thd, share,
- current_thd->query, current_thd->query_length,
+ ndbcluster_log_schema_op(thd, share,
+ thd->query, thd->query_length,
share->db, share->table_name,
ndb_table_id, ndb_table_version,
- SOT_DROP_TABLE);
+ SOT_DROP_TABLE, 0, 0, 1);
}
else if (table_dropped && share && share->op) /* ndbcluster_log_schema_op
will do a force GCP */
@@ -5781,6 +5782,7 @@ int ndbcluster_drop_database_impl(const char *path)
static void ndbcluster_drop_database(char *path)
{
+ THD *thd= current_thd;
DBUG_ENTER("ndbcluster_drop_database");
#ifdef HAVE_NDB_BINLOG
/*
@@ -5798,9 +5800,9 @@ static void ndbcluster_drop_database(char *path)
#ifdef HAVE_NDB_BINLOG
char db[FN_REFLEN];
ha_ndbcluster::set_dbname(path, db);
- ndbcluster_log_schema_op(current_thd, 0,
- current_thd->query, current_thd->query_length,
- db, "", 0, 0, SOT_DROP_DB);
+ ndbcluster_log_schema_op(thd, 0,
+ thd->query, thd->query_length,
+ db, "", 0, 0, SOT_DROP_DB, 0, 0, 0);
#endif
DBUG_VOID_RETURN;
}
@@ -6875,6 +6877,7 @@ static void dbug_print_open_tables()
*/
int handle_trailing_share(NDB_SHARE *share)
{
+ THD *thd= current_thd;
static ulong trailing_share_id= 0;
DBUG_ENTER("handle_trailing_share");
@@ -6885,7 +6888,7 @@ int handle_trailing_share(NDB_SHARE *share)
bzero((char*) &table_list,sizeof(table_list));
table_list.db= share->db;
table_list.alias= table_list.table_name= share->table_name;
- close_cached_tables(current_thd, 0, &table_list, TRUE);
+ close_cached_tables(thd, 0, &table_list, TRUE);
pthread_mutex_lock(&ndbcluster_mutex);
if (!--share->use_count)
@@ -9989,13 +9992,13 @@ int ndbcluster_alter_tablespace(THD* thd, st_alter_tablespace *info)
thd->query, thd->query_length,
"", info->tablespace_name,
0, 0,
- SOT_TABLESPACE);
+ SOT_TABLESPACE, 0, 0, 0);
else
ndbcluster_log_schema_op(thd, 0,
thd->query, thd->query_length,
"", info->logfile_group_name,
0, 0,
- SOT_LOGFILE_GROUP);
+ SOT_LOGFILE_GROUP, 0, 0, 0);
#endif
DBUG_RETURN(FALSE);