Test that session variable scope doesn't span multiple sessions.
This commit is contained in:
parent
bdefa5c3c8
commit
835c5b3915
@ -169,6 +169,8 @@ else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
# Disable autocommit in the first session and then test in new session that
|
||||
# it is again enabled.
|
||||
TINPUT=test_autocommit_disabled2.sql
|
||||
TRETVAL=1
|
||||
a=`$RUNCMD < ./$TINPUT`
|
||||
@ -178,3 +180,14 @@ else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
TINPUT=set_autocommit_disabled.sql
|
||||
`$RUNCMD < ./$TINPUT`
|
||||
TINPUT=test_after_autocommit_disabled.sql
|
||||
TRETVAL=$TMASTER_ID
|
||||
a=`$RUNCMD < ./$TINPUT`
|
||||
if [ "$a" == "$TRETVAL" ]; then
|
||||
echo "$TINPUT FAILED, return value $a when it was not accetable">>$TLOG;
|
||||
else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
create table t1 (id integer);
|
||||
set autocommit=0; -- open transaction
|
||||
begin;
|
||||
insert into t1 values(1); -- write to master
|
||||
commit;
|
@ -0,0 +1,2 @@
|
||||
use test;
|
||||
select @@server_id;
|
Loading…
x
Reference in New Issue
Block a user