fix normal parser's prase mode not same as fast parser's parse mode
This commit is contained in:
parent
0c58b8e263
commit
b9374c4887
@ -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;
|
||||
|
@ -310,4 +310,4 @@ int add_alias_name(ParseNode *node, ParseResult *result, int end)
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user