| 1 |
# The include statement below is a temp one for tests that are yet to |
| 2 |
#be ported to run with InnoDB, |
| 3 |
#but needs to be kept for tests that would need MyISAM in future. |
| 4 |
--source include/force_myisam_default.inc |
| 5 |
|
| 6 |
--source include/not_embedded.inc |
| 7 |
--source suite/perfschema_stress/include/settings.inc |
| 8 |
|
| 9 |
let $have_table= `SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES |
| 10 |
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`; |
| 11 |
|
| 12 |
if (!$have_table) { |
| 13 |
--source suite/perfschema_stress/t/setup.test |
| 14 |
} |
| 15 |
|
| 16 |
--replace_result $num_stress_rows <num_stress_rows> |
| 17 |
eval SET @rowid = ROUND(RAND() * $num_stress_rows); |
| 18 |
|
| 19 |
let $conn_id= `SELECT CONNECTION_ID()`; |
| 20 |
let $conn_nr= conn_$conn_id; |
| 21 |
|
| 22 |
START TRANSACTION; |
| 23 |
UPDATE t1 SET b = 'changed' WHERE id=@rowid; |
| 24 |
SELECT b FROM t1 WHERE id=@rowid; |
| 25 |
COMMIT; |
| 26 |
|
| 27 |
START TRANSACTION; |
| 28 |
DELETE FROM t1 WHERE id=@rowid; |
| 29 |
INSERT INTO t1 (id, b) VALUES (@rowid, 'newly_inserted'); |
| 30 |
SELECT b FROM t1 WHERE id=@rowid; |
| 31 |
COMMIT; |
| 32 |
|
| 33 |
--replace_result $conn_nr <conn_nr> |
| 34 |
eval CREATE TABLE tw_$conn_nr AS SELECT * FROM t1; |
| 35 |
|
| 36 |
--replace_result $conn_nr <conn_nr> |
| 37 |
eval DROP TABLE tw_$conn_nr; |