Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
29ae89fd
提交
29ae89fd
authored
11月 01, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prepare for version 1.3.x beta
上级
42b1c9b7
全部展开
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
9483 行增加
和
13 行删除
+9483
-13
AlterTableAlterColumn.java
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
+1
-1
RunScriptCommand.java
h2/src/main/org/h2/command/dml/RunScriptCommand.java
+2
-1
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+1
-1
TestCases.java
h2/src/test/org/h2/test/db/TestCases.java
+1
-1
TestOutOfMemory.java
h2/src/test/org/h2/test/db/TestOutOfMemory.java
+2
-2
TestViewAlterTable.java
h2/src/test/org/h2/test/db/TestViewAlterTable.java
+2
-2
TestViewDropView.java
h2/src/test/org/h2/test/db/TestViewDropView.java
+4
-4
test-1.3.txt
h2/src/test/org/h2/test/test-1.3.txt
+9469
-0
testSimple.in.txt
h2/src/test/org/h2/test/testSimple.in.txt
+1
-1
没有找到文件。
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
浏览文件 @
29ae89fd
...
...
@@ -180,7 +180,7 @@ public class AlterTableAlterColumn extends SchemaCommand {
throw
DbException
.
get
(
ErrorCode
.
VIEW_IS_INVALID_2
,
e
,
getSQL
(),
e
.
getMessage
());
}
String
tableName
=
table
.
getName
();
execute
(
"DROP TABLE "
+
table
.
getSQL
(),
true
);
execute
(
"DROP TABLE "
+
table
.
getSQL
()
+
" CASCADE"
,
true
);
db
.
renameSchemaObject
(
session
,
newTable
,
tableName
);
for
(
DbObject
child
:
newTable
.
getChildren
())
{
if
(
child
instanceof
Sequence
)
{
...
...
h2/src/main/org/h2/command/dml/RunScriptCommand.java
浏览文件 @
29ae89fd
...
...
@@ -12,6 +12,7 @@ import java.io.Reader;
import
org.h2.command.CommandInterface
;
import
org.h2.command.Prepared
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
import
org.h2.message.DbException
;
import
org.h2.result.ResultInterface
;
...
...
@@ -23,7 +24,7 @@ import org.h2.util.ScriptReader;
*/
public
class
RunScriptCommand
extends
ScriptBase
{
private
String
charset
=
SysProperties
.
FILE_ENCODING
;
private
String
charset
=
Constants
.
VERSION_MINOR
<
3
?
SysProperties
.
FILE_ENCODING
:
Constants
.
UTF8
;
public
RunScriptCommand
(
Session
session
)
{
super
(
session
);
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
29ae89fd
...
...
@@ -1162,7 +1162,7 @@ public abstract class TestBase {
* @throws AssertionError if the databases don't match
*/
protected
void
assertEqualDatabases
(
Statement
stat1
,
Statement
stat2
)
throws
SQLException
{
ResultSet
rs
=
stat1
.
executeQuery
(
"select value from information_schema.settings where name='
analyzeAuto
'"
);
ResultSet
rs
=
stat1
.
executeQuery
(
"select value from information_schema.settings where name='
ANALYZE_AUTO
'"
);
int
analyzeAuto
=
rs
.
next
()
?
rs
.
getInt
(
1
)
:
0
;
if
(
analyzeAuto
>
0
)
{
stat1
.
execute
(
"analyze"
);
...
...
h2/src/test/org/h2/test/db/TestCases.java
浏览文件 @
29ae89fd
...
...
@@ -733,7 +733,7 @@ public class TestCases extends TestBase {
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test(id int)"
);
stat
.
execute
(
"create view abc as select * from test"
);
stat
.
execute
(
"drop table test"
);
stat
.
execute
(
"drop table test
cascade
"
);
conn
.
close
();
conn
=
getConnection
(
"cases"
);
stat
=
conn
.
createStatement
();
...
...
h2/src/test/org/h2/test/db/TestOutOfMemory.java
浏览文件 @
29ae89fd
...
...
@@ -37,12 +37,12 @@ public class TestOutOfMemory extends TestBase {
System
.
gc
();
}
deleteDb
(
"outOfMemory"
);
Connection
conn
=
getConnection
(
"outOfMemory"
);
Connection
conn
=
getConnection
(
"outOfMemory
;MAX_OPERATION_MEMORY=1000000
"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"drop all objects"
);
stat
.
execute
(
"create table stuff (id int, text varchar as space(100) || id)"
);
stat
.
execute
(
"insert into stuff(id) select x from system_range(1, 3000)"
);
PreparedStatement
prep
=
conn
.
prepareStatement
(
"update stuff set text = text ||
' upd'
"
);
PreparedStatement
prep
=
conn
.
prepareStatement
(
"update stuff set text = text ||
space(1000) || id
"
);
prep
.
execute
();
stat
.
execute
(
"checkpoint"
);
eatMemory
(
80
);
...
...
h2/src/test/org/h2/test/db/TestViewAlterTable.java
浏览文件 @
29ae89fd
...
...
@@ -90,7 +90,7 @@ public class TestViewAlterTable extends TestBase {
}
catch
(
SQLException
e
)
{
assertEquals
(
ErrorCode
.
VIEW_IS_INVALID_2
,
e
.
getErrorCode
());
}
stat
.
execute
(
"drop table test"
);
stat
.
execute
(
"drop table test
cascade
"
);
}
private
void
testAlterTableAddColumnWithView
()
throws
SQLException
{
...
...
@@ -185,7 +185,7 @@ public class TestViewAlterTable extends TestBase {
assertEquals
(
2
,
rs
.
getInt
(
1
));
assertFalse
(
rs
.
next
());
stat
.
execute
(
"drop table test"
);
stat
.
execute
(
"drop table test
cascade
"
);
ResultSet
d
=
conn
.
getMetaData
().
getTables
(
null
,
null
,
null
,
null
);
while
(
d
.
next
())
{
...
...
h2/src/test/org/h2/test/db/TestViewDropView.java
浏览文件 @
29ae89fd
...
...
@@ -52,12 +52,12 @@ public class TestViewDropView extends TestBase {
stat
.
execute
(
"create table test(id int)"
);
stat
.
execute
(
"alter view test_view recompile"
);
stat
.
execute
(
"select * from test_view"
);
stat
.
execute
(
"drop table test_view, test"
);
stat
.
execute
(
"drop table test_view, test
cascade
"
);
stat
.
execute
(
"create force view test_view as select * from test where 1=0"
);
stat
.
execute
(
"create table test(id int)"
);
stat
.
execute
(
"alter view test_view recompile"
);
stat
.
execute
(
"select * from test_view"
);
stat
.
execute
(
"drop table test_view, test"
);
stat
.
execute
(
"drop table test_view, test
cascade
"
);
}
private
void
testDropViewDefaultBehaviour
()
throws
SQLException
{
...
...
@@ -167,7 +167,7 @@ public class TestViewDropView extends TestBase {
assertEquals
(
ErrorCode
.
COLUMN_NOT_FOUND_1
,
e
.
getErrorCode
());
}
stat
.
execute
(
"drop table test"
);
stat
.
execute
(
"drop table test
cascade
"
);
}
private
void
createTestData
()
throws
SQLException
{
...
...
@@ -197,7 +197,7 @@ public class TestViewDropView extends TestBase {
assertEquals
(
2
,
rs
.
getInt
(
1
));
assertFalse
(
rs
.
next
());
stat
.
execute
(
"drop table test"
);
stat
.
execute
(
"drop table test
cascade
"
);
ResultSet
d
=
conn
.
getMetaData
().
getTables
(
null
,
null
,
null
,
null
);
while
(
d
.
next
())
{
...
...
h2/src/test/org/h2/test/test-1.3.txt
0 → 100644
浏览文件 @
29ae89fd
差异被折叠。
点击展开。
h2/src/test/org/h2/test/testSimple.in.txt
浏览文件 @
29ae89fd
...
...
@@ -646,7 +646,7 @@ select remarks from information_schema.tables where table_name = 'TEST_VIEW';
@reconnect;
select remarks from information_schema.tables where table_name = 'TEST_VIEW';
> abc;
drop table test;
drop table test
cascade
;
@reconnect;
create table test(a int);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论