39 lines
1005 B
Plaintext
39 lines
1005 B
Plaintext
## Check column metadata
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
DROP SCHEMA IF EXISTS xtest;
|
|
CREATE SCHEMA xtest;
|
|
CREATE TABLE xtest.xtable (x INT AUTO_INCREMENT PRIMARY KEY, y VARCHAR(1) NOT NULL, z INT UNSIGNED UNIQUE);
|
|
INSERT INTO xtest.xtable VALUES (1,2,3);
|
|
|
|
CREATE TABLE xtest.ytable (a INT ZEROFILL, b TIMESTAMP, c FLOAT UNSIGNED, INDEX(a));
|
|
INSERT INTO xtest.ytable VALUES (1,'2015-02-15',3);
|
|
|
|
## Test starts here
|
|
--write_file $MYSQL_TMP_DIR/crud_resultset_metadata.tmp
|
|
## Test data
|
|
-->quiet
|
|
-->macro Select %TABLE%
|
|
Mysqlx.Crud.Find {
|
|
collection {
|
|
name: "%TABLE%"
|
|
schema: "xtest"
|
|
}
|
|
data_model: TABLE
|
|
}
|
|
-->recvresult print-columnsinfo
|
|
-->endmacro
|
|
|
|
-->callmacro Select xtable
|
|
-->callmacro Select ytable
|
|
EOF
|
|
|
|
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/crud_resultset_metadata.tmp 2>&1
|
|
|
|
|
|
## Cleanup
|
|
DROP SCHEMA IF EXISTS xtest;
|
|
--remove_file $MYSQL_TMP_DIR/crud_resultset_metadata.tmp
|
|
--source include/xplugin_drop_user.inc
|