41 lines
975 B
Plaintext
41 lines
975 B
Plaintext
## generated
|
|
## Test delete everything (should this be allowed?)
|
|
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
create schema xtest;
|
|
|
|
## Test starts here
|
|
--write_file $MYSQL_TMP_DIR/delete_del_all.tmp
|
|
## Test data
|
|
-->stmtadmin create_collection {"schema":"xtest","name":"mycoll"}
|
|
-->recvresult
|
|
|
|
-->sql
|
|
use xtest;
|
|
insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}');
|
|
insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}');
|
|
insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}');
|
|
-->endsql
|
|
|
|
Mysqlx.Crud.Delete {
|
|
collection {
|
|
name: "mycoll"
|
|
schema: "xtest"
|
|
}
|
|
data_model: DOCUMENT
|
|
}
|
|
|
|
## expect Mysqlx.Sql.StmtExecuteOk
|
|
-->recvresult
|
|
|
|
EOF
|
|
|
|
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/delete_del_all.tmp 2>&1
|
|
|
|
## Cleanup
|
|
--remove_file $MYSQL_TMP_DIR/delete_del_all.tmp
|
|
--source include/xplugin_drop_user.inc
|
|
drop schema if exists xtest;
|