Debian Codegraph @

mysql-test/suite/x/t/admin_create_collection_default_validation.test

raw
1 ## Test create_collection command in context of default schema validation
2
3 ## Preamble
4 --source include/xplugin_preamble.inc
5 --source include/xplugin_create_user.inc
6
7 ## Tests start here
8
9 --write_file $MYSQL_TMP_DIR/admin_create_collection_default_validation.xpl
10 -->import admin_stmt.macro
11
12 callmacro Admin_stmt
13 create_collection {"schema":"xtest","name":"coll","options":{"validation":{}}}
14 ER_SUCCESS;
15
16 callmacro Admin_stmt
17 create_collection {"schema":"xtest","name":"coll1","options":{"validation":{"level":"off"}}}
18 ER_SUCCESS;
19
20 callmacro Admin_stmt
21 create_collection {"schema":"xtest","name":"coll2","options":{"validation":{"schema":{}}}}
22 ER_SUCCESS;
23
24 callmacro Admin_stmt
25 create_collection {"schema":"xtest","name":"coll3","options":{"validation":{"foo":"bar"}}}
26 ER_X_CMD_INVALID_ARGUMENT;
27
28 EOF
29
30 CREATE SCHEMA xtest DEFAULT CHARSET 'UTF8MB4';
31
32 exec $MYSQLXTEST -ux_root --password=''
33 --file=$MYSQL_TMP_DIR/admin_create_collection_default_validation.xpl 2>&1;
34
35 ## Cleanup
36 --source ../include/xplugin_cleanup.inc