2
# The purpose of this test is to exercise anything related to table locking:
4
# DDL, FLUSH, LOCK/UNLOCK, transactions
19
START TRANSACTION | COMMIT | ROLLBACK | SAVEPOINT A | ROLLBACK TO SAVEPOINT A ;
22
ALTER online ignore TABLE _table ENGINE = engine ;
25
PREPARE st1 FROM " dml2 " ; EXECUTE st1 ; DEALLOCATE PREPARE st1 |
29
union | select | insert_replace | update | delete ;
35
SELECT high_priority sql_buffer_result sql_cache A . _field
36
FROM _table AS A LEFT JOIN _table AS B USING (`pk`)
40
for_update_lock_in_share_mode;
43
PROCEDURE ANALYSE(10, 2000);
46
INTO OUTFILE _tmpnam |
47
INTO DUMPFILE _tmpnam ;
50
for_update_lock_in_share_mode:
51
| FOR UPDATE | LOCK IN SHARE MODE ;
54
insert_replace2 low_priority_delayed_high_priority INTO _table ( _field ) select on_duplicate_key_update |
55
insert_replace2 low_priority_delayed_high_priority INTO _table ( _field ) VALUES ( _digit ) on_duplicate_key_update ;
60
on_duplicate_key_update:
61
| ON DUPLICATE KEY UPDATE _field = _digit ;
64
DELETE low_priority quick ignore FROM _table WHERE `pk` > _digit LIMIT _digit |
65
DELETE low_priority quick ignore A , B FROM _table AS A LEFT JOIN _table AS B USING (`pk`) LIMIT _digit ;
68
UPDATE low_priority ignore _table SET _field = _digit WHERE `pk` > _digit LIMIT _digit ;
74
MEMORY | MyISAM | InnoDB ;
80
LOCK TABLE lock_list |
84
FLUSH TABLES WITH READ LOCK |
85
FLUSH TABLE _table , _table ;
89
lock_item , lock_item ;
108
SQL_BUFFER_RESULT | ;
111
SQL_CACHE | SQL_NO_CACHE | ;
113
low_priority_delayed_high_priority:
114
LOW_PRIORITY | DELAYED | HIGH_PRIORITY ;