diff options
author | unknown <bar@mysql.com> | 2004-09-07 15:42:19 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-09-07 15:42:19 +0500 |
commit | 95f42e1da29deb3fb2843c5066ea8692e7bdca08 (patch) | |
tree | 256da1b65d60ac047776d8ed3c5bd1d23a364457 /mysql-test/r/cast.result | |
parent | 7e7dfcccd64472c9d46b319e997181d0354b668c (diff) | |
download | mariadb-git-95f42e1da29deb3fb2843c5066ea8692e7bdca08.tar.gz |
Bug #5228 ORDER BY CAST(enumcol) sorts incorrectly under certain conditions
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r-- | mysql-test/r/cast.result | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 6564a3e392b..ccf75f68e88 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -155,3 +155,26 @@ NULL select cast(NULL as BINARY); cast(NULL as BINARY) NULL +CREATE TABLE t1 (a enum ('aac','aab','aaa') not null); +INSERT INTO t1 VALUES ('aaa'),('aab'),('aac'); +SELECT a, CAST(a AS CHAR) FROM t1 ORDER BY CAST(a AS UNSIGNED) ; +a CAST(a AS CHAR) +aac aac +aab aab +aaa aaa +SELECT a, CAST(a AS CHAR(3)) FROM t1 ORDER BY CAST(a AS CHAR(2)), a; +a CAST(a AS CHAR(3)) +aac aac +aab aab +aaa aaa +SELECT a, CAST(a AS UNSIGNED) FROM t1 ORDER BY CAST(a AS CHAR) ; +a CAST(a AS UNSIGNED) +aaa 3 +aab 2 +aac 1 +SELECT a, CAST(a AS CHAR(2)) FROM t1 ORDER BY CAST(a AS CHAR(3)), a; +a CAST(a AS CHAR(2)) +aaa aa +aab aa +aac aa +DROP TABLE t1; |