1 --source include/have_partition.inc
2 SET @
auto= @@global.autocommit;
3 SET @@global.autocommit= off;
4 SET @iso= @@global.tx_isolation;
5 SET @@global.tx_isolation=
'repeatable-read';
6 SET @completion= @@global.completion_type;
7 SET @@global.completion_type=
'no_chain';
8 SET @lock_timeout= @@global.lock_wait_timeout;
9 SET @@global.lock_wait_timeout= 1;
10 SELECT @@global.lock_wait_timeout;
11 SET @innodb_lock_timeout= @@global.innodb_lock_wait_timeout;
12 SET @@global.innodb_lock_wait_timeout= 1;
16 --echo # Additional tests
for WL#5217 by QA, testplan 1.1
19 --source suite/parts/inc/partition-dml_cr_tab.inc
20 --source suite/parts/inc/partition-dml_ins_tab.inc
24 GRANT ALL PRIVILEGES ON
test.* TO test_user_1 IDENTIFIED BY
'testpw';
25 GRANT ALL PRIVILEGES ON
test.* TO test_user_2 IDENTIFIED BY
'testpw';
26 GRANT ALL PRIVILEGES ON
test.* TO test_user_3 IDENTIFIED BY
'testpw';
28 connect (session1, localhost, test_user_1,
'testpw',
test);
29 PREPARE st1 FROM
'UPDATE t1 PARTITION (`p0-29`) SET b=''p0-29-upd-1'' WHERE a BETWEEN 0 AND 9' ;
31 connect (session2, localhost, test_user_2,
'testpw',
test);
32 PREPARE st2 FROM
'UPDATE t1 PARTITION (`p0-29`) SET b=? WHERE a BETWEEN 20 AND 29' ;
38 SET @var1=
'p0-29-upd-2';
39 if ($engine == MyISAM)
41 EXECUTE st2 USING @var1;
43 if ($engine == InnoDB)
45 --error ER_LOCK_WAIT_TIMEOUT
46 EXECUTE st2 USING @var1;
53 SET @var1=
'p0-29-upd-2';
54 EXECUTE st2 USING @var1;
57 SELECT * FROM t1 PARTITION (`p0-29`);
58 DEALLOCATE PREPARE st1;
61 SELECT * FROM t1 PARTITION (`p0-29`);
63 DEALLOCATE PREPARE st2;
69 SELECT * FROM t1 PARTITION (`p0-29`);
72 DROP USER test_user_1;
73 DROP USER test_user_2;
74 DROP USER test_user_3;
76 SET @@global.autocommit= @
auto;
77 SET @@global.tx_isolation= @iso;
78 SET @@global.completion_type= @completion;
79 SET @@global.lock_wait_timeout= @lock_timeout;
80 SET @@global.innodb_lock_wait_timeout= @innodb_lock_timeout;