Debian Codegraph @

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

raw
1 ## verify successful connection when global autocommit is off
2
3 --source ../include/have_performance_schema_threads.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/connection_autocommit_off.xpl
9 -->import assert_select.macro
10 -->quiet
11
12 callmacro Assert_select
13 value
14 0
15 SELECT @@autocommit as value;
16
17 callmacro Assert_select
18 autocommit
19 NO
20 SELECT autocommit FROM performance_schema.events_transactions_current JOIN performance_schema.threads USING(thread_id) WHERE processlist_id=connection_id();
21
22 callmacro Assert_select
23 state
24 COMMITTED
25 SELECT state FROM performance_schema.events_transactions_current JOIN performance_schema.threads USING(thread_id) WHERE processlist_id=connection_id();
26
27 EOF
28
29 SET GLOBAL autocommit = 0;
30
31 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/connection_autocommit_off.xpl 2>&1
32
33
34
35
36 ## Cleanup
37 SET GLOBAL autocommit = DEFAULT;
38 --source ../include/xplugin_cleanup.inc