summaryrefslogtreecommitdiff
path: root/sql/sql_tablespace.cc
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2006-01-11 19:49:38 +0100
committertomas@poseidon.ndb.mysql.com <>2006-01-11 19:49:38 +0100
commit0a0fe2b1c0d4b49a696f918603a934ec0225cea3 (patch)
treea7b6e04c7594e35bbff040cc076c012cadb7ebe8 /sql/sql_tablespace.cc
parent2f27c6499dc8eca9a48a0317e535dd75f96cc8ea (diff)
downloadmariadb-git-0a0fe2b1c0d4b49a696f918603a934ec0225cea3.tar.gz
bug: replication of table spaces to work
bug: check if storage engine is enabled to avoif code dump
Diffstat (limited to 'sql/sql_tablespace.cc')
-rw-r--r--sql/sql_tablespace.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc
index 0c99180365e..954d65ea44e 100644
--- a/sql/sql_tablespace.cc
+++ b/sql/sql_tablespace.cc
@@ -30,7 +30,8 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info)
*/
hton= ha_resolve_by_legacy_type(thd, ts_info->storage_engine);
- if (hton->alter_tablespace && (error= hton->alter_tablespace(thd, ts_info)))
+ if (hton->state == SHOW_OPTION_YES &&
+ hton->alter_tablespace && (error= hton->alter_tablespace(thd, ts_info)))
{
if (error == HA_ADMIN_NOT_IMPLEMENTED)
{
@@ -46,5 +47,10 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info)
}
DBUG_RETURN(error);
}
+ if (mysql_bin_log.is_open())
+ {
+ thd->binlog_query(THD::STMT_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, TRUE);
+ }
DBUG_RETURN(FALSE);
}