1
drop table if exists t1;
2
## Creating new table ##
5
id INT NOT NULL auto_increment,
9
'#--------------------FN_DYNVARS_003_01-------------------------#'
10
## Setting variable's value to 0 i.e false ##
12
'#--------------------FN_DYNVARS_003_02-------------------------#'
13
## Creating new connection ##
14
## Checking value of variable after opening new connection ##
18
## Setting value of variable to zero and inserting some rows ##
20
INSERT into t1(name) values('Record_1');
21
INSERT into t1(name) values('Record_2');
26
## Creating another connection and verifying records in table ##
27
## New Connection test_con2 ##
30
'#--------------------FN_DYNVARS_003_03-------------------------#'
31
## Verifying behavior of variable by commiting rows in test_con1 ##
32
## Connecting with connection # 01 ##
38
## New Connection test_con2 ##
39
## Now verifying records in table from connection # 02 ##
44
'#--------------------FN_DYNVARS_003_04-------------------------#'
45
## Connecting to connection # 01 ##
50
## Updating value of first row ##
51
UPDATE t1 set name = 'Record_12' where name = 'Record_1';
56
## Connecting to connecting # 02 and verifying effect of update query ##
61
## Now connecting with connection # 01 and using ROLLBACK after it ##
67
'#--------------------FN_DYNVARS_003_05-------------------------#'
68
## Connecting with connection # 01 ##
69
INSERT into t1(name) values('Record_3');
70
## Connection test_con2 ##
71
## Now verifying records in table from connection # 02 and changing value ##
72
## of autocommit to true ##
78
INSERT into t1(name) values('Record_4');
79
INSERT into t1(name) values('Record_5');
86
## Connecting with connection # 01 and inserting few records ##
92
'Bug#35373: Records donot get committed in transaction on switching connections'
93
INSERT into t1(name) values('Record_6');
100
## Now verifying the effect of these new records in second connection ##
107
## Dropping table t1 ##
109
## Disconnecting both connections ##