Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
64a622bf
提交
64a622bf
authored
6月 28, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
baf60c6e
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
34 行增加
和
34 行删除
+34
-34
Command.java
h2/src/main/org/h2/command/Command.java
+3
-3
Parser.java
h2/src/main/org/h2/command/Parser.java
+8
-8
Select.java
h2/src/main/org/h2/command/dml/Select.java
+6
-6
JdbcSQLException.java
h2/src/main/org/h2/jdbc/JdbcSQLException.java
+7
-7
Schema.java
h2/src/main/org/h2/schema/Schema.java
+5
-5
LogFile.java
h2/src/main/org/h2/store/LogFile.java
+1
-1
LogSystem.java
h2/src/main/org/h2/store/LogSystem.java
+1
-1
ClassUtils.java
h2/src/main/org/h2/util/ClassUtils.java
+1
-1
ShowProgress.java
h2/src/test/org/h2/samples/ShowProgress.java
+1
-1
TestHaltApp.java
h2/src/test/org/h2/test/synth/TestHaltApp.java
+1
-1
没有找到文件。
h2/src/main/org/h2/command/Command.java
浏览文件 @
64a622bf
...
@@ -123,8 +123,8 @@ public abstract class Command implements CommandInterface {
...
@@ -123,8 +123,8 @@ public abstract class Command implements CommandInterface {
public
void
cancel
()
{
public
void
cancel
()
{
this
.
cancel
=
true
;
this
.
cancel
=
true
;
}
}
public
String
getSQL
()
{
public
String
getSQL
()
{
return
null
;
return
null
;
}
}
}
}
h2/src/main/org/h2/command/Parser.java
浏览文件 @
64a622bf
...
@@ -744,16 +744,16 @@ public class Parser {
...
@@ -744,16 +744,16 @@ public class Parser {
String
querySQL
=
query
.
getSQL
();
String
querySQL
=
query
.
getSQL
();
Session
s
;
Session
s
;
if
(
prepared
!=
null
&&
prepared
instanceof
CreateView
)
{
if
(
prepared
!=
null
&&
prepared
instanceof
CreateView
)
{
s
=
database
.
getSystemSession
();
s
=
database
.
getSystemSession
();
}
else
{
}
else
{
s
=
session
;
s
=
session
;
}
}
String
tempViewName
=
s
.
getNextTempViewName
();
String
tempViewName
=
s
.
getNextTempViewName
();
table
=
new
TableView
(
mainSchema
,
0
,
tempViewName
,
querySQL
,
query
.
getParameters
(),
null
,
s
,
false
);
table
=
new
TableView
(
mainSchema
,
0
,
tempViewName
,
querySQL
,
query
.
getParameters
(),
null
,
s
,
false
);
if
(
s
!=
database
.
getSystemSession
())
{
if
(
s
!=
database
.
getSystemSession
())
{
table
.
setOnCommitDrop
(
true
);
table
.
setOnCommitDrop
(
true
);
}
}
s
.
addLocalTempTable
(
table
);
s
.
addLocalTempTable
(
table
);
read
(
")"
);
read
(
")"
);
}
else
{
}
else
{
TableFilter
top
=
readTableFilter
(
fromOuter
);
TableFilter
top
=
readTableFilter
(
fromOuter
);
...
@@ -2062,8 +2062,8 @@ public class Parser {
...
@@ -2062,8 +2062,8 @@ public class Parser {
read
();
read
();
}
}
if
(
"."
.
equals
(
currentToken
)
&&
schemaName
.
equals
(
database
.
getShortName
()))
{
if
(
"."
.
equals
(
currentToken
)
&&
schemaName
.
equals
(
database
.
getShortName
()))
{
read
(
"."
);
read
(
"."
);
schemaName
=
s
;
schemaName
=
s
;
if
(
currentTokenType
!=
IDENTIFIER
)
{
if
(
currentTokenType
!=
IDENTIFIER
)
{
throw
Message
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
"identifier"
);
throw
Message
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
"identifier"
);
}
}
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
64a622bf
...
@@ -279,7 +279,7 @@ public class Select extends Query {
...
@@ -279,7 +279,7 @@ public class Select extends Query {
Expression
expr
=
(
Expression
)
expressions
.
get
(
i
);
Expression
expr
=
(
Expression
)
expressions
.
get
(
i
);
int
testing
;
int
testing
;
if
(
expr
==
null
)
{
if
(
expr
==
null
)
{
System
.
out
.
println
(
"stop"
);
System
.
out
.
println
(
"stop"
);
}
}
row
[
i
]
=
expr
.
getValue
(
session
);
row
[
i
]
=
expr
.
getValue
(
session
);
}
}
...
@@ -591,8 +591,8 @@ if(expr == null) {
...
@@ -591,8 +591,8 @@ if(expr == null) {
}
}
}
}
if
(
having
!=
null
)
{
if
(
having
!=
null
)
{
// could be set after addGlobalCondition
// could be set after addGlobalCondition
// in this case the query is not run directly, just getPlanSQL is called
// in this case the query is not run directly, just getPlanSQL is called
Expression
h
=
having
;
Expression
h
=
having
;
buff
.
append
(
"\nHAVING "
+
StringUtils
.
unEnclose
(
h
.
getSQL
()));
buff
.
append
(
"\nHAVING "
+
StringUtils
.
unEnclose
(
h
.
getSQL
()));
}
else
if
(
havingIndex
>=
0
)
{
}
else
if
(
havingIndex
>=
0
)
{
...
@@ -683,10 +683,10 @@ if(expr == null) {
...
@@ -683,10 +683,10 @@ if(expr == null) {
Expression
comp
=
new
Comparison
(
session
,
comparisonType
,
col
,
expr
);
Expression
comp
=
new
Comparison
(
session
,
comparisonType
,
col
,
expr
);
comp
=
comp
.
optimize
(
session
);
comp
=
comp
.
optimize
(
session
);
if
(
isGroupQuery
)
{
if
(
isGroupQuery
)
{
if
(
havingIndex
>=
0
)
{
if
(
havingIndex
>=
0
)
{
having
=
(
Expression
)
expressions
.
get
(
havingIndex
);
having
=
(
Expression
)
expressions
.
get
(
havingIndex
);
}
}
if
(
having
==
null
)
{
if
(
having
==
null
)
{
having
=
comp
;
having
=
comp
;
}
else
{
}
else
{
having
=
new
ConditionAndOr
(
ConditionAndOr
.
AND
,
having
,
comp
);
having
=
new
ConditionAndOr
(
ConditionAndOr
.
AND
,
having
,
comp
);
...
...
h2/src/main/org/h2/jdbc/JdbcSQLException.java
浏览文件 @
64a622bf
...
@@ -40,12 +40,12 @@ public class JdbcSQLException extends SQLException {
...
@@ -40,12 +40,12 @@ public class JdbcSQLException extends SQLException {
}
}
private
static
String
buildMessage
(
String
message
,
String
sql
,
String
state
)
{
private
static
String
buildMessage
(
String
message
,
String
sql
,
String
state
)
{
StringBuffer
buff
=
new
StringBuffer
(
message
);
StringBuffer
buff
=
new
StringBuffer
(
message
);
if
(
sql
!=
null
)
{
if
(
sql
!=
null
)
{
buff
.
append
(
"; SQL statement: "
);
buff
.
append
(
"; SQL statement: "
);
buff
.
append
(
sql
);
buff
.
append
(
sql
);
}
}
return
message
+
" ["
+
state
+
"-"
+
Constants
.
BUILD_ID
+
"]"
;
return
message
+
" ["
+
state
+
"-"
+
Constants
.
BUILD_ID
+
"]"
;
}
}
/**
/**
...
@@ -127,7 +127,7 @@ public class JdbcSQLException extends SQLException {
...
@@ -127,7 +127,7 @@ public class JdbcSQLException extends SQLException {
* @return the SQL statement
* @return the SQL statement
*/
*/
public
String
getSQL
()
{
public
String
getSQL
()
{
return
sql
;
return
sql
;
}
}
/**
/**
...
...
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
64a622bf
...
@@ -254,11 +254,11 @@ public class Schema extends DbObject {
...
@@ -254,11 +254,11 @@ public class Schema extends DbObject {
}
}
public
TableData
createTable
(
String
tempName
,
int
id
,
ObjectArray
newColumns
,
boolean
persistent
)
throws
SQLException
{
public
TableData
createTable
(
String
tempName
,
int
id
,
ObjectArray
newColumns
,
boolean
persistent
)
throws
SQLException
{
return
new
TableData
(
this
,
tempName
,
id
,
newColumns
,
persistent
);
return
new
TableData
(
this
,
tempName
,
id
,
newColumns
,
persistent
);
}
}
public
TableLink
createTableLink
(
int
id
,
String
tableName
,
String
driver
,
String
url
,
String
user
,
String
password
,
String
originalTable
,
boolean
emitUpdates
,
boolean
force
)
throws
SQLException
{
public
TableLink
createTableLink
(
int
id
,
String
tableName
,
String
driver
,
String
url
,
String
user
,
String
password
,
String
originalTable
,
boolean
emitUpdates
,
boolean
force
)
throws
SQLException
{
return
new
TableLink
(
this
,
id
,
tableName
,
driver
,
url
,
user
,
password
,
originalTable
,
emitUpdates
,
force
);
return
new
TableLink
(
this
,
id
,
tableName
,
driver
,
url
,
user
,
password
,
originalTable
,
emitUpdates
,
force
);
}
}
}
}
h2/src/main/org/h2/store/LogFile.java
浏览文件 @
64a622bf
...
@@ -83,7 +83,7 @@ public class LogFile {
...
@@ -83,7 +83,7 @@ public class LogFile {
}
}
String
s
=
fileName
.
substring
(
fileNamePrefix
.
length
()+
1
,
fileName
.
length
()-
Constants
.
SUFFIX_LOG_FILE
.
length
());
String
s
=
fileName
.
substring
(
fileNamePrefix
.
length
()+
1
,
fileName
.
length
()-
Constants
.
SUFFIX_LOG_FILE
.
length
());
int
id
=
Integer
.
parseInt
(
s
);
int
id
=
Integer
.
parseInt
(
s
);
return
new
LogFile
(
log
,
id
,
fileNamePrefix
);
return
new
LogFile
(
log
,
id
,
fileNamePrefix
);
}
}
public
String
getFileName
()
{
public
String
getFileName
()
{
...
...
h2/src/main/org/h2/store/LogSystem.java
浏览文件 @
64a622bf
...
@@ -220,7 +220,7 @@ public class LogSystem {
...
@@ -220,7 +220,7 @@ public class LogSystem {
String
s
=
list
[
i
];
String
s
=
list
[
i
];
LogFile
l
=
null
;
LogFile
l
=
null
;
try
{
try
{
l
=
LogFile
.
openIfLogFile
(
this
,
fileNamePrefix
,
s
);
l
=
LogFile
.
openIfLogFile
(
this
,
fileNamePrefix
,
s
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
database
.
getTrace
(
Trace
.
LOG
).
debug
(
"Error opening log file, header corrupt: "
+
s
,
e
);
database
.
getTrace
(
Trace
.
LOG
).
debug
(
"Error opening log file, header corrupt: "
+
s
,
e
);
// this can happen if the system crashes just after creating a new file (before writing the header)
// this can happen if the system crashes just after creating a new file (before writing the header)
...
...
h2/src/main/org/h2/util/ClassUtils.java
浏览文件 @
64a622bf
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
org
.
h2
.
util
;
package
org
.
h2
.
util
;
public
class
ClassUtils
{
public
class
ClassUtils
{
public
static
Class
loadClass
(
String
className
)
throws
ClassNotFoundException
{
public
static
Class
loadClass
(
String
className
)
throws
ClassNotFoundException
{
// TODO support special syntax to load classes using another classloader
// TODO support special syntax to load classes using another classloader
return
Class
.
forName
(
className
);
return
Class
.
forName
(
className
);
...
...
h2/src/test/org/h2/samples/ShowProgress.java
浏览文件 @
64a622bf
...
@@ -69,7 +69,7 @@ public class ShowProgress implements DatabaseEventListener {
...
@@ -69,7 +69,7 @@ public class ShowProgress implements DatabaseEventListener {
}
}
public
void
exceptionThrown
(
SQLException
e
,
String
sql
)
{
public
void
exceptionThrown
(
SQLException
e
,
String
sql
)
{
System
.
out
.
println
(
"Error executing "
+
sql
);
System
.
out
.
println
(
"Error executing "
+
sql
);
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
h2/src/test/org/h2/test/synth/TestHaltApp.java
浏览文件 @
64a622bf
...
@@ -40,7 +40,7 @@ public class TestHaltApp extends TestHalt {
...
@@ -40,7 +40,7 @@ public class TestHaltApp extends TestHalt {
protected
void
testWaitAfterAppStart
()
throws
Exception
{
protected
void
testWaitAfterAppStart
()
throws
Exception
{
int
sleep
=
10
+
random
.
nextInt
(
300
);
int
sleep
=
10
+
random
.
nextInt
(
300
);
if
((
flags
&
FLAG_NO_DELAY
)
==
0
)
{
if
((
flags
&
FLAG_NO_DELAY
)
==
0
)
{
sleep
+=
1000
;
sleep
+=
1000
;
}
}
Thread
.
sleep
(
sleep
);
Thread
.
sleep
(
sleep
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论