[MDEV-13160] Non-prepared parameter binding Created: 2017-06-23  Updated: 2017-06-26

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Olaf van der Spek Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I'd like to be able to write "select name from users where uid = ?" and provide a vector of (ptr, size) pairs like in writev.
Advantages:

  • No more escaping (client) and unescaping (server)
  • Potential to do automatic prepared statements because the query and the parameters arrive at the server separately.

https://linux.die.net/man/2/writev



 Comments   
Comment by Sergei Golubchik [ 2017-06-23 ]

Isn't this it:

Comment by Olaf van der Spek [ 2017-06-23 ]

Yes, except the API isn't as clean as it could be (IMO).
Wouldn't it be possible to do this with a single function?

mariadb_stmt_execute_direct2(mysql, "INSERT INTO execute_direct VALUES (?,?)", -1, bind, 2);

Generated at Thu Feb 08 08:03:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.