crystal-lang / crystal-mysql

MySQL connector for Crystal
MIT License
107 stars 36 forks source link

call Store procedure #54

Open yuskamal opened 6 years ago

yuskamal commented 6 years ago

how to call mysql store procedure and get results ?

drum445 commented 6 years ago

Hello, to add a bit more info to this issue as I believe I am seeing the same thing. When you try to call a store procedure using the mysql driver in the following way:

db.query "call new_procedure;" do |rs|
  rs.each do
    puts "hello"
  end
end

the following error is raised

can't return a result set in the given context (Exception)

I remember this also being an issue in a very old version of the Ruby MySQL driver

Cheers