提交 358c0388 authored 作者: Thomas Mueller's avatar Thomas Mueller

It is now longer allowed to create an index on a CLOB or BLOB column.

上级 38ae35b2
......@@ -41,6 +41,9 @@ public class PageBtreeIndex extends PageIndex {
public PageBtreeIndex(RegularTable table, int id, String indexName, IndexColumn[] columns,
IndexType indexType, boolean create, Session session) {
initBaseIndex(table, id, indexName, columns, indexType);
if (!database.isStarting() && create) {
checkIndexColumnTypes(columns);
}
// int test;
// trace.setLevel(TraceSystem.DEBUG);
tableData = table;
......@@ -51,9 +54,6 @@ public class PageBtreeIndex extends PageIndex {
store.addIndex(this);
if (create) {
// new index
if (!database.isStarting()) {
checkIndexColumnTypes(columns);
}
rootPageId = store.allocatePage();
needRebuild = true;
// TODO currently the head position is stored in the log
......
......@@ -106,7 +106,9 @@ public class TestLob extends TestBase {
stat.execute("create table test(id int, name clob)");
try {
stat.execute("create index idx_n on test(name)");
fail();
if (!config.memory) {
fail();
}
} catch (SQLException e) {
assertEquals(ErrorCode.FEATURE_NOT_SUPPORTED_1, e.getErrorCode());
}
......@@ -290,7 +292,7 @@ public class TestLob extends TestBase {
Statement stat;
conn = getConnection("lob");
stat = conn.createStatement();
stat.execute("create table test(x clob unique)");
stat.execute("create memory table test(x clob unique)");
stat.execute("insert into test values('hello')");
stat.execute("insert into test values('world')");
try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论