salsubaiee | 201be38 | 2013-07-16 17:50:33 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Test case Name : insert-and-scan-dataset.aql |
| 3 | * Description : This test is intended to test inserting into a dataset and scan it at the same time |
| 4 | * where we insert a materializing to prevent the possibility of deadlatch. |
| 5 | * Expected Result : Success |
| 6 | * Date : July 11 2013 |
| 7 | */ |
| 8 | |
| 9 | drop dataverse test if exists; |
| 10 | create dataverse test; |
| 11 | |
| 12 | use dataverse test; |
| 13 | |
| 14 | create type myDataType as open { |
| 15 | id: int32 |
| 16 | } |
| 17 | |
| 18 | create dataset myData(myDataType) |
| 19 | primary key id; |
| 20 | |
| 21 | insert into dataset myData ( |
| 22 | for $x in dataset myData |
| 23 | return { |
| 24 | "id": $x.id + 1 |
| 25 | } |
| 26 | ); |