Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
2c153446
提交
2c153446
authored
12月 23, 2016
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some info when we throw internal error
no reason to be parsimonious here, can only help
上级
e539889c
隐藏空白字符变更
内嵌
并排
正在显示
50 个修改的文件
包含
67 行增加
和
78 行删除
+67
-78
ConstraintCheck.java
h2/src/main/org/h2/constraint/ConstraintCheck.java
+1
-2
ConstraintReferential.java
h2/src/main/org/h2/constraint/ConstraintReferential.java
+1
-2
Comment.java
h2/src/main/org/h2/engine/Comment.java
+1
-1
Database.java
h2/src/main/org/h2/engine/Database.java
+4
-4
FunctionAlias.java
h2/src/main/org/h2/engine/FunctionAlias.java
+1
-2
Role.java
h2/src/main/org/h2/engine/Role.java
+1
-1
Session.java
h2/src/main/org/h2/engine/Session.java
+3
-3
Setting.java
h2/src/main/org/h2/engine/Setting.java
+1
-1
User.java
h2/src/main/org/h2/engine/User.java
+1
-1
UserAggregate.java
h2/src/main/org/h2/engine/UserAggregate.java
+1
-2
UserDataType.java
h2/src/main/org/h2/engine/UserDataType.java
+1
-1
CompareLike.java
h2/src/main/org/h2/expression/CompareLike.java
+1
-1
Comparison.java
h2/src/main/org/h2/expression/Comparison.java
+1
-1
ConditionAndOr.java
h2/src/main/org/h2/expression/ConditionAndOr.java
+1
-1
Wildcard.java
h2/src/main/org/h2/expression/Wildcard.java
+9
-9
BaseIndex.java
h2/src/main/org/h2/index/BaseIndex.java
+1
-1
FunctionCursor.java
h2/src/main/org/h2/index/FunctionCursor.java
+1
-1
FunctionCursorResultSet.java
h2/src/main/org/h2/index/FunctionCursorResultSet.java
+1
-1
HashIndex.java
h2/src/main/org/h2/index/HashIndex.java
+1
-1
IndexCursor.java
h2/src/main/org/h2/index/IndexCursor.java
+1
-1
LinkedCursor.java
h2/src/main/org/h2/index/LinkedCursor.java
+1
-2
MetaCursor.java
h2/src/main/org/h2/index/MetaCursor.java
+1
-1
MultiVersionIndex.java
h2/src/main/org/h2/index/MultiVersionIndex.java
+1
-1
NonUniqueHashIndex.java
h2/src/main/org/h2/index/NonUniqueHashIndex.java
+1
-1
PageBtreeLeaf.java
h2/src/main/org/h2/index/PageBtreeLeaf.java
+1
-2
PageBtreeNode.java
h2/src/main/org/h2/index/PageBtreeNode.java
+2
-2
PageDataCursor.java
h2/src/main/org/h2/index/PageDataCursor.java
+1
-1
PageDataIndex.java
h2/src/main/org/h2/index/PageDataIndex.java
+1
-1
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+2
-3
PageDataNode.java
h2/src/main/org/h2/index/PageDataNode.java
+2
-2
PageDelegateIndex.java
h2/src/main/org/h2/index/PageDelegateIndex.java
+1
-1
RangeCursor.java
h2/src/main/org/h2/index/RangeCursor.java
+1
-1
ScanCursor.java
h2/src/main/org/h2/index/ScanCursor.java
+1
-1
SingleRowCursor.java
h2/src/main/org/h2/index/SingleRowCursor.java
+1
-1
SpatialTreeIndex.java
h2/src/main/org/h2/index/SpatialTreeIndex.java
+1
-1
TreeIndex.java
h2/src/main/org/h2/index/TreeIndex.java
+1
-1
ViewCursor.java
h2/src/main/org/h2/index/ViewCursor.java
+1
-1
Constant.java
h2/src/main/org/h2/schema/Constant.java
+1
-1
Schema.java
h2/src/main/org/h2/schema/Schema.java
+1
-1
Sequence.java
h2/src/main/org/h2/schema/Sequence.java
+1
-2
FileStore.java
h2/src/main/org/h2/store/FileStore.java
+1
-2
LobStorageBackend.java
h2/src/main/org/h2/store/LobStorageBackend.java
+2
-3
FunctionTable.java
h2/src/main/org/h2/table/FunctionTable.java
+1
-1
MetaTable.java
h2/src/main/org/h2/table/MetaTable.java
+1
-1
RangeTable.java
h2/src/main/org/h2/table/RangeTable.java
+1
-1
Table.java
h2/src/main/org/h2/table/Table.java
+1
-1
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+1
-2
TableView.java
h2/src/main/org/h2/table/TableView.java
+1
-1
LazyFuture.java
h2/src/main/org/h2/util/LazyFuture.java
+1
-1
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+1
-1
没有找到文件。
h2/src/main/org/h2/constraint/ConstraintCheck.java
浏览文件 @
2c153446
...
...
@@ -7,7 +7,6 @@ package org.h2.constraint;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
...
...
@@ -115,7 +114,7 @@ public class ConstraintCheck extends Constraint {
@Override
public
void
setIndexOwner
(
Index
index
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/constraint/ConstraintReferential.java
浏览文件 @
2c153446
...
...
@@ -7,7 +7,6 @@ package org.h2.constraint;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
org.h2.api.ErrorCode
;
import
org.h2.command.Parser
;
import
org.h2.command.Prepared
;
...
...
@@ -626,7 +625,7 @@ public class ConstraintReferential extends Constraint {
}
else
if
(
this
.
refIndex
==
index
)
{
refIndexOwner
=
true
;
}
else
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
index
+
" "
+
toString
()
);
}
}
...
...
h2/src/main/org/h2/engine/Comment.java
浏览文件 @
2c153446
...
...
@@ -27,7 +27,7 @@ public class Comment extends DbObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
private
static
String
getTypeName
(
int
type
)
{
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
2c153446
...
...
@@ -1664,7 +1664,7 @@ public class Database implements DataHandler {
ArrayList
<
DbObject
>
list
=
obj
.
getChildren
();
Comment
comment
=
findComment
(
obj
);
if
(
comment
!=
null
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
comment
.
toString
()
);
}
updateMeta
(
session
,
obj
);
// remember that this scans only one level deep!
...
...
@@ -2575,7 +2575,7 @@ public class Database implements DataHandler {
long
now
=
System
.
currentTimeMillis
();
if
(
now
>
reconnectCheckNext
+
reconnectCheckDelay
)
{
if
(
SysProperties
.
CHECK
&&
checkpointAllowed
<
0
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
checkpointAllowed
);
}
synchronized
(
reconnectSync
)
{
if
(
checkpointAllowed
>
0
)
{
...
...
@@ -2645,7 +2645,7 @@ public class Database implements DataHandler {
if
(
reconnectModified
(
true
))
{
checkpointAllowed
++;
if
(
SysProperties
.
CHECK
&&
checkpointAllowed
>
20
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
""
+
checkpointAllowed
);
}
return
true
;
}
...
...
@@ -2667,7 +2667,7 @@ public class Database implements DataHandler {
checkpointAllowed
--;
}
if
(
SysProperties
.
CHECK
&&
checkpointAllowed
<
0
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
""
+
checkpointAllowed
);
}
}
...
...
h2/src/main/org/h2/engine/FunctionAlias.java
浏览文件 @
2c153446
...
...
@@ -12,7 +12,6 @@ import java.lang.reflect.Modifier;
import
java.sql.Connection
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
org.h2.Driver
;
import
org.h2.api.ErrorCode
;
import
org.h2.command.Parser
;
...
...
@@ -196,7 +195,7 @@ public class FunctionAlias extends SchemaObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/engine/Role.java
浏览文件 @
2c153446
...
...
@@ -23,7 +23,7 @@ public class Role extends RightOwner {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
2c153446
...
...
@@ -840,7 +840,7 @@ public class Session extends SessionWithState {
public
void
addLock
(
Table
table
)
{
if
(
SysProperties
.
CHECK
)
{
if
(
locks
.
contains
(
table
))
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
table
.
toString
()
);
}
}
locks
.
add
(
table
);
...
...
@@ -869,7 +869,7 @@ public class Session extends SessionWithState {
if
(
locks
.
indexOf
(
log
.
getTable
())
<
0
&&
TableType
.
TABLE_LINK
!=
tableType
&&
TableType
.
EXTERNAL_TABLE_ENGINE
!=
tableType
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
tableType
);
}
}
}
...
...
@@ -1271,7 +1271,7 @@ public class Session extends SessionWithState {
*/
public
void
removeAtCommit
(
Value
v
)
{
if
(
SysProperties
.
CHECK
&&
!
v
.
isLinkedToTable
())
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
v
.
toString
()
);
}
if
(
removeLobMap
==
null
)
{
removeLobMap
=
New
.
hashMap
();
...
...
h2/src/main/org/h2/engine/Setting.java
浏览文件 @
2c153446
...
...
@@ -39,7 +39,7 @@ public class Setting extends DbObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/engine/User.java
浏览文件 @
2c153446
...
...
@@ -76,7 +76,7 @@ public class User extends RightOwner {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/engine/UserAggregate.java
浏览文件 @
2c153446
...
...
@@ -7,7 +7,6 @@ package org.h2.engine;
import
java.sql.Connection
;
import
java.sql.SQLException
;
import
org.h2.api.Aggregate
;
import
org.h2.api.AggregateFunction
;
import
org.h2.command.Parser
;
...
...
@@ -55,7 +54,7 @@ public class UserAggregate extends DbObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/engine/UserDataType.java
浏览文件 @
2c153446
...
...
@@ -23,7 +23,7 @@ public class UserDataType extends DbObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/expression/CompareLike.java
浏览文件 @
2c153446
...
...
@@ -329,7 +329,7 @@ public class CompareLike extends Condition {
}
return
false
;
default
:
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
types
[
pi
]
);
}
}
return
si
==
sLen
;
...
...
h2/src/main/org/h2/expression/Comparison.java
浏览文件 @
2c153446
...
...
@@ -206,7 +206,7 @@ public class Comparison extends Condition {
}
}
else
{
if
(
SysProperties
.
CHECK
&&
(
left
==
null
||
right
==
null
))
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
left
+
" "
+
right
);
}
if
(
left
==
ValueExpression
.
getNull
()
||
right
==
ValueExpression
.
getNull
())
{
...
...
h2/src/main/org/h2/expression/ConditionAndOr.java
浏览文件 @
2c153446
...
...
@@ -37,7 +37,7 @@ public class ConditionAndOr extends Condition {
this
.
left
=
left
;
this
.
right
=
right
;
if
(
SysProperties
.
CHECK
&&
(
left
==
null
||
right
==
null
))
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
left
+
" "
+
right
);
}
}
...
...
h2/src/main/org/h2/expression/Wildcard.java
浏览文件 @
2c153446
...
...
@@ -34,12 +34,12 @@ public class Wildcard extends Expression {
@Override
public
Value
getValue
(
Session
session
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
public
int
getType
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
@@ -54,22 +54,22 @@ public class Wildcard extends Expression {
@Override
public
void
setEvaluatable
(
TableFilter
tableFilter
,
boolean
b
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
toString
()
);
}
@Override
public
int
getScale
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
public
long
getPrecision
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
public
int
getDisplaySize
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
@@ -92,7 +92,7 @@ public class Wildcard extends Expression {
@Override
public
void
updateAggregate
(
Session
session
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
@@ -100,12 +100,12 @@ public class Wildcard extends Expression {
if
(
visitor
.
getType
()
==
ExpressionVisitor
.
QUERY_COMPARABLE
)
{
return
true
;
}
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
""
+
visitor
.
getType
()
);
}
@Override
public
int
getCost
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/BaseIndex.java
浏览文件 @
2c153446
...
...
@@ -141,7 +141,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
*/
@Override
public
Cursor
findNext
(
Session
session
,
SearchRow
higherThan
,
SearchRow
last
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
/**
...
...
h2/src/main/org/h2/index/FunctionCursor.java
浏览文件 @
2c153446
...
...
@@ -56,7 +56,7 @@ public class FunctionCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/FunctionCursorResultSet.java
浏览文件 @
2c153446
...
...
@@ -74,7 +74,7 @@ public class FunctionCursorResultSet implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
\ No newline at end of file
h2/src/main/org/h2/index/HashIndex.java
浏览文件 @
2c153446
...
...
@@ -68,7 +68,7 @@ public class HashIndex extends BaseIndex {
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
if
(
first
==
null
||
last
==
null
)
{
// TODO hash index: should additionally check if values are the same
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
first
+
" "
+
last
);
}
Value
v
=
first
.
getValue
(
indexColumn
);
/*
...
...
h2/src/main/org/h2/index/IndexCursor.java
浏览文件 @
2c153446
...
...
@@ -347,7 +347,7 @@ public class IndexCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/LinkedCursor.java
浏览文件 @
2c153446
...
...
@@ -8,7 +8,6 @@ package org.h2.index;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
org.h2.engine.Session
;
import
org.h2.message.DbException
;
import
org.h2.result.Row
;
...
...
@@ -73,7 +72,7 @@ public class LinkedCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/MetaCursor.java
浏览文件 @
2c153446
...
...
@@ -42,7 +42,7 @@ public class MetaCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/MultiVersionIndex.java
浏览文件 @
2c153446
...
...
@@ -93,7 +93,7 @@ public class MultiVersionIndex implements Index {
@Override
public
Cursor
findNext
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/index/NonUniqueHashIndex.java
浏览文件 @
2c153446
...
...
@@ -86,7 +86,7 @@ public class NonUniqueHashIndex extends BaseIndex {
@Override
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
if
(
first
==
null
||
last
==
null
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
first
+
" "
+
last
);
}
if
(
first
!=
last
)
{
if
(
compareKeys
(
first
,
last
)
!=
0
)
{
...
...
h2/src/main/org/h2/index/PageBtreeLeaf.java
浏览文件 @
2c153446
...
...
@@ -6,7 +6,6 @@
package
org
.
h2
.
index
;
import
java.util.Arrays
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
...
...
@@ -178,7 +177,7 @@ public class PageBtreeLeaf extends PageBtree {
written
=
false
;
changeCount
=
index
.
getPageStore
().
getChangeCount
();
if
(
entryCount
<=
0
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
entryCount
);
}
int
startNext
=
at
>
0
?
offsets
[
at
-
1
]
:
index
.
getPageStore
().
getPageSize
();
int
rowLength
=
startNext
-
offsets
[
at
];
...
...
h2/src/main/org/h2/index/PageBtreeNode.java
浏览文件 @
2c153446
...
...
@@ -474,7 +474,7 @@ public class PageBtreeNode extends PageBtree {
written
=
false
;
changeCount
=
index
.
getPageStore
().
getChangeCount
();
if
(
entryCount
<
0
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
entryCount
);
}
if
(
entryCount
>
i
)
{
int
startNext
=
i
>
0
?
offsets
[
i
-
1
]
:
index
.
getPageStore
().
getPageSize
();
...
...
@@ -604,7 +604,7 @@ public class PageBtreeNode extends PageBtree {
return
;
}
}
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
oldPos
+
" "
+
newPos
);
}
}
\ No newline at end of file
h2/src/main/org/h2/index/PageDataCursor.java
浏览文件 @
2c153446
...
...
@@ -104,7 +104,7 @@ class PageDataCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/PageDataIndex.java
浏览文件 @
2c153446
...
...
@@ -300,7 +300,7 @@ public class PageDataIndex extends PageIndex {
@Override
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
long
getLastKey
()
{
...
...
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
2c153446
...
...
@@ -7,7 +7,6 @@ package org.h2.index;
import
java.lang.ref.SoftReference
;
import
java.util.Arrays
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
...
...
@@ -221,7 +220,7 @@ public class PageDataLeaf extends PageData {
if
(
offset
<
start
)
{
writtenData
=
false
;
if
(
entryCount
>
1
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
entryCount
);
}
// need to write the overflow page id
start
+=
4
;
...
...
@@ -284,7 +283,7 @@ public class PageDataLeaf extends PageData {
}
entryCount
--;
if
(
entryCount
<
0
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
entryCount
);
}
if
(
firstOverflowPageId
!=
0
)
{
start
-=
4
;
...
...
h2/src/main/org/h2/index/PageDataNode.java
浏览文件 @
2c153446
...
...
@@ -388,7 +388,7 @@ public class PageDataNode extends PageData {
entryCount
--;
length
-=
4
+
Data
.
getVarLongLen
(
keys
[
removedKeyIndex
]);
if
(
entryCount
<
0
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
""
+
entryCount
);
}
keys
=
remove
(
keys
,
entryCount
+
1
,
removedKeyIndex
);
childPageIds
=
remove
(
childPageIds
,
entryCount
+
2
,
i
);
...
...
@@ -453,7 +453,7 @@ public class PageDataNode extends PageData {
return
;
}
}
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
oldPos
+
" "
+
newPos
);
}
}
h2/src/main/org/h2/index/PageDelegateIndex.java
浏览文件 @
2c153446
...
...
@@ -85,7 +85,7 @@ public class PageDelegateIndex extends PageIndex {
@Override
public
Cursor
findNext
(
Session
session
,
SearchRow
higherThan
,
SearchRow
last
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/index/RangeCursor.java
浏览文件 @
2c153446
...
...
@@ -59,7 +59,7 @@ class RangeCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/ScanCursor.java
浏览文件 @
2c153446
...
...
@@ -72,7 +72,7 @@ public class ScanCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/SingleRowCursor.java
浏览文件 @
2c153446
...
...
@@ -47,7 +47,7 @@ public class SingleRowCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/index/SpatialTreeIndex.java
浏览文件 @
2c153446
...
...
@@ -237,7 +237,7 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
@Override
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
{
if
(
closed
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
if
(!
first
)
{
throw
DbException
.
throwInternalError
(
...
...
h2/src/main/org/h2/index/TreeIndex.java
浏览文件 @
2c153446
...
...
@@ -355,7 +355,7 @@ public class TreeIndex extends BaseIndex {
@Override
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
{
if
(
closed
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
if
(
first
)
{
// TODO optimization: this loops through NULL
...
...
h2/src/main/org/h2/index/ViewCursor.java
浏览文件 @
2c153446
...
...
@@ -81,7 +81,7 @@ public class ViewCursor implements Cursor {
@Override
public
boolean
previous
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
}
h2/src/main/org/h2/schema/Constant.java
浏览文件 @
2c153446
...
...
@@ -28,7 +28,7 @@ public class Constant extends SchemaObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
2c153446
...
...
@@ -88,7 +88,7 @@ public class Schema extends DbObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/schema/Sequence.java
浏览文件 @
2c153446
...
...
@@ -6,7 +6,6 @@
package
org
.
h2
.
schema
;
import
java.math.BigInteger
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.DbObject
;
import
org.h2.engine.Session
;
...
...
@@ -208,7 +207,7 @@ public class Sequence extends SchemaObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/store/FileStore.java
浏览文件 @
2c153446
...
...
@@ -10,7 +10,6 @@ import java.lang.ref.Reference;
import
java.nio.ByteBuffer
;
import
java.nio.channels.FileChannel
;
import
java.util.Arrays
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.SysProperties
;
...
...
@@ -400,7 +399,7 @@ public class FileStore {
if
(
SysProperties
.
CHECK2
)
{
try
{
if
(
file
.
position
()
!=
filePos
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
file
.
position
()
+
" "
+
filePos
);
}
}
catch
(
IOException
e
)
{
throw
DbException
.
convertIOException
(
e
,
name
);
...
...
h2/src/main/org/h2/store/LobStorageBackend.java
浏览文件 @
2c153446
...
...
@@ -15,7 +15,6 @@ import java.sql.Statement;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Database
;
import
org.h2.engine.SysProperties
;
...
...
@@ -614,7 +613,7 @@ public class LobStorageBackend implements LobStorageInterface {
private
static
void
assertNotHolds
(
Object
lock
)
{
if
(
Thread
.
holdsLock
(
lock
))
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
lock
.
toString
()
);
}
}
...
...
@@ -625,7 +624,7 @@ public class LobStorageBackend implements LobStorageInterface {
*/
static
void
assertHoldsLock
(
Object
lock
)
{
if
(!
Thread
.
holdsLock
(
lock
))
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
lock
.
toString
()
);
}
}
...
...
h2/src/main/org/h2/table/FunctionTable.java
浏览文件 @
2c153446
...
...
@@ -125,7 +125,7 @@ public class FunctionTable extends Table {
@Override
public
boolean
canDrop
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/table/MetaTable.java
浏览文件 @
2c153446
...
...
@@ -2000,7 +2000,7 @@ public class MetaTable extends Table {
@Override
public
long
getRowCount
(
Session
session
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/table/RangeTable.java
浏览文件 @
2c153446
...
...
@@ -144,7 +144,7 @@ public class RangeTable extends Table {
@Override
public
TableType
getTableType
()
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
2c153446
...
...
@@ -318,7 +318,7 @@ public abstract class Table extends SchemaObjectBase {
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
/**
...
...
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
2c153446
...
...
@@ -7,7 +7,6 @@ package org.h2.table;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
org.h2.api.ErrorCode
;
import
org.h2.command.Parser
;
import
org.h2.command.dml.Select
;
...
...
@@ -835,7 +834,7 @@ public class TableFilter implements ColumnResolver {
IndexLookupBatch
lookupBatch
=
joinBatch
.
getLookupBatch
(
joinFilterId
);
if
(
lookupBatch
==
null
)
{
if
(
joinFilterId
!=
0
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
""
+
joinFilterId
);
}
}
else
{
planBuff
.
append
(
"batched:"
);
...
...
h2/src/main/org/h2/table/TableView.java
浏览文件 @
2c153446
...
...
@@ -389,7 +389,7 @@ public class TableView extends Table {
@Override
public
long
getRowCount
(
Session
session
)
{
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
toString
()
);
}
@Override
...
...
h2/src/main/org/h2/util/LazyFuture.java
浏览文件 @
2c153446
...
...
@@ -84,7 +84,7 @@ public abstract class LazyFuture<T> implements Future<T> {
case
S_CANCELED:
throw
new
CancellationException
();
default
:
throw
DbException
.
throwInternalError
();
throw
DbException
.
throwInternalError
(
""
+
state
);
}
}
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
2c153446
...
...
@@ -723,7 +723,7 @@ public class ValueLob extends Value {
}
Value
v2
=
copy
(
h
,
tabId
);
if
(
SysProperties
.
CHECK
&&
v2
!=
this
)
{
DbException
.
throwInternalError
();
DbException
.
throwInternalError
(
v2
.
toString
()
);
}
}
}
catch
(
IOException
e
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论