Merge 192.168.0.5:mysql/mysql-5.1-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
This commit is contained in:
msvensson@neptunus.(none) 2006-11-29 23:53:07 +01:00
commit b5603af7d5
420 changed files with 5554 additions and 2601 deletions

View file

@ -119,12 +119,12 @@ set_field_to_null(Field *field)
return 0;
}
field->reset();
if (current_thd->count_cuted_fields == CHECK_FIELD_WARN)
if (field->table->in_use->count_cuted_fields == CHECK_FIELD_WARN)
{
field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
return 0;
}
if (!current_thd->no_errors)
if (!field->table->in_use->no_errors)
my_error(ER_BAD_NULL_ERROR, MYF(0), field->field_name);
return -1;
}
@ -176,12 +176,12 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
field->table->auto_increment_field_not_null= FALSE;
return 0; // field is set in handler.cc
}
if (current_thd->count_cuted_fields == CHECK_FIELD_WARN)
if (field->table->in_use->count_cuted_fields == CHECK_FIELD_WARN)
{
field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_BAD_NULL_ERROR, 1);
return 0;
}
if (!current_thd->no_errors)
if (!field->table->in_use->no_errors)
my_error(ER_BAD_NULL_ERROR, MYF(0), field->field_name);
return -1;
}
@ -418,7 +418,7 @@ static void do_varstring1(Copy_field *copy)
if (length > copy->to_length- 1)
{
length=copy->to_length - 1;
if (current_thd->count_cuted_fields)
if (copy->from_field->table->in_use->count_cuted_fields)
copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
WARN_DATA_TRUNCATED, 1);
}
@ -433,7 +433,7 @@ static void do_varstring2(Copy_field *copy)
if (length > copy->to_length- HA_KEY_BLOB_LENGTH)
{
length=copy->to_length-HA_KEY_BLOB_LENGTH;
if (current_thd->count_cuted_fields)
if (copy->from_field->table->in_use->count_cuted_fields)
copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
WARN_DATA_TRUNCATED, 1);
}