Commit 2c66ac87 authored by unknown's avatar unknown

ndb_dd_ddl.test, ndb_dd_ddl.result, ha_ndbcluster.cc:

  bug#24667  After ALTER TABLE operation ndb_dd table becomes regular ndb: disallowed TABLESPACE declaration for STORAGE MEMORY
Makefile:
  Rename: storage/ndb/ndbapi-examples/mgmapi_logevent_dual/Makefile -> storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile
mgmapi_logevent2.cpp:
  Rename: storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent_dual.cpp -> storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent2.cpp
Makefile:
  Rename mgmapi_logevent_dual to mgmapi_logevent2
mgmapi_logevent2.cpp:
  Rename: storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent2.cpp -> storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2.cpp


storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2.cpp:
  Rename: storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent2.cpp -> storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2.cpp
storage/ndb/ndbapi-examples/Makefile:
  Rename mgmapi_logevent_dual to mgmapi_logevent2
storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile:
  Rename mgmapi_logevent_dual to mgmapi_logevent2
mysql-test/r/ndb_dd_ddl.result:
  bug#24667  After ALTER TABLE operation ndb_dd table becomes regular ndb: disallowed TABLESPACE declaration for STORAGE MEMORY
mysql-test/t/ndb_dd_ddl.test:
  bug#24667  After ALTER TABLE operation ndb_dd table becomes regular ndb: disallowed TABLESPACE declaration for STORAGE MEMORY
sql/ha_ndbcluster.cc:
  bug#24667  After ALTER TABLE operation ndb_dd table becomes regular ndb: disallowed TABLESPACE declaration for STORAGE MEMORY
parent 71b72775
......@@ -183,6 +183,11 @@ INITIAL_SIZE 1M
ENGINE NDB;
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE MEMORY
ENGINE NDB;
ERROR HY000: Can't create table 'test.t1' (errno: 138)
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE NDB;
CREATE INDEX b_i on t1(b);
......
......@@ -270,11 +270,18 @@ ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 1M
ENGINE NDB;
--error 1005
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE MEMORY
ENGINE NDB;
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE NDB;
CREATE INDEX b_i on t1(b);
CREATE INDEX bc_i on t1(b, c);
......@@ -351,4 +358,6 @@ engine ndb;
drop table t1;
# End 5.1 test
......@@ -4836,6 +4836,16 @@ int ha_ndbcluster::create(const char *name,
}
else if (info->tablespace)
{
if (info->storage_media == HA_SM_MEMORY)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
"TABLESPACE currently only supported for "
"STORAGE DISK");
DBUG_RETURN(HA_ERR_UNSUPPORTED);
}
tab.setTablespace(info->tablespace);
info->storage_media = HA_SM_DISK; //if use tablespace, that also means store on disk
}
......
......@@ -7,7 +7,7 @@ BIN_DIRS := ndbapi_simple \
ndbapi_scan \
mgmapi_logevent \
ndbapi_simple_dual \
mgmapi_logevent_dual
mgmapi_logevent2
bins: $(patsubst %, _bins_%, $(BIN_DIRS))
......
TARGET = mgmapi_logevent_dual
TARGET = mgmapi_logevent2
SRCS = $(TARGET).cpp
OBJS = $(TARGET).o
CXX = g++
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment