~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

Fixed for null values in transaction log.

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
 
324
324
    const FieldMetadata &field_metadata= header.field_metadata(x);
325
325
 
326
 
    should_quote_field_value= shouldQuoteFieldValue(field_metadata.type());
 
326
    if (record.is_null(x))
 
327
    {
 
328
      should_quote_field_value= false;
 
329
    }
 
330
    else 
 
331
    {
 
332
      should_quote_field_value= shouldQuoteFieldValue(field_metadata.type());
 
333
    }
327
334
 
328
335
    if (should_quote_field_value)
329
336
      destination.push_back('\'');
341
348
    }
342
349
    else
343
350
    {
344
 
      destination.append(record.insert_value(x));
 
351
      if (record.is_null(x))
 
352
      {
 
353
        destination.append("NULL");
 
354
      }
 
355
      else 
 
356
      {
 
357
        destination.append(record.insert_value(x));
 
358
      } 
345
359
    }
346
360
 
347
361
    if (should_quote_field_value)
468
482
    destination.push_back(quoted_identifier);
469
483
    destination.push_back('=');
470
484
 
471
 
    should_quote_field_value= shouldQuoteFieldValue(field_metadata.type());
 
485
    if (record.is_null(x))
 
486
    {
 
487
      should_quote_field_value= false;
 
488
    }
 
489
    else 
 
490
    {
 
491
      should_quote_field_value= shouldQuoteFieldValue(field_metadata.type());
 
492
    }    
472
493
 
473
494
    if (should_quote_field_value)
474
495
      destination.push_back('\'');
486
507
    }
487
508
    else
488
509
    {
489
 
      destination.append(record.after_value(x));
 
510
      if (record.is_null(x))
 
511
      {
 
512
        destination.append("NULL");
 
513
      }
 
514
      else
 
515
      {
 
516
        destination.append(record.after_value(x));
 
517
      }
490
518
    }
491
519
 
492
520
    if (should_quote_field_value)