~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_conv.cc

  • Committer: Monty Taylor
  • Date: 2008-07-30 18:03:54 UTC
  • mto: (236.1.7 codestyle)
  • mto: This revision was merged to the branch mainline in revision 243.
  • Revision ID: monty@inaugust.com-20080730180354-c428jes5a89ob7d7
Ding dong include is dead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
  field->reset();
125
125
  if (field->table->in_use->count_cuted_fields == CHECK_FIELD_WARN)
126
126
  {
127
 
    field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
 
127
    field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1);
128
128
    return 0;
129
129
  }
130
130
  if (!field->table->in_use->no_errors)
230
230
  if (*copy->from_null_ptr & copy->from_bit)
231
231
  {
232
232
    copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
233
 
                                WARN_DATA_TRUNCATED, 1);
 
233
                                ER_WARN_DATA_TRUNCATED, 1);
234
234
    copy->to_field->reset();
235
235
  }
236
236
  else
372
372
                     MY_SEQ_SPACES) < copy->from_length - copy->to_length)
373
373
  {
374
374
    copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
375
 
                                WARN_DATA_TRUNCATED, 1);
 
375
                                ER_WARN_DATA_TRUNCATED, 1);
376
376
  }
377
377
}
378
378
 
403
403
                     MY_SEQ_SPACES) < (copy->from_length - copy_length))
404
404
  {
405
405
    copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
406
 
                                WARN_DATA_TRUNCATED, 1);
 
406
                                ER_WARN_DATA_TRUNCATED, 1);
407
407
  }
408
408
 
409
409
  if (copy_length < copy->to_length)
441
441
    length=copy->to_length - 1;
442
442
    if (copy->from_field->table->in_use->count_cuted_fields)
443
443
      copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
444
 
                                  WARN_DATA_TRUNCATED, 1);
 
444
                                  ER_WARN_DATA_TRUNCATED, 1);
445
445
  }
446
446
  *(uchar*) copy->to_ptr= (uchar) length;
447
447
  memcpy(copy->to_ptr+1, copy->from_ptr + 1, length);
462
462
  {
463
463
    if (current_thd->count_cuted_fields)
464
464
      copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
465
 
                                  WARN_DATA_TRUNCATED, 1);
 
465
                                  ER_WARN_DATA_TRUNCATED, 1);
466
466
  }
467
467
  *copy->to_ptr= (uchar) length;
468
468
  memcpy(copy->to_ptr + 1, from_ptr, length);
477
477
    length=copy->to_length-HA_KEY_BLOB_LENGTH;
478
478
    if (copy->from_field->table->in_use->count_cuted_fields)
479
479
      copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
480
 
                                  WARN_DATA_TRUNCATED, 1);
 
480
                                  ER_WARN_DATA_TRUNCATED, 1);
481
481
  }
482
482
  int2store(copy->to_ptr,length);
483
483
  memcpy(copy->to_ptr+HA_KEY_BLOB_LENGTH, copy->from_ptr + HA_KEY_BLOB_LENGTH,
499
499
  {
500
500
    if (current_thd->count_cuted_fields)
501
501
      copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
502
 
                                  WARN_DATA_TRUNCATED, 1);
 
502
                                  ER_WARN_DATA_TRUNCATED, 1);
503
503
  }  
504
504
  int2store(copy->to_ptr, length);
505
505
  memcpy(copy->to_ptr+HA_KEY_BLOB_LENGTH, from_beg, length);