summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-29 23:53:07 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-29 23:53:07 +0100
commit49e3024c1a1e950e0fe9fecbccfd13c9728a5b82 (patch)
tree2e5fd2ea8d04d6274f3da86ac5b02bed3f38bb8a /sql/field_conv.cc
parentcadef27521616ba6caea1556ae053a09e3bde6d8 (diff)
parent4b13e338241778aefad46fde158a4cb99db083e1 (diff)
downloadmariadb-git-49e3024c1a1e950e0fe9fecbccfd13c9728a5b82.tar.gz
Merge 192.168.0.5:mysql/mysql-5.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint client/mysqltest.c: Auto merged mysql-test/r/func_misc.result: Auto merged mysql-test/r/mysql.result: Auto merged mysql-test/t/mysql.test: Auto merged sql/field_conv.cc: Auto merged sql/handler.cc: Auto merged sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 593044ce7f0..5fde5ecb2e8 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -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);
}