Commit 92f09cd1 authored by Gleb Shchepa's avatar Gleb Shchepa

automerge 5.1-security --> 5.5-security (bug 57187)

parents 19a2f5cd a44b5444
...@@ -448,6 +448,12 @@ DROP TABLE t1; ...@@ -448,6 +448,12 @@ DROP TABLE t1;
select @v:=@v:=sum(1) from dual; select @v:=@v:=sum(1) from dual;
@v:=@v:=sum(1) @v:=@v:=sum(1)
1 1
CREATE TABLE t1(a DECIMAL(31,21));
INSERT INTO t1 VALUES (0);
SELECT (@v:=a) <> (@v:=1) FROM t1;
(@v:=a) <> (@v:=1)
1
DROP TABLE t1;
End of 5.1 tests End of 5.1 tests
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1)); CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));
......
...@@ -351,6 +351,18 @@ DROP TABLE t1; ...@@ -351,6 +351,18 @@ DROP TABLE t1;
select @v:=@v:=sum(1) from dual; select @v:=@v:=sum(1) from dual;
#
# Bug #57187: more user variable fun with multiple assignments and
# comparison in query
#
CREATE TABLE t1(a DECIMAL(31,21));
INSERT INTO t1 VALUES (0);
SELECT (@v:=a) <> (@v:=1) FROM t1;
DROP TABLE t1;
--echo End of 5.1 tests --echo End of 5.1 tests
# #
......
...@@ -4470,7 +4470,7 @@ my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val) ...@@ -4470,7 +4470,7 @@ my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val)
int2my_decimal(E_DEC_FATAL_ERROR, *(longlong*) value, 0, val); int2my_decimal(E_DEC_FATAL_ERROR, *(longlong*) value, 0, val);
break; break;
case DECIMAL_RESULT: case DECIMAL_RESULT:
val= (my_decimal *)value; my_decimal2decimal((my_decimal *) value, val);
break; break;
case STRING_RESULT: case STRING_RESULT:
str2my_decimal(E_DEC_FATAL_ERROR, value, length, collation.collation, val); str2my_decimal(E_DEC_FATAL_ERROR, value, length, collation.collation, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment