| 1 |
## generated |
| 2 |
## Delete on an invalid collection |
| 3 |
|
| 4 |
--source include/xplugin_preamble.inc |
| 5 |
--source include/xplugin_create_user.inc |
| 6 |
|
| 7 |
create schema xtest; |
| 8 |
|
| 9 |
## Test starts here |
| 10 |
--write_file $MYSQL_TMP_DIR/delete_del_bad_collection.xpl |
| 11 |
## Test data |
| 12 |
|
| 13 |
-->stmtadmin create_collection {"schema":"xtest","name":"mycoll"} |
| 14 |
-->recvresult |
| 15 |
|
| 16 |
-->sql |
| 17 |
use xtest; |
| 18 |
insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}'); |
| 19 |
insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}'); |
| 20 |
insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}'); |
| 21 |
-->endsql |
| 22 |
|
| 23 |
Mysqlx.Crud.Delete { |
| 24 |
collection { |
| 25 |
name: "mycol" |
| 26 |
schema: "xtest" |
| 27 |
} |
| 28 |
data_model: DOCUMENT |
| 29 |
criteria { |
| 30 |
type: OPERATOR |
| 31 |
operator { |
| 32 |
name: "in" |
| 33 |
param { |
| 34 |
type: IDENT |
| 35 |
identifier { |
| 36 |
document_path { |
| 37 |
type: MEMBER |
| 38 |
value: "_id" |
| 39 |
} |
| 40 |
} |
| 41 |
} |
| 42 |
param { |
| 43 |
type: LITERAL |
| 44 |
literal { |
| 45 |
type: V_OCTETS |
| 46 |
v_octets {value:"1"} |
| 47 |
} |
| 48 |
} |
| 49 |
param { |
| 50 |
type: LITERAL |
| 51 |
literal { |
| 52 |
type: V_OCTETS |
| 53 |
v_octets {value:"3"} |
| 54 |
} |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
## expect Mysqlx.Error |
| 61 |
-->recv |
| 62 |
|
| 63 |
EOF |
| 64 |
|
| 65 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/delete_del_bad_collection.xpl 2>&1 |
| 66 |
|
| 67 |
## Cleanup |
| 68 |
--source ../include/xplugin_cleanup.inc |