src/dblib/unittests/t0005

Main

Hostnameobon110
gcc versiongcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
uname -aLinux obon110 2.6.26.2-1smp #1 SMP Tue Aug 19 10:16:15 CEST 2008 i686 i686 i386 GNU/Linux
date2008-11-21

==24077== Memcheck, a memory error detector.
==24077== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==24077== Using LibVEX rev 1732, a library for dynamic binary translation.
==24077== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==24077== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==24077== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==24077== 
--24077-- Command line
--24077--    ./t0005
--24077-- Startup, with flags:
--24077--    --tool=memcheck
--24077--    --num-callers=20
--24077--    --leak-check=yes
--24077--    -v
--24077--    --show-reachable=yes
--24077--    --log-fd=3
--24077--    --suppressions=/home/winnt/fziglio/suppressions.supp
--24077-- Contents of /proc/version:
--24077--   Linux version 2.6.26.2-1smp (fziglio@obon110) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #1 SMP Tue Aug 19 10:16:15 CEST 2008
--24077-- Arch and hwcaps: X86, x86-sse1-sse2
--24077-- Page sizes: currently 4096, max supported 4096
--24077-- Valgrind library directory: /usr/lib/valgrind
--24077-- Reading syms from /lib/ld-2.7.so (0x91E000)
--24077-- Reading debug info from /usr/lib/debug/lib/ld-2.7.so.debug...
--24077-- Reading syms from /home/winnt/fziglio/cpp/freetds/ftds_comp_old/src/dblib/unittests/t0005 (0x8048000)
--24077-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
--24077--    object doesn't have a dynamic symbol table
--24077-- Reading suppressions file: /home/winnt/fziglio/suppressions.supp
--24077-- Reading suppressions file: /usr/lib/valgrind/default.supp
--24077-- REDIR: 0x933BB0 (index) redirected to 0x38027F5F (vgPlain_x86_linux_REDIR_FOR_index)
--24077-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x4001000)
--24077-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4003000)
==24077== WARNING: new redirection conflicts with existing -- ignoring it
--24077--     new: 0x00933BB0 (index     ) R-> 0x04006230 index
--24077-- REDIR: 0x933D50 (strlen) redirected to 0x40062E0 (strlen)
--24077-- Reading syms from /home/winnt/fziglio/cpp/freetds/ftds_comp_old/src/dblib/.libs/libsybdb.so.5.0.0 (0x4009000)
--24077-- Reading syms from /usr/lib/libgnutls.so.13.3.0 (0x40DB000)
--24077-- Reading debug info from /usr/lib/debug/usr/lib/libgnutls.so.13.3.0.debug...
--24077-- ... CRC mismatch (computed 812A60F5 wanted E162DD80)
--24077--    object doesn't have a symbol table
--24077-- Reading syms from /lib/libc-2.7.so (0x93D000)
--24077-- Reading debug info from /usr/lib/debug/lib/libc-2.7.so.debug...
--24077-- Reading syms from /lib/libz.so.1.2.3 (0xAE5000)
--24077-- Reading debug info from /usr/lib/debug/lib/libz.so.1.2.3.debug...
--24077-- Reading syms from /lib/libgcrypt.so.11.2.3 (0x3E25000)
--24077-- Reading debug info from /usr/lib/debug/lib/libgcrypt.so.11.2.3.debug...
--24077-- Reading syms from /lib/libgpg-error.so.0.3.1 (0xDB4000)
--24077-- Reading debug info from /usr/lib/debug/lib/libgpg-error.so.0.3.1.debug...
--24077-- Reading syms from /lib/libnsl-2.7.so (0x259000)
--24077-- Reading debug info from /usr/lib/debug/lib/libnsl-2.7.so.debug...
--24077-- REDIR: 0x9AD4C0 (rindex) redirected to 0x4006110 (rindex)
--24077-- REDIR: 0x9AD120 (strlen) redirected to 0x40062C0 (strlen)
--24077-- REDIR: 0x9A8B00 (malloc) redirected to 0x40054A0 (malloc)
--24077-- REDIR: 0x9AE890 (memcpy) redirected to 0x4007090 (memcpy)
--24077-- REDIR: 0x9ACBC0 (strcmp) redirected to 0x4006390 (strcmp)
--24077-- REDIR: 0x9ACC30 (strcpy) redirected to 0x40072F0 (strcpy)
--24077-- REDIR: 0x9ADEA0 (memchr) redirected to 0x40064B0 (memchr)
--24077-- REDIR: 0x9AA060 (free) redirected to 0x40050BA (free)
--24077-- REDIR: 0x9AF220 (strchrnul) redirected to 0x40066F0 (strchrnul)
found sybase.FreeTDS for testuser in "../../../PWD"
Start
--24077-- REDIR: 0x9A8810 (calloc) redirected to 0x40047CD (calloc)
--24077-- REDIR: 0x9AD310 (strncmp) redirected to 0x4006320 (strncmp)
About to logon
--24077-- REDIR: 0x9AE3A0 (memset) redirected to 0x4006640 (memset)
About to open
--24077-- REDIR: 0x9AE400 (mempcpy) redirected to 0x4006B70 (mempcpy)
--24077-- REDIR: 0x9AE590 (stpcpy) redirected to 0x4006850 (stpcpy)
--24077-- Reading syms from /lib/libnss_files-2.7.so (0x40C7000)
--24077-- Reading debug info from /usr/lib/debug/lib/libnss_files-2.7.so.debug...
--24077-- REDIR: 0x9ACA50 (index) redirected to 0x4006200 (index)
--24077-- Reading syms from /lib/libnss_winbind.so.2 (0x426F000)
--24077--    object doesn't have a symbol table
--24077-- REDIR: 0x9AD410 (strncpy) redirected to 0x4006930 (strncpy)
--24077-- REDIR: 0x9AF150 (rawmemchr) redirected to 0x4006720 (rawmemchr)
--24077-- Reading syms from /usr/lib/gconv/ISO8859-1.so (0x425A000)
--24077-- Reading debug info from /usr/lib/debug/usr/lib/gconv/ISO8859-1.so.debug...
--24077-- REDIR: 0x934110 (stpcpy) redirected to 0x40074D0 (stpcpy)
--24077-- REDIR: 0x9AA250 (realloc) redirected to 0x400554F (realloc)
creating table
insert
select * from #dblib0005 where i < 5 order by i
col 1 is i
col 2 is s
Read a row of data -> 1 row 0001  
Read a row of data -> 2 row 0002  
Read a row of data -> 3 row 0003  
Read a row of data -> 4 row 0004  
This query should succeeded as we have fetched exactly the.
number of rows in the result set
select * from #dblib0005 where i < 6 order by i
col 1 is i
col 2 is s
Read a row of data -> 1 row 0001  
Read a row of data -> 2 row 0002  
Read a row of data -> 3 row 0003  
Read a row of data -> 4 row 0004  
This query should fail as we have not fetched all the
rows in the result set
select * from #dblib0005 where i > 950 order by i
DB-LIBRARY error (severity 7, dberr 20019, oserr 0, dberrstr Attempt to initiate a new Adaptive Server operation with results pending, oserrstr Success):
calling dbcancel to flush results
Dropping proc
Msg 3701, Level 11, State 1
Server 'OBOT602P', Line 1
Cannot drop the procedure 't0005_proc', because it doesn't exist in the system catalogs.

