Bugs: Browse | Submit New | Admin

[#29252] segfault when executing a statement with syntax error (ruby 1.9 only)

Date:
2011-06-04 14:24
Priority:
3
Submitted By:
Dmitry Borodaenko (angdraug)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
segfault when executing a statement with syntax error (ruby 1.9 only)

Detailed description
This bug was originally reported here:
http://bugs.debian.org/601771

The code to replicate the bug:

#!/usr/bin/ruby

require 'mysql'

def init
  @my = Mysql.new( ip, user, passw, database)

  @stm_1 = "Select * From CLIENTES_NUEVOS_TMP WHERE Cl_trans=?"
  @stm_2 = "Select ERROR_IS_HERE * From CLIENTES_NUEVOS_TMP WHERE Cl_tiend=?"

  stm1 = @my.prepare( @stm_1)
  stm1.execute( 'F')
  rows = stm1.affected_rows()
  puts "affected_rows:#{rows}"
  #stm1.close

  stm2 = @my.prepare( @stm_2)
  stm2.execute( 'T3')
  rows = stm2.affected_rows()
  puts "affected_rows:#{rows}"

  stm2.close
  stm2.close
  rescue StandardError => e
    puts "ERROR:#{e}"
    @my.close()
end

init()
puts "END"

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item