~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/replication.rst

  • Committer: Marisa Plumb
  • Date: 2010-12-04 02:38:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1984.
  • Revision ID: marisa.plumb@gmail.com-20101204023829-2khzxh30wxi256db
updates to a few sql docs 

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