Forum: Building VoltDB Applications

Post: *.insert procedures have no permissions by default; solution?

*.insert procedures have no permissions by default; solution?
chungy
May 8, 2012
I need the ability to move data from VoltDB to MySQL and back in order to facilitate schema changes, but the *.insert procedures for the tables in VoltDB don't allow any users to use them, not even when using the admin protocol port (I had assumed the mode would override any security set up on the database).
Unfortunately, you can't call
rbetts
May 11, 2012
Unfortunately, you can't call the built-in procedures when using user/group definitions. Probably the easiest work-around is to add equivalent statement procedures to your project file. You will have to name them without using ".", which we reserve for the built-ins.

See: DesignCodeFreeProcs
Sad to hear; the project.xml
chungy
May 14, 2012
Unfortunately, you can't call the built-in procedures when using user/group definitions. Probably the easiest work-around is to add equivalent statement procedures to your project file. You will have to name them without using ".", which we reserve for the built-ins.


Sad to hear; the project.xml workaround is do-able but it'll be a hassle.

Another plan then, is to use @AdHock Insert SQL statements; is there documentation on what VoltDB needs exactly for string escaping? I tried searching UserGuide.pdf but did not find it.
@AdHoc always run as a @AdHoc always run as a mu
rbetts
May 14, 2012
@AdHoc always run as a multi-partition procedure (although writing an analyzer to avoid this for inserts is work-in-progress). Doing a lot of multi-partition inserts won't be very fast (maybe 1k per second vs. 100k per second, depending on hardware/configuration/workload/cluster-size, etc.)

Strings are single quoted. Single quotes are escaped with another single quote. For example, this snippet inserts "don't say no".

client.callProcedure("@AdHoc", "insert into foo values ('don''t say no')");

I'll mention to our writer that you couldn't find docs on string escaping. Thanks for the feedback.

Ryan.