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
a836535c
Commit
a836535c
authored
Dec 07, 2007
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into moonbone.local:/work/32482-5.1-opt-mysql
parents
2264ca36
f1bff761
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+7
-0
mysql-test/t/user_var.test
mysql-test/t/user_var.test
+8
-0
sql/item_func.cc
sql/item_func.cc
+6
-3
No files found.
mysql-test/r/user_var.result
View file @
a836535c
...
...
@@ -353,3 +353,10 @@ select @a:=f4, count(f4) from t1 group by 1 desc;
2.6 1
1.6 4
drop table t1;
create table t1 (f1 int);
insert into t1 values (2), (1);
select @i := f1 as j from t1 order by 1;
j
1
2
drop table t1;
mysql-test/t/user_var.test
View file @
a836535c
...
...
@@ -237,3 +237,11 @@ select @a:=f2, count(f2) from t1 group by 1 desc;
select
@
a
:=
f3
,
count
(
f3
)
from
t1
group
by
1
desc
;
select
@
a
:=
f4
,
count
(
f4
)
from
t1
group
by
1
desc
;
drop
table
t1
;
#
# Bug#32482: Crash for a query with ORDER BY a user variable.
#
create
table
t1
(
f1
int
);
insert
into
t1
values
(
2
),
(
1
);
select
@
i
:=
f1
as
j
from
t1
order
by
1
;
drop
table
t1
;
sql/item_func.cc
View file @
a836535c
...
...
@@ -3848,9 +3848,12 @@ Item_func_set_user_var::fix_length_and_dec()
bool
Item_func_set_user_var
::
register_field_in_read_map
(
uchar
*
arg
)
{
TABLE
*
table
=
(
TABLE
*
)
arg
;
if
(
result_field
->
table
==
table
||
!
table
)
bitmap_set_bit
(
result_field
->
table
->
read_set
,
result_field
->
field_index
);
if
(
result_field
)
{
TABLE
*
table
=
(
TABLE
*
)
arg
;
if
(
result_field
->
table
==
table
||
!
table
)
bitmap_set_bit
(
result_field
->
table
->
read_set
,
result_field
->
field_index
);
}
return
0
;
}
...
...
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