⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
x
/
t
/
View File Name :
delete_del_table_doc.test
## generated ## Rel: Delete on a table with expression on invalid columns --source ../include/xplugin_preamble.inc ## Test starts here --write_file $MYSQL_TMP_DIR/delete_del_table_doc.tmp ## Test data -->sql drop schema if exists xtest; create schema xtest; use xtest; create table mycoll (doc JSON, _id VARCHAR(32) NOT NULL PRIMARY KEY); insert into mycoll (doc, _id) values ('{"_id": "1", "name": "Joe1"}', json_unquote(json_extract(doc, '$._id'))); insert into mycoll (doc, _id) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}', json_unquote(json_extract(doc, '$._id'))); insert into mycoll (doc, _id) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}', json_unquote(json_extract(doc, '$._id'))); create table mytable (id int primary key, name varchar(40), price decimal(5,2), info json); insert into mytable values (1, 'banana', 1.20, '{"color": "yellow"}'); insert into mytable values (2, 'apple', 0.25, '{"color":"red"}'); insert into mytable values (3, 'tomato', 1.80, '{"color":"red"}'); insert into mytable values (4, 'mango', 3.14, '{"color":"green"}'); insert into mytable values (5, 'orange', 0.90, '{"color":"orange"}'); -->endsql Mysqlx.Crud.Delete { collection { name: "mytable" schema: "xtest" } data_model: TABLE criteria { type: OPERATOR operator { name: "&&" param { type: OPERATOR operator { name: ">" param { type: IDENT identifier { name: "bla" } } param { type: LITERAL literal { type: V_DOUBLE v_double: 100.0 } } } } param { type: OPERATOR operator { name: "==" param { type: IDENT identifier { document_path { type: MEMBER value: "color" } name: "info" } } param { type: LITERAL literal { type: V_OCTETS v_octets {value:"red"} } } } } } } } ## expect Mysqlx.Error -->recv Mysqlx.Crud.Delete { collection { name: "mytable" schema: "xtest" } data_model: TABLE criteria { type: OPERATOR operator { name: "==" param { type: IDENT identifier { document_path { type: MEMBER value: "bogus" } name: "info" } } param { type: LITERAL literal { type: V_OCTETS v_octets {value:"red"} } } } } } ## expect Mysqlx.Sql.StmtExecuteOk -->recvresult ## Cleanup -->sql drop schema if exists xtest; -->endsql EOF --exec $MYSQLXTEST -uroot --password='' --file=$MYSQL_TMP_DIR/delete_del_table_doc.tmp 2>&1 --remove_file $MYSQL_TMP_DIR/delete_del_table_doc.tmp ## Postamble uninstall plugin mysqlx;