| 1 |
## generated |
| 2 |
## Delete with missing schema or table |
| 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_missing_arg.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: "mycoll" |
| 26 |
schema: "" |
| 27 |
} |
| 28 |
data_model: DOCUMENT |
| 29 |
} |
| 30 |
-->recvresult |
| 31 |
|
| 32 |
Mysqlx.Crud.Delete { |
| 33 |
collection { |
| 34 |
name: "mycoll" |
| 35 |
schema: "" |
| 36 |
} |
| 37 |
data_model: TABLE |
| 38 |
} |
| 39 |
-->recvresult |
| 40 |
|
| 41 |
Mysqlx.Crud.Delete { |
| 42 |
collection { |
| 43 |
name: "" |
| 44 |
schema: "xtest" |
| 45 |
} |
| 46 |
data_model: DOCUMENT |
| 47 |
} |
| 48 |
-->expecterror 5113 |
| 49 |
-->recvresult |
| 50 |
|
| 51 |
Mysqlx.Crud.Delete { |
| 52 |
collection { |
| 53 |
name: "" |
| 54 |
schema: "xtest" |
| 55 |
} |
| 56 |
data_model: TABLE |
| 57 |
} |
| 58 |
-->expecterror 5113 |
| 59 |
-->recvresult |
| 60 |
|
| 61 |
EOF |
| 62 |
|
| 63 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/delete_del_missing_arg.xpl 2>&1 |
| 64 |
|
| 65 |
## Cleanup |
| 66 |
--source ../include/xplugin_cleanup.inc |