creating proc
create proc t0005_proc (@b int out) as
begin
select * from #dblib0005 where i < 6 order by i
select @b = 42
end

calling proc
declare @myout int exec t0005_proc @b = @myout output
col 1 is i
col 2 is s
Read a row of data -> 1 row 0001  
Read a row of data -> 2 row 0002  
Read a row of data -> 3 row 0003  
Read a row of data -> 4 row 0004  
Read a row of data -> 5 row 0005  
This next command should succeed as we have fetched exactly the.
number of rows in the result set
select getdate()
dblib okay on t0005.c
--24077-- Discarding syms at 0x425A000-0x425D000 in /usr/lib/gconv/ISO8859-1.so due to munmap()
--24077-- Discarding syms at 0x40C7000-0x40D3000 in /lib/libnss_files-2.7.so due to munmap()
--24077-- Discarding syms at 0x426F000-0x427A000 in /lib/libnss_winbind.so.2 due to munmap()
==24077== 
==24077== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 1)
--24077-- 
--24077-- supp:   27 dl-hack3
==24077== malloc/free: in use at exit: 4 bytes in 1 blocks.
==24077== malloc/free: 393 allocs, 392 frees, 217,176 bytes allocated.
==24077== 
==24077== searching for pointers to 1 not-freed blocks.
==24077== checked 218,540 bytes.
==24077== 
==24077== LEAK SUMMARY:
==24077==    definitely lost: 0 bytes in 0 blocks.
==24077==      possibly lost: 0 bytes in 0 blocks.
==24077==    still reachable: 0 bytes in 0 blocks.
==24077==         suppressed: 4 bytes in 1 blocks.
--24077--  memcheck: sanity checks: 7 cheap, 1 expensive
--24077--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--24077--  memcheck: auxmaps: 0 searches, 0 comparisons
--24077--  memcheck: SMs: n_issued      = 27 (432k, 0M)
--24077--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--24077--  memcheck: SMs: max_noaccess  = 65535 (1048560k, 1023M)
--24077--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--24077--  memcheck: SMs: max_defined   = 45 (720k, 0M)
--24077--  memcheck: SMs: max_non_DSM   = 27 (432k, 0M)
--24077--  memcheck: max sec V bit nodes:    4 (0k, 0M)
--24077--  memcheck: set_sec_vbits8 calls: 4 (new: 4, updates: 0)
--24077--  memcheck: max shadow mem size:   736k, 0M
--24077-- translate:            fast SP updates identified: 9,202 ( 88.9%)
--24077-- translate:   generic_known SP updates identified: 872 (  8.4%)
--24077-- translate: generic_unknown SP updates identified: 271 (  2.6%)
--24077--     tt/tc: 17,018 tt lookups requiring 18,405 probes
--24077--     tt/tc: 17,018 fast-cache updates, 6 flushes
--24077--  transtab: new        7,613 (211,819 -> 3,340,349; ratio 157:10) [0 scs]
--24077--  transtab: dumped     0 (0 -> ??)
--24077--  transtab: discarded  358 (7,241 -> ??)
--24077-- scheduler: 774,579 jumps (bb entries).
--24077-- scheduler: 7/11,840 major/minor sched events.
--24077--    sanity: 8 cheap, 1 expensive checks.
--24077--    exectx: 30,011 lists, 383 contexts (avg 0 per list)
--24077--    exectx: 796 searches, 415 full compares (521 per 1000)
--24077--    exectx: 0 cmp2, 86 cmp4, 0 cmpAll

Main