khfaraaz82@gmail.com | 7be9246 | 2013-02-09 02:19:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Drop empty secondary index. |
| 3 | * Expected Result : Success |
| 4 | * Date : 8th Feb 2013 |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | use dataverse test; |
| 11 | |
| 12 | create type TestType as open { |
| 13 | id : int32, |
| 14 | name : string, |
| 15 | locn : point, |
| 16 | zip : string |
| 17 | } |
| 18 | |
khfaraaz82@gmail.com | ebffdad | 2013-02-09 03:58:36 +0000 | [diff] [blame] | 19 | write output to nc1:"rttest/dml_drop-empty-secondary-indexes.adm"; |
| 20 | |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 21 | create dataset t1(TestType) primary key id; |
khfaraaz82@gmail.com | 7be9246 | 2013-02-09 02:19:25 +0000 | [diff] [blame] | 22 | |
| 23 | create index rtree_index_point on t1(locn) type rtree; |
| 24 | |
| 25 | create index keyWD_indx on t1(name) type keyword; |
| 26 | |
| 27 | create index secndIndx on t1(zip); |
| 28 | |
| 29 | drop index t1.rtree_index_point; |
| 30 | |
| 31 | drop index t1.keyWD_indx; |
| 32 | |
| 33 | drop index t1.secndIndx; |
| 34 | |
| 35 | for $l in dataset('Metadata.Index') |
| 36 | where $l.IsPrimary=false |
| 37 | return $l; |