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

[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...

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.