diff options
author | unknown <bar@mysql.com> | 2004-10-28 15:21:20 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-10-28 15:21:20 +0500 |
commit | 5be6c328f5a9f78f37176bbbd88a538fa3b65fe9 (patch) | |
tree | 89a7308e5767cf2511c3186f862a93842a18065d /mysql-test/t | |
parent | 9b041682cc605400d0ccf70ad8f3e98c829b1aab (diff) | |
download | mariadb-git-5be6c328f5a9f78f37176bbbd88a538fa3b65fe9.tar.gz |
Produce a "truncated" warning if a value cannot be converted
into the column character set on INSERT/UPDATE.
sql/sql_string.cc:
New argument to report an error.
sql/sql_string.h:
New argument to report an error.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 1 | ||||
-rw-r--r-- | mysql-test/t/ctype_recoding.test | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index eb35aa90fe2..e46027ae8d9 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -207,6 +207,7 @@ alter table t1 change a a text character set cp1251; select a,hex(a) from t1; alter table t1 change a a char(10) character set koi8r; select a,hex(a) from t1; +delete from t1; # # Test ALTER TABLE .. CHARACTER SET .. diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index 82d0643b577..5f417352d95 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -121,3 +121,13 @@ CREATE TABLE `goodÐÌÏÈÏ` (a int); SET NAMES utf8; --error 1300 CREATE TABLE `goodÐÌÏÈÏ` (a int); + + +# +# Test that we produce a warnign when conversion loses data. +# +set names latin1; +create table t1 (a char(10) character set koi8r, b text character set koi8r); +insert into t1 values ('test','test'); +insert into t1 values ('ÊÃÕË','ÊÃÕË'); +drop table t1; |