Debian Codegraph @

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

raw
1
2 # Test feature presents using expect flow and
3 # "field_exists" condition.
4 #
5 # Following features are covered:
6 # - WL#10645: X Protocol Crud.Find with row locking
7 # - WL#9807: X Protocol Crud.Insert with upsert
8
9 --source include/xplugin_preamble.inc
10 --source include/xplugin_create_user.inc
11
12 ## Test starts here
13 --write_file $MYSQL_TMP_DIR/features.xpl
14
15 ##
16 ## Verify_expect_open
17 ##
18 -->macro Verify_expect_open %TEXT_FIELD% %COND%
19 -->echo [Verification of %TEXT_FIELD%]
20 Mysqlx.Expect.Open {
21 %COND%
22 }
23 -->noquery_result
24 -->quiet
25 -->recvtype Mysqlx.Ok
26
27 Mysqlx.Expect.Close {
28 }
29 -->recvtype Mysqlx.Ok
30
31 -->noquery_result
32 -->noquiet
33 -->echo ok
34 -->echo
35 -->endmacro
36
37 ##
38 ## Verify_feature_existence
39 ##
40 -->macro Verify_feature_existence %TEXT_FIELD% %ID_FIELD%
41
42 -->varlet %COND% cond { condition_key:2 condition_value: '%ID_FIELD%' }
43 -->varlet %ALL_COND% %ALL_COND% %COND%
44 -->callmacro Verify_expect_open %TEXT_FIELD% (%ID_FIELD%) %COND%
45 -->endmacro
46
47 ##
48 ## Test case
49 ##
50 -->varlet %ALL_COND%
51 -->callmacro Verify_feature_existence Mysqlx.Crud.Insert::upsert 18.6
52 -->callmacro Verify_feature_existence Mysqlx.Crud.Update::limit_expr 19.9
53 -->callmacro Verify_feature_existence Mysqlx.Crud.Delete::limit_expr 20.7
54 -->callmacro Verify_feature_existence Mysqlx.Crud.Find::locking 17.12
55 -->callmacro Verify_feature_existence Mysqlx.Crud.Find::locking_options 17.13
56 -->callmacro Verify_feature_existence Mysqlx.Crud.Find::limit_expr 17.14
57 -->callmacro Verify_feature_existence Mysqlx.Session.Reset::keep_open 6.1
58 -->callmacro Verify_expect_open all features in single request %ALL_COND%
59 EOF
60
61 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/features.xpl 2>&1
62
63 ## Cleanup
64 --source ../include/xplugin_cleanup.inc