Bug #6698 Native SQL prepared statements without using variables
Submitted: 18 Nov 2004 16:52 Modified: 9 Feb 2006 12:02
Reporter: Georg Richter Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S4 (Feature request)
Version:4.1.8 OS:Any (all)
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[18 Nov 2004 16:52] Georg Richter
Description:
Currently native sql prepared statements only allow to use variables in execute statements. 
I would be easier and faster to allow passing  values directly to the execute statement, like: 
 
PREPARE my_stmt FROM 'insert INTO t1 (a,b,c) VALUES (?,?,?)'; 
EXECUTE my_stmt USING 'foo', 1, 'bar'; 
 
instead of 
set @a:='foo'; 
set @b:=1; 
set @c:='bar' 
EXECUTE my_stmt USING @a,@b,@c; 

How to repeat:
...
[9 Feb 2006 12:02] Valeriy Kravchuk
Thank you for a reasonable feature request. Still impossible to use literals in 5.0.x...