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
5722ae66
Commit
5722ae66
authored
Jun 25, 2003
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug with type of user variables (bug #551)
parent
e96c75fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+8
-0
mysql-test/t/user_var.test
mysql-test/t/user_var.test
+6
-0
sql/item_func.cc
sql/item_func.cc
+1
-0
No files found.
BitKeeper/etc/logging_ok
View file @
5722ae66
...
...
@@ -35,5 +35,6 @@ serg@build.mysql2.com
serg@serg.mysql.com
serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi
vva@eagle.mysql.r18.ru
walrus@mysql.com
zak@balfor.local
mysql-test/r/user_var.result
View file @
5722ae66
...
...
@@ -14,3 +14,11 @@ table type possible_keys key key_len ref rows Extra
t1 index NULL i 4 NULL 3 where used; Using index
table type possible_keys key key_len ref rows Extra
t1 ref i i 4 const 1 where used
@a:=10 @b:=1 @a > @b @a < @b
10 1 1 0
@a:="10" @b:="1" @a > @b @a < @b
10 1 1 0
@a:=10 @b:=2 @a > @b @a < @b
10 2 1 0
@a:="10" @b:="2" @a > @b @a < @b
10 2 0 1
mysql-test/t/user_var.test
View file @
5722ae66
...
...
@@ -17,3 +17,9 @@ explain select * from t1 where @vv1:=@vv1+1 and i=@vv1;
explain
select
@
vv1
:=
i
from
t1
where
i
=@
vv1
;
explain
select
*
from
t1
where
i
=@
vv1
;
drop
table
t1
,
t2
;
# Check types of variables
select
@
a
:=
10
,
@
b
:=
1
,
@
a
>
@
b
,
@
a
<
@
b
;
select
@
a
:=
"10"
,
@
b
:=
"1"
,
@
a
>
@
b
,
@
a
<
@
b
;
select
@
a
:=
10
,
@
b
:=
2
,
@
a
>
@
b
,
@
a
<
@
b
;
select
@
a
:=
"10"
,
@
b
:=
"2"
,
@
a
>
@
b
,
@
a
<
@
b
;
sql/item_func.cc
View file @
5722ae66
...
...
@@ -1676,6 +1676,7 @@ bool Item_func_set_user_var::fix_fields(THD *thd,TABLE_LIST *tables)
if
(
Item_func
::
fix_fields
(
thd
,
tables
)
||
!
(
entry
=
get_variable
(
&
thd
->
user_vars
,
name
,
1
)))
return
1
;
entry
->
type
=
cached_result_type
;
entry
->
update_query_id
=
thd
->
query_id
;
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