3

When i am trying to execute the multipleStatements in Mariadb like this

db.Connection.query("CALL tep_procedure_out(?,@out_value);Select @out_value",["rahul"],

I set {multipleStatements: true} in my connection even though i am getting Error.

{ Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Select @out_value' at line 1 code: 1064 }

Raymond Nijland
  • 11,488
  • 2
  • 22
  • 34
RAHUL SRV
  • 262
  • 3
  • 24

1 Answers1

1

By default sending multiple statements is disabled (not only in node.js but in most other connectors) for security reasons.

If you want to use multiple statements you have to specify it when establishing the connection:

var conn = mysql.createConnection({multipleStatements: true});
Georg Richter
  • 5,970
  • 2
  • 9
  • 15
  • Thanks for the Reply @Georg Richter, but i have Already set multipleStatements: true in my connection and one more correction This about Mariadb not Mysql – RAHUL SRV Mar 12 '18 at 06:38