提交 24aab503 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add a comment and a test case

上级 5be66a06
...@@ -216,6 +216,9 @@ public class ExpressionColumn extends Expression { ...@@ -216,6 +216,9 @@ public class ExpressionColumn extends Expression {
throw DbException.get(ErrorCode.MUST_GROUP_BY_COLUMN_1, getSQL()); throw DbException.get(ErrorCode.MUST_GROUP_BY_COLUMN_1, getSQL());
} }
} }
/*
* ENUM values are stored as integers.
*/
if (value != ValueNull.INSTANCE) { if (value != ValueNull.INSTANCE) {
ExtTypeInfo extTypeInfo = column.getType().getExtTypeInfo(); ExtTypeInfo extTypeInfo = column.getType().getExtTypeInfo();
if (extTypeInfo != null) { if (extTypeInfo != null) {
......
...@@ -26,6 +26,11 @@ select * from card; ...@@ -26,6 +26,11 @@ select * from card;
> 4 null > 4 null
> rows: 3 > rows: 3
@reconnect
select suit from card where rank = 0;
>> clubs
alter table card alter column suit enum('a', 'b', 'c', 'd'); alter table card alter column suit enum('a', 'b', 'c', 'd');
> exception ENUM_VALUE_NOT_PERMITTED > exception ENUM_VALUE_NOT_PERMITTED
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论