| 1 |
# Check that path to the specific test program has been setup |
| 2 |
if (!$MYSQL_BUG25714) |
| 3 |
{ |
| 4 |
skip Need bug25714 test program; |
| 5 |
} |
| 6 |
|
| 7 |
source suite/federated/include/federated.inc; |
| 8 |
|
| 9 |
connection master; |
| 10 |
# Disable concurrent inserts to avoid test failures when reading |
| 11 |
# data from concurrent connections (insert might return before |
| 12 |
# the data is actually in the table). |
| 13 |
SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT; |
| 14 |
SET @@GLOBAL.CONCURRENT_INSERT= 0; |
| 15 |
|
| 16 |
connection slave; |
| 17 |
SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT; |
| 18 |
SET @@GLOBAL.CONCURRENT_INSERT= 0; |
| 19 |
--disable_warnings |
| 20 |
DROP TABLE IF EXISTS federated.bug_13118_table; |
| 21 |
--enable_warnings |
| 22 |
|
| 23 |
CREATE TABLE federated.t1 ( |
| 24 |
`id` int auto_increment primary key, |
| 25 |
`value` int |
| 26 |
) ENGINE=MyISAM; |
| 27 |
INSERT INTO federated.t1 SET value=1; |
| 28 |
INSERT INTO federated.t1 SET value=2; |
| 29 |
INSERT INTO federated.t1 SET value=2; |
| 30 |
|
| 31 |
connection master; |
| 32 |
--disable_warnings |
| 33 |
DROP TABLE IF EXISTS federated.t1; |
| 34 |
--enable_warnings |
| 35 |
|
| 36 |
--replace_result $SLAVE_MYPORT SLAVE_PORT |
| 37 |
eval CREATE TABLE federated.t1 ( |
| 38 |
`id` int auto_increment primary key, |
| 39 |
`value` int |
| 40 |
) ENGINE=FEDERATED |
| 41 |
CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1'; |
| 42 |
|
| 43 |
SELECT * from federated.t1; |
| 44 |
|
| 45 |
INSERT INTO federated.t1 SET value=4; |
| 46 |
|
| 47 |
SELECT LAST_INSERT_ID(); |
| 48 |
|
| 49 |
--exec $MYSQL_BUG25714 $SLAVE_MYPORT |
| 50 |
--exec $MYSQL_BUG25714 $MASTER_MYPORT |
| 51 |
|
| 52 |
SELECT * from federated.t1; |
| 53 |
|
| 54 |
DROP TABLE federated.t1; |
| 55 |
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT; |
| 56 |
connection slave; |
| 57 |
DROP TABLE federated.t1; |
| 58 |
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
source suite/federated/include/federated_cleanup.inc; |