~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to conf/locking.yy

initial import from internal tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# The purpose of this test is to exercise anything related to table locking:
 
3
#
 
4
# DDL, FLUSH, LOCK/UNLOCK, transactions
 
5
#
 
6
 
7
 
 
8
query:
 
9
        ddl | dml | lock |
 
10
        ddl | dml | lock |
 
11
        ddl | dml | lock |
 
12
        ddl | dml | lock |
 
13
        ddl | dml | lock |
 
14
        ddl | dml | lock |
 
15
        ddl | dml | lock |
 
16
        flush | transaction;
 
17
 
 
18
transaction:
 
19
        START TRANSACTION | COMMIT | ROLLBACK | SAVEPOINT A | ROLLBACK TO SAVEPOINT A ;
 
20
 
 
21
ddl:
 
22
        ALTER online ignore TABLE _table ENGINE = engine ;
 
23
 
 
24
dml:
 
25
        PREPARE st1 FROM " dml2 " ; EXECUTE st1 ; DEALLOCATE PREPARE st1 |
 
26
        dml2;
 
27
 
 
28
dml2:
 
29
        union | select | insert_replace | update | delete ;
 
30
 
 
31
union:
 
32
        select UNION select ;
 
33
 
 
34
select:
 
35
        SELECT high_priority sql_buffer_result sql_cache A . _field
 
36
        FROM _table AS A LEFT JOIN _table AS B USING (`pk`)
 
37
        LIMIT _digit
 
38
#       procedure
 
39
#       into
 
40
        for_update_lock_in_share_mode;
 
41
 
 
42
procedure:
 
43
        PROCEDURE ANALYSE(10, 2000);
 
44
 
 
45
into:
 
46
        INTO OUTFILE _tmpnam | 
 
47
        INTO DUMPFILE _tmpnam ;
 
48
#       INTO _letter ;
 
49
 
 
50
for_update_lock_in_share_mode:
 
51
        | FOR UPDATE | LOCK IN SHARE MODE ;
 
52
 
 
53
insert_replace:
 
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 ;
 
56
 
 
57
insert_replace2:
 
58
        INSERT | REPLACE ;
 
59
 
 
60
on_duplicate_key_update:
 
61
        | ON DUPLICATE KEY UPDATE _field = _digit ;
 
62
 
 
63
delete:
 
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 ;
 
66
 
 
67
update:
 
68
        UPDATE low_priority ignore _table SET _field = _digit WHERE `pk` > _digit LIMIT _digit ;
 
69
 
 
70
quick:
 
71
        | QUICK ;
 
72
 
 
73
engine:
 
74
        MEMORY | MyISAM | InnoDB ;
 
75
 
 
76
online:
 
77
        ONLINE | ;
 
78
 
 
79
lock:
 
80
        LOCK TABLE lock_list |
 
81
        UNLOCK TABLES ;
 
82
 
 
83
flush:
 
84
        FLUSH TABLES WITH READ LOCK |
 
85
        FLUSH TABLE _table , _table ;
 
86
 
 
87
lock_list:
 
88
        lock_item |
 
89
        lock_item , lock_item ;
 
90
 
 
91
lock_item:
 
92
        _table lock_type ;
 
93
 
 
94
lock_type:
 
95
        READ local |
 
96
        low_priority WRITE ;
 
97
 
 
98
local:
 
99
        LOCAL | ;
 
100
 
 
101
low_priority:
 
102
        LOW_PRIORITY | ;
 
103
 
 
104
high_priority:
 
105
        HIGH_PRIORITY | ;
 
106
 
 
107
sql_buffer_result:
 
108
        SQL_BUFFER_RESULT | ;
 
109
 
 
110
sql_cache:
 
111
        SQL_CACHE | SQL_NO_CACHE | ;
 
112
 
 
113
low_priority_delayed_high_priority:
 
114
        LOW_PRIORITY | DELAYED | HIGH_PRIORITY ;
 
115
 
 
116
ignore:
 
117
        IGNORE | ;