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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3d940b14
Commit
3d940b14
authored
May 23, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/b28509/b28509.5.0
into mysql.com:/home/ram/work/b28509/b28509.5.1
parents
7ed98512
11a2fd42
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
mysql-test/r/ps.result
mysql-test/r/ps.result
+9
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+8
-0
sql/item.cc
sql/item.cc
+2
-4
No files found.
mysql-test/r/ps.result
View file @
3d940b14
...
@@ -1560,6 +1560,15 @@ execute stmt;
...
@@ -1560,6 +1560,15 @@ execute stmt;
ERROR 42S22: Unknown column 'y.value' in 'field list'
ERROR 42S22: Unknown column 'y.value' in 'field list'
deallocate prepare stmt;
deallocate prepare stmt;
drop tables t1;
drop tables t1;
prepare stmt from "create table t1 select ?";
set @a=1.0;
execute stmt using @a;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`?` decimal(2,1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
End of 5.0 tests.
End of 5.0 tests.
create procedure proc_1() reset query cache;
create procedure proc_1() reset query cache;
call proc_1();
call proc_1();
...
...
mysql-test/t/ps.test
View file @
3d940b14
...
@@ -1626,6 +1626,14 @@ execute stmt;
...
@@ -1626,6 +1626,14 @@ execute stmt;
deallocate
prepare
stmt
;
deallocate
prepare
stmt
;
drop
tables
t1
;
drop
tables
t1
;
#
# Bug #28509: strange behaviour: passing a decimal value to PS
#
prepare
stmt
from
"create table t1 select ?"
;
set
@
a
=
1.0
;
execute
stmt
using
@
a
;
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
.
--
echo
End
of
5.0
tests
.
...
...
sql/item.cc
View file @
3d940b14
...
@@ -2542,16 +2542,14 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
...
@@ -2542,16 +2542,14 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
if
(
entry
&&
entry
->
value
)
if
(
entry
&&
entry
->
value
)
{
{
item_result_type
=
entry
->
type
;
item_result_type
=
entry
->
type
;
switch
(
entry
->
type
)
{
switch
(
item_result_
type
)
{
case
REAL_RESULT
:
case
REAL_RESULT
:
set_double
(
*
(
double
*
)
entry
->
value
);
set_double
(
*
(
double
*
)
entry
->
value
);
item_type
=
Item
::
REAL_ITEM
;
item_type
=
Item
::
REAL_ITEM
;
item_result_type
=
REAL_RESULT
;
break
;
break
;
case
INT_RESULT
:
case
INT_RESULT
:
set_int
(
*
(
longlong
*
)
entry
->
value
,
MY_INT64_NUM_DECIMAL_DIGITS
);
set_int
(
*
(
longlong
*
)
entry
->
value
,
MY_INT64_NUM_DECIMAL_DIGITS
);
item_type
=
Item
::
INT_ITEM
;
item_type
=
Item
::
INT_ITEM
;
item_result_type
=
INT_RESULT
;
break
;
break
;
case
STRING_RESULT
:
case
STRING_RESULT
:
{
{
...
@@ -2574,7 +2572,6 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
...
@@ -2574,7 +2572,6 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
charset of connection, so we have to set it later.
charset of connection, so we have to set it later.
*/
*/
item_type
=
Item
::
STRING_ITEM
;
item_type
=
Item
::
STRING_ITEM
;
item_result_type
=
STRING_RESULT
;
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
@@ -2588,6 +2585,7 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
...
@@ -2588,6 +2585,7 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
decimals
=
ent_value
->
frac
;
decimals
=
ent_value
->
frac
;
max_length
=
my_decimal_precision_to_length
(
ent_value
->
precision
(),
max_length
=
my_decimal_precision_to_length
(
ent_value
->
precision
(),
decimals
,
unsigned_flag
);
decimals
,
unsigned_flag
);
item_type
=
Item
::
DECIMAL_ITEM
;
break
;
break
;
}
}
default:
default:
...
...
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