Package: libmysql-ruby1.9.1
Version: 2.8.2-1
Severity: normal

Test:
-------- File my.rb --------
# encoding: UTF-8
# #!/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"
----------------------------

Run my.rb
# ruby1.9.1 my.rb

affected_rows:4
ERROR:You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'From CLIENTES_NUEVOS_TMP WHERE Cl_tiend=?' at line 1
END
my.rb: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [i486-linux]

-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:000824 d:000824 TOP   
---------------------------

*** glibc detected *** ruby1.9.1: corrupted double-linked list:
0x09ee6dc0 ***
^C
#

Note: If we close the first statement before starting the second, the execution
does not fail


Thanks


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libmysql-ruby1.9.1 depends on:
ii  libc6                         2.11.2-6   Embedded GNU C Library: Shared lib
ii  libmysqlclient16              5.1.49-1   MySQL database client library
ii  libruby1.9.1                  1.9.2.0-1  Libraries necessary to run Ruby 1.

libmysql-ruby1.9.1 recommends no packages.

libmysql-ruby1.9.1 suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to