Commit 3879fa38 authored by unknown's avatar unknown

Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1

into ice.snake.net:/Volumes/ice2/MySQL/bk/mysql-4.1
parents 60c1f31e d94b3470
...@@ -179,3 +179,16 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -179,3 +179,16 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found 2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
deallocate prepare stmt1; deallocate prepare stmt1;
drop tables t1,t2; drop tables t1,t2;
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;
...@@ -166,3 +166,16 @@ execute stmt1 ; ...@@ -166,3 +166,16 @@ execute stmt1 ;
explain SELECT (SELECT SUM(c1 + c12 + 0.0) FROM t2 where (t1.c2 - 0e-3) = t2.c2 GROUP BY t1.c15 LIMIT 1) as scalar_s, exists (select 1.0e+0 from t2 where t2.c3 * 9.0000000000 = t1.c4) as exists_s, c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s FROM t1, (select c25 x, c32 y from t2) tt WHERE x * 1 = c25; explain SELECT (SELECT SUM(c1 + c12 + 0.0) FROM t2 where (t1.c2 - 0e-3) = t2.c2 GROUP BY t1.c15 LIMIT 1) as scalar_s, exists (select 1.0e+0 from t2 where t2.c3 * 9.0000000000 = t1.c4) as exists_s, c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s FROM t1, (select c25 x, c32 y from t2) tt WHERE x * 1 = c25;
deallocate prepare stmt1; deallocate prepare stmt1;
drop tables t1,t2; drop tables t1,t2;
#
# 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;
...@@ -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:
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment