You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2017/02/01 02:57:52 UTC

[3/4] incubator-trafodion git commit: add a test case in regression test to test sortReclen

add a test case in regression test to test sortReclen


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a3194862
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a3194862
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a3194862

Branch: refs/heads/master
Commit: a3194862cc413ab9cefb0c39a94a5f6d27db5ab1
Parents: 2d86dd6
Author: Prashant Vasudev <pr...@esgyn.com>
Authored: Tue Jan 31 23:48:51 2017 +0000
Committer: Prashant Vasudev <pr...@esgyn.com>
Committed: Tue Jan 31 23:48:51 2017 +0000

----------------------------------------------------------------------
 core/sql/regress/executor/EXPECTED107 | 52 ++++++++++++++++++++++++++++++
 core/sql/regress/executor/TEST107     | 27 ++++++++++++++++
 2 files changed, 79 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a3194862/core/sql/regress/executor/EXPECTED107
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED107 b/core/sql/regress/executor/EXPECTED107
index a3d2f13..20272d9 100644
--- a/core/sql/regress/executor/EXPECTED107
+++ b/core/sql/regress/executor/EXPECTED107
@@ -114,6 +114,22 @@
 >>update statistics for table t107t2 on  every column sample 1000 rows;
 
 --- SQL operation complete.
+>>
+>>create table t107t3
++>  (i    int ,
++>   str1 char(100000),
++>   str2 char(100000),
++>   str3 char(100000),
++>   str4 char(100000),
++>   str5 char(100000),
++>   str6 char(100000)
++>  );
+
+--- SQL operation complete.
+>>insert into t107t3 values(1,'a','b','c','d','e','f'), (2,'a','b','c','d','e','f');
+
+--- 2 row(s) inserted.
+>>
 >>#ifLINUX
 >>
 >>
@@ -189,6 +205,42 @@ C100K        STR1
 
 --- 1 row(s) selected.
 >>
+>>-- Test #2a: sortRecLen > 512kb scratchIOBlock, overflow.
+>>cqd GEN_SORT_MAX_NUM_BUFFERS  '1';
+
+--- SQL operation complete.
+>>cqd GEN_SORT_NUM_BUFFERS '1';
+
+--- SQL operation complete.
+>>cqd GEN_SORT_MAX_BUFFER_SIZE '650000';
+
+--- SQL operation complete.
+>>cqd COMPRESSED_INTERNAL_FORMAT 'OFF';
+
+--- SQL operation complete.
+>>cqd COMPRESSED_INTERNAL_FORMAT_BMO 'OFF';
+
+--- SQL operation complete.
+>>SELECT [last 0] i, str1, str2, str3, str4, str5, str6  from t107t3 order by 1;
+
+--- 0 row(s) selected.
+>>cqd GEN_SORT_MAX_NUM_BUFFERS reset;
+
+--- SQL operation complete.
+>>cqd GEN_SORT_NUM_BUFFERS reset;
+
+--- SQL operation complete.
+>>cqd GEN_SORT_MAX_BUFFER_SIZE reset;
+
+--- SQL operation complete.
+>>cqd COMPRESSED_INTERNAL_FORMAT reset;
+
+--- SQL operation complete.
+>>cqd COMPRESSED_INTERNAL_FORMAT_BMO reset;
+
+--- SQL operation complete.
+>>
+>>
 >>-- Test #3 - causes intermediate merge
 >>set envvar SCRATCH_IO_PENDING 50;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a3194862/core/sql/regress/executor/TEST107
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/TEST107 b/core/sql/regress/executor/TEST107
index 234b481..ffc4f75 100644
--- a/core/sql/regress/executor/TEST107
+++ b/core/sql/regress/executor/TEST107
@@ -54,6 +54,7 @@ exit;
 drop table t107helper;
 drop table t107100k cascade;
 drop table t107t2 cascade;
+drop table t107t3 cascade;
 
 ?section setup
 ---------------
@@ -140,6 +141,18 @@ select
 
 control query default comp_bool_140 reset;
 update statistics for table t107t2 on  every column sample 1000 rows;
+
+create table t107t3
+  (i    int ,
+   str1 char(100000),
+   str2 char(100000),
+   str3 char(100000),
+   str4 char(100000),
+   str5 char(100000),
+   str6 char(100000)
+  );
+insert into t107t3 values(1,'a','b','c','d','e','f'), (2,'a','b','c','d','e','f');
+
 #ifLINUX
 
 ?section dml
@@ -166,6 +179,20 @@ control query default GEN_SORT_MAX_NUM_BUFFERS  '1';
 prepare xx from SELECT [last 1] c100k, str1 from t107100k order by 1,2;
 execute xx;
 
+-- Test #2a: sortRecLen > 512kb scratchIOBlock, overflow.
+cqd GEN_SORT_MAX_NUM_BUFFERS  '1';
+cqd GEN_SORT_NUM_BUFFERS '1';
+cqd GEN_SORT_MAX_BUFFER_SIZE '650000';
+cqd COMPRESSED_INTERNAL_FORMAT 'OFF';
+cqd COMPRESSED_INTERNAL_FORMAT_BMO 'OFF';
+SELECT [last 0] i, str1, str2, str3, str4, str5, str6  from t107t3 order by 1;
+cqd GEN_SORT_MAX_NUM_BUFFERS reset;
+cqd GEN_SORT_NUM_BUFFERS reset;
+cqd GEN_SORT_MAX_BUFFER_SIZE reset;
+cqd COMPRESSED_INTERNAL_FORMAT reset;
+cqd COMPRESSED_INTERNAL_FORMAT_BMO reset;
+
+
 -- Test #3 - causes intermediate merge
 set envvar SCRATCH_IO_PENDING 50;
 control query default GEN_SORT_MAX_NUM_BUFFERS  '20';