diff options
author | Alexander Barkov <bar@mysql.com> | 2009-10-21 15:48:22 +0500 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2009-10-21 15:48:22 +0500 |
commit | dcb8bb23c29172949781f5214b8222505752de70 (patch) | |
tree | d2522e7182d47f0be16e18e95d3830f7ff496ce0 /sql/sql_table.cc | |
parent | 52701ff3277d6641994e6b76d84bb5903af48d59 (diff) | |
parent | de7d1abe9386c2e9df1a8c5f3b95f3cd57cc6c9f (diff) | |
download | mariadb-git-dcb8bb23c29172949781f5214b8222505752de70.tar.gz |
Merging mysql-next-mr-merge to mysql-next-mr.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 51ae335ed46..4d474738843 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2269,17 +2269,19 @@ bool check_duplicates_in_interval(const char *set_or_name, tmp.count--; if (find_type2(&tmp, (const char*)*cur_value, *cur_length, cs)) { + THD *thd= current_thd; + ErrConvString err(*cur_value, *cur_length, cs); if ((current_thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))) { my_error(ER_DUPLICATED_VALUE_IN_TYPE, MYF(0), - name,*cur_value,set_or_name); + name, err.ptr(), set_or_name); return 1; } - push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_NOTE, - ER_DUPLICATED_VALUE_IN_TYPE, - ER(ER_DUPLICATED_VALUE_IN_TYPE), - name,*cur_value,set_or_name); + push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_DUPLICATED_VALUE_IN_TYPE, + ER(ER_DUPLICATED_VALUE_IN_TYPE), + name, err.ptr(), set_or_name); (*dup_val_count)++; } } @@ -2665,7 +2667,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, interval->type_lengths[i], comma_buf, comma_length, NULL, 0)) { - my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "set", tmp->ptr()); + ErrConvString err(tmp->ptr(), tmp->length(), cs); + my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "set", err.ptr()); DBUG_RETURN(TRUE); } } |