Debian Codegraph @

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

raw
1 ## Various regression tests
2 ##
3 --source include/restart_mysqld.inc
4 --source include/xplugin_preamble.inc
5 --source include/xplugin_create_user.inc
6
7 ## Test starts here
8 --write_file $MYSQL_TMP_DIR/mysqlx-largetest.xpl
9 -->sql
10 use test;
11 create table bla (data json);
12 -->endsql
13
14 -->varfile %JSONDATA_UNESCAPED% %PATH_TO_256kb_JSON_FILE%
15
16 # prevent flood from big json data
17 -->quiet
18 -->varlet %JSONDATA% %JSONDATA_UNESCAPED%
19 -->varescape %JSONDATA%
20 -->varsub %JSONDATA%
21 -->stmtsql insert into bla values ('%JSONDATA%');
22 -->recvresult
23 -->noquiet
24
25 -->varsub %JSONDATA_UNESCAPED%
26 -->sql
27 select * from bla;
28 -->endsql
29
30 -->sql
31 drop table bla;
32 -->endsql
33
34
35 -->vargen %1% . 610000
36
37 -->quiet
38 -->varsub %1%
39 Mysqlx.Sql.StmtExecute {
40 stmt: "select '>%1%!1' as result"
41 }
42 -->noquiet
43
44 -->recv
45 -->varsub %1%
46 -->recv
47 -->recv
48 -->recvuntil Mysqlx.Sql.StmtExecuteOk
49 EOF
50
51 --write_file $MYSQL_TMP_DIR/mysqlx-largetest-asio.xpl
52 -->vargen %1% . 161000000
53
54 -->varsub %1%
55 -->quiet
56 # lets put the SQL string directly to message, its faster than parsing
57 # 161MB message by protobuf
58 -->stmtsql select 1; /* %1% */;
59 -->noquiet
60 -->recvresult
61 EOF
62
63 --write_file $MYSQL_TMP_DIR/mysqlx-empty.xpl
64 EOF
65
66 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-largetest.xpl -v %PATH_TO_256kb_JSON_FILE%=$MYSQL_TEST_DIR/std_data/256kb.json 2>&1
67
68 SET GLOBAL mysqlx_max_allowed_packet=162000000;
69
70 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-empty.xpl 2>&1
71 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-largetest-asio.xpl 2>&1
72
73 ## Cleanup
74 SET GLOBAL mysqlx_max_allowed_packet= DEFAULT;
75 --source ../include/xplugin_cleanup.inc
76