提交 927d1aa4 authored 作者: Thomas Mueller's avatar Thomas Mueller

With version 1.3.156, the DB2 mode could not be used with CLOB and BLOB data.…

With version 1.3.156, the DB2 mode could not be used with CLOB and BLOB data. When upgrading from an older 1.3.x version to version 1.3.156, CLOB and BLOB data was lost in many cases.
上级 0e040374
......@@ -200,6 +200,9 @@ public class Parser {
public Prepared prepare(String sql) {
Prepared p = parse(sql);
p.prepare();
if (currentTokenType != END) {
throw getSyntaxError();
}
return p;
}
......@@ -211,7 +214,8 @@ public class Parser {
*/
public Command prepareCommand(String sql) {
try {
Prepared p = prepare(sql);
Prepared p = parse(sql);
p.prepare();
Command c = new CommandContainer(this, sql, p);
p.setCommand(c);
if (isToken(";")) {
......
......@@ -101,7 +101,8 @@ public class LobStorage {
"INFORMATION_SCHEMA.INDEX_LOB_TABLE ON " + LOBS + "(TABLE)");
stat.execute("CREATE TABLE IF NOT EXISTS " + LOB_MAP +
"(LOB BIGINT, SEQ INT, POS BIGINT, HASH INT, BLOCK BIGINT, PRIMARY KEY(LOB, SEQ)) HIDDEN");
// TODO the column name OFFSET was used in version 1.3.156, so this can be remove in a later version
// TODO the column name OFFSET was used in version 1.3.156,
// so this can be remove in a later version
stat.execute("ALTER TABLE " + LOB_MAP + " RENAME TO " + LOB_MAP + " HIDDEN");
stat.execute("ALTER TABLE " + LOB_MAP + " ADD IF NOT EXISTS POS BIGINT BEFORE HASH");
stat.execute("ALTER TABLE " + LOB_MAP + " DROP COLUMN IF EXISTS \"OFFSET\"");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论