~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/replication.rst

Use List::begin()

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    default global value is FALSE which will not include the query in the
25
25
    messages. It can be controlled per session, as well. For example:
26
26
 
27
 
    ``drizzle> set @@replicate_query = 1;``
 
27
    .. code-block:: mysql
 
28
 
 
29
       drizzle> set @@replicate_query = 1;
 
30
 
 
31
    The stored query should be used as a guide only, and never executed
 
32
    on a slave to perform replication as this will lead to incorrect results.
28
33
 
29
34
Message Definitions
30
35
-------------------
121
126
of the Statement should construct the inner Statement subclass representing
122
127
a data change.
123
128
 
 
129
Statements are recorded seperatley as sometimes individual statements
 
130
have to be rolled back.
 
131
 
124
132
 
125
133
.. _bulk-operations:
126
134
 
158
166
It's easiest to understand this mechanism by following through a real-world
159
167
scenario.
160
168
 
161
 
Suppose the following table::
 
169
Suppose the following table:
 
170
 
 
171
.. code-block:: mysql
162
172
 
163
173
  CREATE TABLE test.person
164
174
  (
170
180
 
171
181
Also suppose that test.t1 contains 1 million records.
172
182
 
173
 
Next, suppose a client issues the SQL statement::
 
183
Next, suppose a client issues the SQL statement:
 
184
 
 
185
.. code-block:: mysql
174
186
 
175
187
  UPDATE test.person SET is_active = 'N';
176
188
 
210
222
Handling ROLLBACKs
211
223
------------------
212
224
 
 
225
Both transactions and individual statements may be rolled back.
 
226
 
213
227
When a transaction is rolled back, one of two things happen depending
214
228
on whether the transaction is made up of either a single Transaction
215
229
message, or if it is made up of multiple Transaction messages (e.g, bulk