Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
72f706f5
提交
72f706f5
authored
8 年前
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#429: Tables not found : Fix some turkish locale bugs around uppercasing
上级
790cf87b
master
noel-pr1
stumc-Issue#576
version-1.4.198
version-1.4.197
version-1.4.196
version-1.4.195
version-1.4.194
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
19 行增加
和
11 行删除
+19
-11
changelog.html
h2/src/docsrc/html/changelog.html
+2
-0
Schema.java
h2/src/main/org/h2/schema/Schema.java
+2
-1
Column.java
h2/src/main/org/h2/table/Column.java
+1
-1
Csv.java
h2/src/main/org/h2/tools/Csv.java
+1
-2
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+5
-6
TestCompatibilityOracle.java
h2/src/test/org/h2/test/db/TestCompatibilityOracle.java
+4
-0
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+4
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
72f706f5
...
...
@@ -21,6 +21,8 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<ul>
<li>
#429: Tables not found : Fix some turkish locale bugs around uppercasing
</li>
<li>
Fixed bug in metadata locking, obscure combination of DDL and SELECT SEQUENCE.NEXTVAL required
</li>
<li>
Added index hints: SELECT * FROM TEST USE INDEX (idx1, idx2)
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
72f706f5
...
...
@@ -28,6 +28,7 @@ import org.h2.table.RegularTable;
import
org.h2.table.Table
;
import
org.h2.table.TableLink
;
import
org.h2.util.New
;
import
org.h2.util.StringUtils
;
/**
* A schema as created by the SQL statement
...
...
@@ -359,7 +360,7 @@ public class Schema extends DbObjectBase {
private
String
getUniqueName
(
DbObject
obj
,
Map
<
String
,
?
extends
SchemaObject
>
map
,
String
prefix
)
{
String
hash
=
Integer
.
toHexString
(
obj
.
getName
().
hashCode
()).
toUpperCase
(
);
String
hash
=
StringUtils
.
toUpperEnglish
(
Integer
.
toHexString
(
obj
.
getName
().
hashCode
())
);
String
name
=
null
;
synchronized
(
temporaryUniqueNames
)
{
for
(
int
i
=
1
,
len
=
hash
.
length
();
i
<
len
;
i
++)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/table/Column.java
浏览文件 @
72f706f5
...
...
@@ -383,7 +383,7 @@ public class Column {
while
(
true
)
{
ValueUuid
uuid
=
ValueUuid
.
getNewRandom
();
String
s
=
uuid
.
getString
();
s
=
s
.
replace
(
'-'
,
'_'
).
toUpperCase
(
);
s
=
StringUtils
.
toUpperEnglish
(
s
.
replace
(
'-'
,
'_'
)
);
sequenceName
=
"SYSTEM_SEQUENCE_"
+
s
;
if
(
schema
.
findSequence
(
sequenceName
)
==
null
)
{
break
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/tools/Csv.java
浏览文件 @
72f706f5
...
...
@@ -23,7 +23,6 @@ import java.sql.SQLException;
import
java.sql.Statement
;
import
java.sql.Types
;
import
java.util.ArrayList
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.SysProperties
;
...
...
@@ -354,7 +353,7 @@ public class Csv implements SimpleRowSource {
if
(
v
.
length
()
==
0
)
{
v
=
"COLUMN"
+
list
.
size
();
}
else
if
(!
caseSensitiveColumnNames
&&
isSimpleColumnName
(
v
))
{
v
=
v
.
toUpperCase
(
);
v
=
StringUtils
.
toUpperEnglish
(
v
);
}
list
.
add
(
v
);
if
(
endOfLine
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
72f706f5
...
...
@@ -17,7 +17,6 @@ import java.util.Currency;
import
java.util.GregorianCalendar
;
import
java.util.Locale
;
import
java.util.TimeZone
;
import
org.h2.api.ErrorCode
;
import
org.h2.message.DbException
;
...
...
@@ -126,7 +125,7 @@ public class ToChar {
String
nlsParam
)
{
// short-circuit logic for formats that don't follow common logic below
String
formatUp
=
format
!=
null
?
format
.
toUpperCase
(
)
:
null
;
String
formatUp
=
format
!=
null
?
StringUtils
.
toUpperEnglish
(
format
)
:
null
;
if
(
formatUp
==
null
||
formatUp
.
equals
(
"TM"
)
||
formatUp
.
equals
(
"TM9"
))
{
String
s
=
number
.
toPlainString
();
return
s
.
startsWith
(
"0."
)
?
s
.
substring
(
1
)
:
s
;
...
...
@@ -428,7 +427,7 @@ public class ToChar {
private
static
String
toHex
(
BigDecimal
number
,
String
format
)
{
boolean
fillMode
=
!
format
.
toUpperCase
(
).
startsWith
(
"FM"
);
boolean
fillMode
=
!
StringUtils
.
toUpperEnglish
(
format
).
startsWith
(
"FM"
);
boolean
uppercase
=
!
format
.
contains
(
"x"
);
boolean
zeroPadded
=
format
.
startsWith
(
"0"
);
int
digits
=
0
;
...
...
@@ -445,7 +444,7 @@ public class ToChar {
hex
=
StringUtils
.
pad
(
""
,
digits
+
1
,
"#"
,
true
);
}
else
{
if
(
uppercase
)
{
hex
=
hex
.
toUpperCase
(
);
hex
=
StringUtils
.
toUpperEnglish
(
hex
);
}
if
(
zeroPadded
)
{
hex
=
StringUtils
.
pad
(
hex
,
digits
,
"0"
,
false
);
...
...
@@ -654,7 +653,7 @@ public class ToChar {
cal
.
get
(
Calendar
.
DAY_OF_MONTH
)));
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DY"
))
!=
null
)
{
String
day
=
new
SimpleDateFormat
(
"EEE"
).
format
(
ts
).
toUpperCase
(
);
String
day
=
StringUtils
.
toUpperEnglish
(
new
SimpleDateFormat
(
"EEE"
).
format
(
ts
)
);
output
.
append
(
cap
.
apply
(
day
));
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DAY"
))
!=
null
)
{
...
...
@@ -936,7 +935,7 @@ public class ToChar {
}
switch
(
this
)
{
case
UPPERCASE:
return
s
.
toUpperCase
(
);
return
StringUtils
.
toUpperEnglish
(
s
);
case
LOWERCASE:
return
s
.
toLowerCase
();
case
CAPITALIZE:
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestCompatibilityOracle.java
浏览文件 @
72f706f5
...
...
@@ -13,6 +13,7 @@ import java.sql.Statement;
import
java.sql.Types
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Locale
;
import
org.h2.test.TestBase
;
import
org.h2.tools.SimpleResultSet
;
...
...
@@ -144,6 +145,9 @@ public class TestCompatibilityOracle extends TestBase {
}
private
void
testToDate
()
throws
SQLException
{
if
(
Locale
.
getDefault
()
!=
Locale
.
ENGLISH
)
{
return
;
}
deleteDb
(
"oracle"
);
Connection
conn
=
getConnection
(
"oracle;MODE=Oracle"
);
Statement
stat
=
conn
.
createStatement
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
72f706f5
...
...
@@ -1300,6 +1300,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
private
void
testToDate
()
throws
ParseException
{
if
(
Locale
.
getDefault
()
!=
Locale
.
ENGLISH
)
{
return
;
}
final
int
month
=
Calendar
.
getInstance
().
get
(
Calendar
.
MONTH
);
...
...
@@ -1543,7 +1546,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
expected
=
expected
.
substring
(
0
,
1
).
toUpperCase
()
+
expected
.
substring
(
1
);
String
spaces
=
" "
;
String
first9
=
(
expected
+
spaces
).
substring
(
0
,
9
);
assertResult
(
first9
.
toUpperCase
(
),
assertResult
(
StringUtils
.
toUpperEnglish
(
first9
),
stat
,
"SELECT TO_CHAR(X, 'DAY') FROM T"
);
assertResult
(
first9
,
stat
,
"SELECT TO_CHAR(X, 'Day') FROM T"
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论