Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
92f09cd1
Commit
92f09cd1
authored
Dec 08, 2010
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
automerge 5.1-security --> 5.5-security (bug 57187)
parents
19a2f5cd
a44b5444
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+6
-0
mysql-test/t/user_var.test
mysql-test/t/user_var.test
+12
-0
sql/item_func.cc
sql/item_func.cc
+1
-1
No files found.
mysql-test/r/user_var.result
View file @
92f09cd1
...
@@ -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));
...
...
mysql-test/t/user_var.test
View file @
92f09cd1
...
@@ -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
#
#
...
...
sql/item_func.cc
View file @
92f09cd1
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment