| 1 |
## Check column metadata |
| 2 |
--source include/xplugin_preamble.inc |
| 3 |
--source include/xplugin_create_user.inc |
| 4 |
|
| 5 |
CREATE SCHEMA xtest; |
| 6 |
CREATE TABLE xtest.xtable (x INT AUTO_INCREMENT PRIMARY KEY, y VARCHAR(1) NOT NULL, z INT UNSIGNED UNIQUE); |
| 7 |
INSERT INTO xtest.xtable VALUES (1,2,3); |
| 8 |
|
| 9 |
CREATE TABLE xtest.ytable (a INT ZEROFILL, b TIMESTAMP, c FLOAT UNSIGNED, INDEX(a)); |
| 10 |
INSERT INTO xtest.ytable VALUES (1,'2015-02-15',3); |
| 11 |
|
| 12 |
## Test starts here |
| 13 |
--write_file $MYSQL_TMP_DIR/crud_resultset_metadata.xpl |
| 14 |
## Test data |
| 15 |
-->quiet |
| 16 |
-->macro Select %TABLE% |
| 17 |
Mysqlx.Crud.Find { |
| 18 |
collection { |
| 19 |
name: "%TABLE%" |
| 20 |
schema: "xtest" |
| 21 |
} |
| 22 |
data_model: TABLE |
| 23 |
} |
| 24 |
-->recvresult print-columnsinfo |
| 25 |
-->endmacro |
| 26 |
|
| 27 |
-->callmacro Select xtable |
| 28 |
-->callmacro Select ytable |
| 29 |
EOF |
| 30 |
|
| 31 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/crud_resultset_metadata.xpl 2>&1 |
| 32 |
|
| 33 |
|
| 34 |
## Cleanup |
| 35 |
--source ../include/xplugin_cleanup.inc |