Changeset: 6d9713e5971b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6d9713e5971b Modified Files: sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out Branch: Dec2016 Log Message:
Added additional tests for types char(5), varchar(6) and clob. diffs (154 lines): diff --git a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql --- a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql +++ b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql @@ -1,9 +1,35 @@ create table test_oidx (c1 int, c2 string); insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); select * from test_oidx order by c2, c1; - create ordered index test_oidx1 on test_oidx (c2); select * from test_oidx order by c2, c1; - drop index test_oidx1; drop table test_oidx; + +create table test_oidx (c1 int, c2 char(5)); +insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +select * from test_oidx order by c2, c1; +create ordered index test_oidx1 on test_oidx (c2); +select * from test_oidx order by c2, c1; +drop index test_oidx1; +drop table test_oidx; + +create table test_oidx (c1 int, c2 varchar(6)); +insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +select * from test_oidx order by c2, c1; +create ordered index test_oidx1 on test_oidx (c2); +select * from test_oidx order by c2, c1; +drop index test_oidx1; +drop table test_oidx; + +create table test_oidx (c1 int, c2 clob); +insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +select * from test_oidx order by c2, c1; +create ordered index test_oidx1 on test_oidx (c2); +select * from test_oidx order by c2, c1; +drop index test_oidx1; +drop table test_oidx; + + +-- TODO add tests for all other datatypes, including url, json, uuid, inet, blob. + diff --git a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err --- a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err +++ b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err @@ -36,6 +36,27 @@ MAPI = (monetdb) /var/tmp/mtest-19864/. QUERY = drop index test_oidx1; ERROR = !DROP INDEX: no such index 'test_oidx1' +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = create ordered index test_oidx1 on test_oidx (c2); +ERROR = !CREATE ORDERED INDEX: MALException:bat.orderidx:Type is not supported +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = drop index test_oidx1; +ERROR = !DROP INDEX: no such index 'test_oidx1' + +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = create ordered index test_oidx1 on test_oidx (c2); +ERROR = !CREATE ORDERED INDEX: MALException:bat.orderidx:Type is not supported +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = drop index test_oidx1; +ERROR = !DROP INDEX: no such index 'test_oidx1' + +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = create ordered index test_oidx1 on test_oidx (c2); +ERROR = !CREATE ORDERED INDEX: MALException:bat.orderidx:Type is not supported +MAPI = (monetdb) /var/tmp/mtest-19864/.s.monetdb.34473 +QUERY = drop index test_oidx1; +ERROR = !DROP INDEX: no such index 'test_oidx1' + # 17:01:36 > # 17:01:36 > "Done." # 17:01:36 > diff --git a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out --- a/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out +++ b/sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out @@ -90,6 +90,78 @@ Ready. [ 5, "ddd" ] [ 3, "eee" ] #drop table test_oidx; +#create table test_oidx (c1 int, c2 char(5)); +#insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +[ 5 ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, char # type +% 1, 5 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, char # type +% 1, 5 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#drop table test_oidx; +#create table test_oidx (c1 int, c2 varchar(6)); +#insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +[ 5 ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, varchar # type +% 1, 3 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, varchar # type +% 1, 3 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#drop table test_oidx; +#create table test_oidx (c1 int, c2 clob); +#insert into test_oidx (c1, c2) values (1, 'ccc'), (2, 'bbb'), (3, 'eee'), (4, 'aaa'), (5, 'ddd'); +[ 5 ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, clob # type +% 1, 3 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#select * from test_oidx order by c2, c1; +% sys.test_oidx, sys.test_oidx # table_name +% c1, c2 # name +% int, clob # type +% 1, 3 # length +[ 4, "aaa" ] +[ 2, "bbb" ] +[ 1, "ccc" ] +[ 5, "ddd" ] +[ 3, "eee" ] +#drop table test_oidx; # 17:01:36 > # 17:01:36 > "Done." _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
