| 1 |
## generated |
| 2 |
## Test delete everything (should this be allowed?) |
| 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_all.xpl |
| 11 |
## Test data |
| 12 |
-->stmtadmin create_collection {"schema":"xtest","name":"mycoll"} |
| 13 |
-->recvresult |
| 14 |
|
| 15 |
-->sql |
| 16 |
use xtest; |
| 17 |
insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}'); |
| 18 |
insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}'); |
| 19 |
insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}'); |
| 20 |
-->endsql |
| 21 |
|
| 22 |
Mysqlx.Crud.Delete { |
| 23 |
collection { |
| 24 |
name: "mycoll" |
| 25 |
schema: "xtest" |
| 26 |
} |
| 27 |
data_model: DOCUMENT |
| 28 |
} |
| 29 |
|
| 30 |
## expect Mysqlx.Sql.StmtExecuteOk |
| 31 |
-->recvresult |
| 32 |
|
| 33 |
EOF |
| 34 |
|
| 35 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/delete_del_all.xpl 2>&1 |
| 36 |
|
| 37 |
## Cleanup |
| 38 |
--source ../include/xplugin_cleanup.inc |