diff --git a/assembly.xml b/assembly.xml
index 80f4cabd8..32b179f11 100755
--- a/assembly.xml
+++ b/assembly.xml
@@ -23,13 +23,6 @@
mo.yml
run.yml
log4j.properties
-
- 755
- ./
-
-
- ./
-
run.sh
755
diff --git a/cases/template.result b/cases/template.result
index 95bdea33f..96301f14d 100644
--- a/cases/template.result
+++ b/cases/template.result
@@ -9,8 +9,7 @@ select min(int32),max(int32),max(int32)-1 from t1;
min(int32) max(int32) max(int32) - 1
-1 2147483647 2147483646
select min(int32),max(int32),max(int32)-1 from t1 group by a;
-min(int32) max(int32) max(int32) - 1
--1 2147483647 2147483646
+[unknown result because it is related to issue#1234]
drop table t1;
CREATE TABLE NATION (
N_NATIONKEY INTEGER NOT NULL,
diff --git a/cases/template.sql b/cases/template.sql
index 9f59a6d79..fc014d7a6 100644
--- a/cases/template.sql
+++ b/cases/template.sql
@@ -2,7 +2,9 @@ create table t1 ( a int not null default 1, int32 int primary key);
insert into t1 (int32) values (-1),(1234567890),(2147483647);
select * from t1 order by a desc, int32 asc;
select min(int32),max(int32),max(int32)-1 from t1;
+-- @bvt:issue#1234
select min(int32),max(int32),max(int32)-1 from t1 group by a;
+-- @bvt:issue
drop table t1;
CREATE TABLE NATION (
N_NATIONKEY INTEGER NOT NULL,
diff --git a/lib/mo-tester-1.0-SNAPSHOT.jar b/lib/mo-tester-1.0-SNAPSHOT.jar
index ecdd4ab09..6a1a98f82 100644
Binary files a/lib/mo-tester-1.0-SNAPSHOT.jar and b/lib/mo-tester-1.0-SNAPSHOT.jar differ
diff --git a/pom.xml b/pom.xml
index b92812a5d..df99e6c35 100755
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@
jar
- morunner
+ mo-tester
http://maven.apache.org
diff --git a/src/main/java/io/mo/Tester.java b/src/main/java/io/mo/Tester.java
index f5b895d46..491b8f33a 100755
--- a/src/main/java/io/mo/Tester.java
+++ b/src/main/java/io/mo/Tester.java
@@ -165,8 +165,9 @@ public static void main(String[] args){
public static void run(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -186,8 +187,9 @@ public static void run(File file){
public static void generateRs(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -209,8 +211,9 @@ public static void generateRs(File file){
public static void debug(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
@@ -228,8 +231,9 @@ public static void debug(File file){
public static void check(File file){
if(file.isFile()){
- if(file.getName().endsWith(".result"))
+ if(!(file.getName().endsWith(".sql") || file.getName().endsWith(".test"))) {
return;
+ }
if(isInclude(file.getName())) {
ScriptParser.parseScript(file.getPath());
TestScript script = ScriptParser.getTestScript();
diff --git a/src/main/java/io/mo/db/Executor.java b/src/main/java/io/mo/db/Executor.java
index daf941350..7260dc928 100755
--- a/src/main/java/io/mo/db/Executor.java
+++ b/src/main/java/io/mo/db/Executor.java
@@ -224,8 +224,26 @@ public static boolean genRS(TestScript script){
ArrayList commands = script.getCommands();
for (int j = 0; j < commands.size(); j++) {
SqlCommand command = null;
+
try{
command = commands.get(j);
+
+ if(command.isIgnore()) {
+ rs_writer.write(command.getCommand().trim());
+ rs_writer.newLine();
+ if (isUpdate) {
+ if (command.getExpResult() != null) {
+ if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE)
+ rs_writer.write(command.getExpResult().getOrginalRSText());
+ }
+ } else {
+ rs_writer.write("[unknown result because it is related to issue#" + command.getIssueNo() + "]");
+ }
+ if(j < commands.size() -1)
+ rs_writer.newLine();
+ continue;
+ }
+
connection = getConnection(command);
statement = connection.createStatement();
@@ -238,7 +256,8 @@ public static boolean genRS(TestScript script){
actResult.setCommand(command);
rs_writer.write(command.getCommand().trim());
rs_writer.newLine();
- if(command.isIgnore()) {
+ rs_writer.write(actResult.toString());
+ /*if(command.isIgnore()) {
if (isUpdate) {
if (command.getExpResult() != null) {
if (command.getExpResult().getType() != RESULT.STMT_RESULT_TYPE_NONE)
@@ -254,7 +273,7 @@ public static boolean genRS(TestScript script){
}
else {
rs_writer.write(actResult.toString());
- }
+ }*/
if(j < commands.size() -1)
rs_writer.newLine();