Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
b9374c48
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b9374c48
编写于
10月 26, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
10月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix normal parser's prase mode not same as fast parser's parse mode
上级
0c58b8e2
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
423 addition
and
1289 deletion
+423
-1289
src/sql/parser/ob_parser.cpp
src/sql/parser/ob_parser.cpp
+5
-1
src/sql/parser/sql_parser_base.c
src/sql/parser/sql_parser_base.c
+1
-1
unittest/sql/parser/print_parser_tree.result
unittest/sql/parser/print_parser_tree.result
+163
-290
unittest/sql/parser/test_parser.result
unittest/sql/parser/test_parser.result
+243
-986
unittest/sql/parser/test_parser.test
unittest/sql/parser/test_parser.test
+11
-11
未找到文件。
src/sql/parser/ob_parser.cpp
浏览文件 @
b9374c48
...
...
@@ -984,7 +984,11 @@ int ObParser::parse(const ObString &query,
parse_result
.
is_not_utf8_connection_
=
ObCharset
::
is_valid_collation
(
connection_collation_
)
?
(
ObCharset
::
charset_type_by_coll
(
connection_collation_
)
!=
CHARSET_UTF8MB4
)
:
false
;
parse_result
.
malloc_pool_
=
allocator_
;
parse_result
.
sql_mode_
=
sql_mode_
;
if
(
lib
::
is_oracle_mode
())
{
parse_result
.
sql_mode_
=
sql_mode_
|
SMO_ORACLE
;
}
else
{
parse_result
.
sql_mode_
=
sql_mode_
&
(
~
SMO_ORACLE
);
}
parse_result
.
need_parameterize_
=
(
FP_MODE
==
parse_mode
||
FP_PARAMERIZE_AND_FILTER_HINT_MODE
==
parse_mode
);
parse_result
.
minus_ctx_
.
pos_
=
-
1
;
...
...
src/sql/parser/sql_parser_base.c
浏览文件 @
b9374c48
...
...
@@ -310,4 +310,4 @@ int add_alias_name(ParseNode *node, ParseResult *result, int end)
}
}
return
ret
;
}
\ No newline at end of file
}
unittest/sql/parser/print_parser_tree.result
浏览文件 @
b9374c48
此差异已折叠。
点击以展开。
unittest/sql/parser/test_parser.result
浏览文件 @
b9374c48
此差异已折叠。
点击以展开。
unittest/sql/parser/test_parser.test
浏览文件 @
b9374c48
...
...
@@ -20,11 +20,11 @@ commit;
commit
/*hint+commit*/
;
commit
work
;
commit
/*hint+commit work*/
work
;
--
sql_mode
oracle
commit
comment
'comment transaction commit'
;
commit
work
comment
'comment txn commit work'
;
commit
/*hint+commit tx hint*/
comment
'comment + hint'
;
commit
/*hint+commit tx work hint*/
work
comment
'comment + hint'
;
#
--sql_mode oracle
#
commit comment 'comment transaction commit';
#
commit work comment 'comment txn commit work';
#
commit/*hint+commit tx hint*/ comment 'comment + hint';
#
commit/*hint+commit tx work hint*/ work comment 'comment + hint';
--
sql_mode
mysql
rollback
;
rollback
/*hint+rollback*/
;
...
...
@@ -289,12 +289,12 @@ select unique distinct( max(c1)), c2 from t1;
select
unique
(
*
)
from
t1
;
########################## test for returning ###################################
--
sql_mode
oracle
delete
from
t1
where
c1
=
1
returning
c1
+
1
,
c2
*
2
;
update
t1
set
c1
=
1
where
c2
=
2
returning
c1
,
c2
+
3
,
c3
*
c4
;
insert
into
t1
values
(
1
,
2
,
3
)
returning
c1
,
c2
,
c3
;
--
error
5001
replace
into
t1
values
(
1
,
2
)
returning
c1
,
c2
,
c3
,
c4
,
c5
,
c6
;
#
--sql_mode oracle
#
delete from t1 where c1 = 1 returning c1 + 1, c2 * 2;
#
update t1 set c1 = 1 where c2 = 2 returning c1, c2 + 3, c3 * c4;
#
insert into t1 values(1, 2, 3) returning c1, c2, c3;
#
--error 5001
#
replace into t1 values(1, 2) returning c1, c2, c3, c4, c5, c6;
############# tablegroup ##################
--
sql_mode
mysql
alter
tablegroup
tg2
add
table
t1
,
t2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录