diff options
author | Martin Hansson <mhansson@mysql.com> | 2009-06-16 16:36:15 +0200 |
---|---|---|
committer | Martin Hansson <mhansson@mysql.com> | 2009-06-16 16:36:15 +0200 |
commit | aa8677bc32fd80ee9ab08717369d23a4ef011717 (patch) | |
tree | 4e202e6d5e7d51dc49fb2e560a3ccd568144b324 /mysql-test/r/func_set.result | |
parent | ed7f0f3023041cc1749077ad45cd5a8bb8fa784e (diff) | |
download | mariadb-git-aa8677bc32fd80ee9ab08717369d23a4ef011717.tar.gz |
Bug#45168: assertion with convert() and empty set value
The assertion in String::copy was added in order to avoid
valgrind errors when the destination was the same as the source.
Eased restriction to allow for the case when str == NULL.
mysql-test/r/func_set.result:
Bug#45168: Test result
mysql-test/t/func_set.test:
Bug#45168: Test case
sql/item_strfunc.cc:
Bug#45168: Code cleanup and grammar correction in comment
sql/sql_string.cc:
Bug#45168: Fix
Diffstat (limited to 'mysql-test/r/func_set.result')
-rw-r--r-- | mysql-test/r/func_set.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index ecdc35ac4cd..14ebc8203ec 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -146,3 +146,16 @@ NULL 0 0 drop table t1; +CREATE TABLE t1( a SET('a', 'b', 'c') ); +CREATE TABLE t2( a SET('a', 'b', 'c') ); +INSERT INTO t1 VALUES ('d'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT INTO t2 VALUES (''); +SELECT CONVERT( a USING latin1 ) FROM t1; +CONVERT( a USING latin1 ) + +SELECT CONVERT( a USING latin1 ) FROM t2; +CONVERT( a USING latin1 ) + +DROP TABLE t1, t2; |