blob: 4643eb60eb8ec019cfa72e5bcc65fbb4d49a7f4e [file] [log] [blame]
salsubaiee201be382013-07-16 17:50:33 -07001/*
2 * Test case Name : insert-and-scan-dataset-with-index.aql
3 * Description : This test is intended to test inserting into a dataset that has a secondary index and scan
4 * the data at the same time where we insert a materializing to prevent the possibility of deadlatch.
5 * Expected Result : Success
6 * Date : July 11 2013
7 */
8
9drop dataverse test if exists;
10create dataverse test;
11
12create type test.Emp as closed {
13id:int32,
14fname:string,
15lname:string,
16age:int32,
17dept:string
18}
19
20create dataset test.employee(Emp) primary key id;
21
22create index idx_employee_first_name on test.employee(fname);
23
24insert into dataset test.employee (
25for $x in dataset test.employee
26return {
27 "id": $x.id + 10000,
28 "fname": $x.fname,
29 "lname": $x.lname,
30 "age": $x.age,
31 "dept": $x.dept
32}
33);