From 00c1c19e9410a942ed7b2b49e7dc7916a9d8010f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Oct 2006 10:14:03 +0400 Subject: Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8 Problem: Too confusing error message when cannot convert between string and column character sets on INSERT and UPDATE. Fix: producing a better error message, instead of "Data too long" in such cases Additional changes: Adding "DROP TABLE IF EXISTS" into several tests to be safe against failures in previous tests. mysql-test/include/strict_autoinc.inc: Adding DROP TABLE to be safe against previous tests failure. mysql-test/r/ctype_recoding.result: Fixing test results mysql-test/r/ctype_utf8.result: Fixing test results mysql-test/r/fulltext.result: Fixing test results mysql-test/r/strict_autoinc_1myisam.result: Adding DROP TABLE to be safe against previous tests failure. mysql-test/r/strict_autoinc_2innodb.result: Adding DROP TABLE to be safe against previous tests failure. mysql-test/r/strict_autoinc_3heap.result: Adding DROP TABLE to be safe against previous tests failure. mysql-test/r/strict_autoinc_4bdb.result: Adding DROP TABLE to be safe against previous tests failure. mysql-test/r/strict_autoinc_5ndb.result: Adding DROP TABLE to be safe against previous tests failure. sql/field.cc: - producing better error messages than "DATA TRUNCATED" or "DATA TOO LONG" (in strict mode) in case of "not well formed source" and "cannot convert to field character set" - Performance improvements: copying directly to the target, instead of using an intermediate String. - Moving duplicate code into report_data_too_long() function. sql/sql_string.cc: Adding a new function to convert strings between character sets, but not more than "nchar" characters - a helper function for Field_string::store(), Field_varstring::store() and Field_blob::store(). sql/sql_string.h: Adding new function prototype. --- BitKeeper/etc/collapsed | 1 + 1 file changed, 1 insertion(+) (limited to 'BitKeeper') diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed index d4d681937a2..073379cd917 100644 --- a/BitKeeper/etc/collapsed +++ b/BitKeeper/etc/collapsed @@ -2,3 +2,4 @@ 44ec850ac2k4y2Omgr92GiWPBAVKGQ 44edb86b1iE5knJ97MbliK_3lCiAXA 44f33f3aj5KW5qweQeekY1LU0E9ZCg +452c6c6dAjuNghfc1ObZ_UQ5SCl85g -- cgit v1.2.1 From c755a7a1c48b236c57f996fbc3c07ccbc952424c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Nov 2006 12:30:01 +0400 Subject: Bug#22877 replication character sets get out of sync using replicate-wild-ignore-table Problem: changes in character set variables before an action on an replication-ignored table makes slave to forget new variable values. Fix: initialize one_shot variables only when 4.1 -> 5.x replication is running. mysql-test/r/rpl_ignore_table.result: Adding test case mysql-test/t/rpl_ignore_table-slave.opt: Don't replicate tables with names starting with "tmptbl" mysql-test/t/rpl_ignore_table.test: Adding test case sql/sql_parse.cc: Reset one_shot variables only if we do 4.1->5.x replication. In other cases we cannot do that: resetting thd->variables out of sync with st_relay_log_info::cached_charset, which makes st_relay_log_info::cached_charset_compare() not to notice character set related variables changes afterwards. --- BitKeeper/etc/collapsed | 1 + 1 file changed, 1 insertion(+) (limited to 'BitKeeper') diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed index fd33e4fc902..e9b9c6d81e0 100644 --- a/BitKeeper/etc/collapsed +++ b/BitKeeper/etc/collapsed @@ -3,3 +3,4 @@ 44edb86b1iE5knJ97MbliK_3lCiAXA 44f33f3aj5KW5qweQeekY1LU0E9ZCg 4513d8e4Af4dQWuk13sArwofRgFDQw +4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg -- cgit v1.2.1