提交 d78bc2a3 authored 作者: Noel Grandin's avatar Noel Grandin

Fix bug in REGEX_REPLACE, not parsing the mode parameter

上级 29a989e2
......@@ -20,8 +20,12 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>ResultSet.getObject(..., Class) threw a ClassNotFoundException if the JTS suite was not in the classpath.
</li></ul>
<ul>
<li>Fix bug in REGEX_REPLACE, not parsing the mode parameter
</li>
<li>ResultSet.getObject(..., Class) threw a ClassNotFoundException if the JTS suite was not in the classpath.
</li>
</ul>
<h2>Version 1.4.193 Beta (2016-10-31)</h2>
<ul>
......
......@@ -1386,7 +1386,7 @@ public class Function extends Expression implements FunctionCall {
String regexp = v1.getString();
String replacement = v2.getString();
String regexpMode = v3 == null || v3.getString() == null ? "" :
v2.getString();
v3.getString();
int flags = makeRegexpFlags(regexpMode);
try {
result = ValueString.get(
......
......@@ -2126,6 +2126,12 @@ select x from dual where REGEXP_LIKE('A', '[a-z]', 'c');
> -
> rows: 0
select regexp_replace('Sylvain', 'S..', 'TOTO', 'mni') as X;
> X
> --------
> TOTOvain
> rows: 1
SELECT 'Hello' ~ 'He.*' T1, 'HELLO' ~ 'He.*' F2, CAST('HELLO' AS VARCHAR_IGNORECASE) ~ 'He.*' T3;
> T1 F2 T3
> ---- ----- ----
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论