~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/transaction_services.cc

  • Committer: Monty Taylor
  • Date: 2010-12-06 21:17:06 UTC
  • mto: (1977.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1980.
  • Revision ID: mordred@inaugust.com-20101206211706-iiuzzkxhh3fm10zf
Add ability to add a validation function to any sys_var. duh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1213
1213
      }
1214
1214
      else
1215
1215
      {
 
1216
        /* append this INSERT query string */
 
1217
        if (in_session->variables.replicate_query)
 
1218
        {
 
1219
          string s(statement->sql());
 
1220
          if (not s.empty())
 
1221
          {
 
1222
            s.append(" ; ");
 
1223
            s.append(in_session->getQueryString()->c_str());
 
1224
            statement->set_sql(s);
 
1225
          }
 
1226
          else
 
1227
            statement->set_sql(in_session->getQueryString()->c_str());
 
1228
        }
 
1229
 
1216
1230
        /* carry forward the existing segment id */
1217
1231
        const message::InsertData &current_data= statement->insert_data();
1218
1232
        *next_segment_id= current_data.segment_id();
1400
1414
    {
1401
1415
      if (useExistingUpdateHeader(*statement, in_table, old_record, new_record))
1402
1416
      {
 
1417
        /* append this UPDATE query string */
 
1418
        if (in_session->variables.replicate_query)
 
1419
        {
 
1420
          string s(statement->sql());
 
1421
          if (not s.empty())
 
1422
          {
 
1423
            s.append(" ; ");
 
1424
            s.append(in_session->getQueryString()->c_str());
 
1425
            statement->set_sql(s);
 
1426
          }
 
1427
          else
 
1428
            statement->set_sql(in_session->getQueryString()->c_str());
 
1429
        }
 
1430
 
1403
1431
        /* carry forward the existing segment id */
1404
1432
        const message::UpdateData &current_data= statement->update_data();
1405
1433
        *next_segment_id= current_data.segment_id();
1759
1787
      }
1760
1788
      else
1761
1789
      {
 
1790
        /* append this DELETE query string */
 
1791
        if (in_session->variables.replicate_query)
 
1792
        {
 
1793
          string s(statement->sql());
 
1794
          if (not s.empty())
 
1795
          {
 
1796
            s.append(" ; ");
 
1797
            s.append(in_session->getQueryString()->c_str());
 
1798
            statement->set_sql(s);
 
1799
          }
 
1800
          else
 
1801
            statement->set_sql(in_session->getQueryString()->c_str());
 
1802
        }
 
1803
 
1762
1804
        /* carry forward the existing segment id */
1763
1805
        const message::DeleteData &current_data= statement->delete_data();
1764
1806
        *next_segment_id= current_data.segment_id();