diff options
author | unknown <sanja@montyprogram.com> | 2013-08-20 14:48:29 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2013-08-20 14:48:29 +0300 |
commit | 35b2883643e337a8ec9c3cf7494363ae9889119c (patch) | |
tree | eb2e7d833ed965b30f8b8485cfdac31abfea6c97 /mysql-test/r/select.result | |
parent | dafa458262fb47a2c9534bcc36088b15e26307c2 (diff) | |
parent | b59738a598569ace75be5e63b7ed6ca69afe6ebc (diff) | |
download | mariadb-git-35b2883643e337a8ec9c3cf7494363ae9889119c.tar.gz |
merge 5.5 -> 10.0-base
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index c086a62275a..806afb1c843 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -5358,3 +5358,38 @@ WHERE c = a AND a b c DROP TABLE t1, t2; End of 5.3 tests +# +# mysql BUG#1271 Undefined variable in PASSWORD() +# function is not handled correctly +# +create table t1 ( +name VARCHAR(50) NOT NULL PRIMARY KEY, +pw VARCHAR(41) NOT NULL); +INSERT INTO t1 (name, pw) +VALUES ('tom', PASSWORD('my_pw')); +SET @pass='my_pw'; +SET @wrong='incorrect'; +select * from t1; +name pw +tom *F305E8EC27734F687F2EB6EC03CF0F7AF27C18E1 +select length(PASSWORD(@pass)); +length(PASSWORD(@pass)) +41 +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass); +name +tom +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong); +name +SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined); +name +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@pass)) +tom +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@wrong)) +NULL +select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)); +(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined)) +NULL +drop table t1; +End of 10.0 tests |