~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to sql/log_event_old.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
342
342
  if (table->s->null_bytes > 0)
343
343
  {
344
344
    for (int i = 0 ; i < 2 ; ++i)
345
 
    {
346
 
      saved_x[i]= table->record[i][0];
347
 
      saved_filler[i]= table->record[i][table->s->null_bytes - 1];
348
 
      table->record[i][0]|= 1U;
349
 
      table->record[i][table->s->null_bytes - 1]|=
350
 
        256U - (1U << table->s->last_null_bit_pos);
 
345
    { 
 
346
      /* 
 
347
        If we have an X bit then we need to take care of it.
 
348
      */
 
349
      if (!(table->s->db_options_in_use & HA_OPTION_PACK_RECORD))
 
350
      {
 
351
        saved_x[i]= table->record[i][0];
 
352
        table->record[i][0]|= 1U;
 
353
      }
 
354
      
 
355
      /*
 
356
         If (last_null_bit_pos == 0 && null_bytes > 1), then:
 
357
 
 
358
         X bit (if any) + N nullable fields + M Field_bit fields = 8 bits 
 
359
 
 
360
         Ie, the entire byte is used.
 
361
      */
 
362
      if (table->s->last_null_bit_pos > 0)
 
363
      {
 
364
        saved_filler[i]= table->record[i][table->s->null_bytes - 1];
 
365
        table->record[i][table->s->null_bytes - 1]|=
 
366
          256U - (1U << table->s->last_null_bit_pos);
 
367
      }
351
368
    }
352
369
  }
353
370
 
387
404
  {
388
405
    for (int i = 0 ; i < 2 ; ++i)
389
406
    {
390
 
      table->record[i][0]= saved_x[i];
391
 
      table->record[i][table->s->null_bytes - 1]= saved_filler[i];
 
407
      if (!(table->s->db_options_in_use & HA_OPTION_PACK_RECORD))
 
408
        table->record[i][0]= saved_x[i];
 
409
 
 
410
      if (table->s->last_null_bit_pos > 0)
 
411
        table->record[i][table->s->null_bytes - 1]= saved_filler[i];
392
412
    }
393
413
  }
394
414