diff options
author | unknown <jimw@rama.(none)> | 2006-07-21 13:28:42 -0700 |
---|---|---|
committer | unknown <jimw@rama.(none)> | 2006-07-21 13:28:42 -0700 |
commit | d37456f745ee64c85db54c7327c1aeefd5c582ef (patch) | |
tree | 229d1e059dc60b7b94c0c65216dbd2689ce6940c /mysql-test/t/union.test | |
parent | dc50ce997083b4f3d3e4ab237c6a1f5e11cfd90f (diff) | |
download | mariadb-git-d37456f745ee64c85db54c7327c1aeefd5c582ef.tar.gz |
Bug #16881: password() and union select
This was only demonstrated by the use of PASSWORD(), it was not related to
that function at all. The calculation of the size of a field in the results
of a UNION did not take into account the possible growth of a string field
when being converted to the aggregated character set.
mysql-test/r/union.result:
Add new results
mysql-test/t/union.test:
Add new regression test
sql/item.cc:
Fix calculation of max_length when figuring out the type of a column in
a UNION. It needs to take into account any expansion of field size due to
charset conversions.
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 7dfe4ac482f..b300cf91a22 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -841,3 +841,10 @@ drop table t1; (select avg(1)) union (select avg(1)) union (select avg(1)) union (select avg(1)) union (select avg(1)) union (select avg(1)); +# +# Bug #16881: password() and union select +# (The issue was poor handling of character set aggregation.) +# +select _utf8'12' union select _latin1'12345'; + +--echo End of 5.0 tests |