Select session variable on MySQL node because of output parameter of store procedure

Hi ~ every one !
I used Execute Query to Call store procedure on MySQL node, and I want to get @out_total_count for my usage.
How can I achieve that ?

Call db.data_get(1, @out_total_count);
  1. If I use separated nodes, I can’t get session variable. Because each node will create new connection.
  2. MySql node can not support Multiple queries on same line Multiple queries on same line

Hey @Andy_Chuang,

Welcome to the community :tada:

That is a bit of a tricky one, To do what you are after we would need to update our node which might take some time but it would be worth getting a feature request opened for session re-use or supporting multi line queries.

The only 2 options I can think of are not ideal, You could not use the procedure and put the query into n8n which would defeat the purpose of having a procedure in the first place. The other thought is to save the result into a temporary table which would mean more data storage.

Thank you! I think I’m gonna try to make MySql node support multi line queries. If this is a right direction, I will contribute this feature.

1 Like