Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : /home/usr.opt/mysql57/mysql-test/suite/x/t/crud_find_args.test |
## Updating and placeholders --source ../include/xplugin_preamble.inc ## Test data DROP SCHEMA IF EXISTS xtest; CREATE SCHEMA xtest; CREATE TABLE xtest.xtable (value FLOAT); ## Test starts here --write_file $MYSQL_TMP_DIR/crud_find_args.tmp -->macro prepare_values -->quiet -->sql TRUNCATE TABLE xtest.xtable; INSERT INTO xtest.xtable VALUES (34),(23),(56),(45),(67); -->endsql -->noquiet -->endmacro ##-- projection - missing arg -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { source { type: PLACEHOLDER position: 0 } } } -->noquiet -->expecterror 5154 -->recvresult ##-- projection - one arg -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { source { type: PLACEHOLDER position: 0 } } args { type: V_OCTETS v_octets {value:"xteam"} } } -->noquiet -->recvresult ##-- criteria - missing arg -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE criteria { type: OPERATOR operator { name: ">" param { type: IDENT identifier { name: "value" } } param { type: PLACEHOLDER position: 0 } } } } -->noquiet -->expecterror 5154 -->recvresult ##-- criteria - one arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE args { type: V_SINT v_signed_int: 42 } criteria { type: OPERATOR operator { name: ">" param { type: IDENT identifier { name: "value" } } param { type: PLACEHOLDER position: 0 } } } } -->noquiet -->recvresult ##-- grouping - missing arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { alias: "modulo" source { type: OPERATOR operator { name: "%" param { type: IDENT identifier { name: "value" } } param { type: LITERAL literal { type: V_SINT v_signed_int: 2} } } } } projection { source { type: FUNC_CALL function_call { name { name: "count" } param { type: IDENT identifier { name: "value" } } } } } grouping {type: PLACEHOLDER position: 0} } -->noquiet -->expecterror 5154 -->recvresult ##-- grouping - one arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { alias: "modulo" source { type: OPERATOR operator { name: "%" param { type: IDENT identifier { name: "value" } } param { type: LITERAL literal { type: V_SINT v_signed_int: 2} } } } } projection { source { type: FUNC_CALL function_call { name { name: "count" } param { type: IDENT identifier { name: "value" } } } } } grouping {type: PLACEHOLDER position: 0} args { type: V_SINT v_signed_int: 1 } } -->noquiet -->recvresult ##-- grouping criteria - missing arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { alias: "modulo" source { type: OPERATOR operator { name: "%" param { type: IDENT identifier { name: "value" } } param { type: LITERAL literal { type: V_SINT v_signed_int: 2} } } } } projection { source { type: FUNC_CALL function_call { name { name: "count" } param { type: IDENT identifier { name: "value" } } } } } grouping {type: IDENT identifier { name: "modulo" } } grouping_criteria { type: OPERATOR operator { name: "<" param { type: IDENT identifier {name: "modulo"} } param { type: PLACEHOLDER position: 0 } } } } -->noquiet -->expecterror 5154 -->recvresult ##-- grouping criteria - one arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE projection { alias: "modulo" source { type: OPERATOR operator { name: "%" param { type: IDENT identifier { name: "value" } } param { type: LITERAL literal { type: V_SINT v_signed_int: 2} } } } } projection { source { type: FUNC_CALL function_call { name { name: "count" } param { type: IDENT identifier { name: "value" } } } } } grouping {type: IDENT identifier { name: "modulo" } } grouping_criteria { type: OPERATOR operator { name: "<" param { type: IDENT identifier {name: "modulo"} } param { type: PLACEHOLDER position: 0 } } } args { type: V_SINT v_signed_int: 1 } } -->noquiet -->recvresult ##-- order - missing arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE order { expr { type: PLACEHOLDER position: 0 } direction: DESC } } -->noquiet -->expecterror 5154 -->recvresult ##-- order - one arg -->callmacro prepare_values -->quiet Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest"} data_model: TABLE order { expr { type: PLACEHOLDER position: 0 } direction: DESC } args { type: V_SINT v_signed_int: 1 } } -->noquiet -->recvresult EOF --exec $MYSQLXTEST -uroot --password='' --file=$MYSQL_TMP_DIR/crud_find_args.tmp 2>&1 --remove_file $MYSQL_TMP_DIR/crud_find_args.tmp ## Postamble DROP SCHEMA IF EXISTS xtest; UNINSTALL PLUGIN mysqlx;