提交 c2b3b4c2 authored 作者: Thomas Mueller's avatar Thomas Mueller

Support for the MS SQL Server syntax VARCHAR(MAX).

上级 c618b4ab
...@@ -3571,6 +3571,7 @@ public class Parser { ...@@ -3571,6 +3571,7 @@ public class Parser {
scale = scale == -1 ? dataType.defaultScale : scale; scale = scale == -1 ? dataType.defaultScale : scale;
if (dataType.supportsPrecision || dataType.supportsScale) { if (dataType.supportsPrecision || dataType.supportsScale) {
if (readIf("(")) { if (readIf("(")) {
if (!readIf("MAX")) {
long p = readLong(); long p = readLong();
if (readIf("K")) { if (readIf("K")) {
p *= 1024; p *= 1024;
...@@ -3602,6 +3603,7 @@ public class Parser { ...@@ -3602,6 +3603,7 @@ public class Parser {
precision = p; precision = p;
displaySize = MathUtils.convertLongToInt(precision); displaySize = MathUtils.convertLongToInt(precision);
original += ")"; original += ")";
}
read(")"); read(")");
} }
} else if (readIf("(")) { } else if (readIf("(")) {
......
...@@ -426,7 +426,7 @@ select constraint_name from information_schema.indexes where table_name = 'CHILD ...@@ -426,7 +426,7 @@ select constraint_name from information_schema.indexes where table_name = 'CHILD
drop table parent, child; drop table parent, child;
> ok > ok
create table test(id int, name varchar); create table test(id int, name varchar(max));
> ok > ok
alter table test alter column id identity; alter table test alter column id identity;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论