diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-11 14:11:57 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-11 14:11:57 +0300 |
commit | 5a2ccea2e763952eeca3ea3ecb3b652743271f04 (patch) | |
tree | 2856c25fe5117516cd87405eab55ed1e0f32f256 /mysql-test/r/metadata.result | |
parent | 5ebd07b0f6e3e6a37b8847a0e05753edc5025f59 (diff) | |
download | mariadb-git-5a2ccea2e763952eeca3ea3ecb3b652743271f04.tar.gz |
Bug #11744875: 4082: integer lengths cause truncation with distinct concat
and innodb
The 5.5 version of the patch.
The server doesn't restrict the data that can be inserted into integer columns
with explicitly specified length that's smaller than what the type can handle,
e.g. 1234 can be inserted into an INT(2) column just fine.
Thus, when calcualting the maximum width of expressions involving such
restricted integer columns we need to use the implicit maximum width of
the field instead of the explicitly speficied one.
Fixed the server to use the implicit maximum in such cases and made sure
the implicit maximum is addjusted the same way as the explicit one wrt
signedness.
Fixed several test case results (ctype_*.result, metadata.result and
type_ranges.result) to reflect the extended column widths.
Added a regression test case in distinct.test.
Note : this is the behavior preserving fix that makes 5.5 behave as 5.1 and
earlier. In the mysql trunk we'll add a insert time check for the explict
maximum size.
Diffstat (limited to 'mysql-test/r/metadata.result')
-rw-r--r-- | mysql-test/r/metadata.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 480cec792c0..3418348854f 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -126,7 +126,7 @@ renamed 1 select * from v3 where renamed=1 group by renamed; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def v3 v3 renamed renamed 8 11 0 Y 32896 0 63 +def v3 v3 renamed renamed 8 12 0 Y 32896 0 63 renamed drop table t1; drop view v1,v2,v3; |