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
74b01ca3
Commit
74b01ca3
authored
Jun 25, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type of parameter assignment for parameters from variables added (BUG#4280)
parent
f6ea88e8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/ps.result
mysql-test/r/ps.result
+14
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+14
-0
sql/item.cc
sql/item.cc
+4
-0
No files found.
mysql-test/r/ps.result
View file @
74b01ca3
...
@@ -137,3 +137,17 @@ execute stmt1;
...
@@ -137,3 +137,17 @@ execute stmt1;
FOUND_ROWS()
FOUND_ROWS()
0
0
deallocate prepare stmt1;
deallocate prepare stmt1;
drop table t1;
set @arg00=1;
prepare stmt1 from ' create table t1 (m int) as select 1 as m ' ;
execute stmt1 ;
select m from t1;
m
1
drop table t1;
prepare stmt1 from ' create table t1 (m int) as select ? as m ' ;
execute stmt1 using @arg00;
select m from t1;
m
1
drop table t1;
mysql-test/t/ps.test
View file @
74b01ca3
...
@@ -140,3 +140,17 @@ execute stmt1;
...
@@ -140,3 +140,17 @@ execute stmt1;
# Expect 0
# Expect 0
execute
stmt1
;
execute
stmt1
;
deallocate
prepare
stmt1
;
deallocate
prepare
stmt1
;
drop
table
t1
;
#
# parameters from variables (for field creation)
#
set
@
arg00
=
1
;
prepare
stmt1
from
' create table t1 (m int) as select 1 as m '
;
execute
stmt1
;
select
m
from
t1
;
drop
table
t1
;
prepare
stmt1
from
' create table t1 (m int) as select ? as m '
;
execute
stmt1
using
@
arg00
;
select
m
from
t1
;
drop
table
t1
;
sql/item.cc
View file @
74b01ca3
...
@@ -759,9 +759,13 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
...
@@ -759,9 +759,13 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
switch
(
entry
->
type
)
{
switch
(
entry
->
type
)
{
case
REAL_RESULT
:
case
REAL_RESULT
:
set_double
(
*
(
double
*
)
entry
->
value
);
set_double
(
*
(
double
*
)
entry
->
value
);
item_type
=
Item
::
REAL_ITEM
;
item_result_type
=
REAL_RESULT
;
break
;
break
;
case
INT_RESULT
:
case
INT_RESULT
:
set_int
(
*
(
longlong
*
)
entry
->
value
,
21
);
set_int
(
*
(
longlong
*
)
entry
->
value
,
21
);
item_type
=
Item
::
INT_ITEM
;
item_result_type
=
INT_RESULT
;
break
;
break
;
case
STRING_RESULT
:
case
STRING_RESULT
:
{
{
...
...
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