src/dblib/unittests/t0005

Main

Hostnameobon110
gcc versiongcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13)
uname -aLinux obon110 2.6.23.1-1smp #3 SMP Mon Nov 5 20:51:48 CET 2007 i686 i686 i386 GNU/Linux
date2008-07-18

==28697== Memcheck, a memory error detector.
==28697== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==28697== Using LibVEX rev 1658, a library for dynamic binary translation.
==28697== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==28697== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==28697== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==28697== 
--28697-- Command line
--28697--    ./t0005
--28697-- Startup, with flags:
--28697--    --tool=memcheck
--28697--    --num-callers=20
--28697--    --leak-check=yes
--28697--    -v
--28697--    --show-reachable=yes
--28697--    --log-fd=3
--28697--    --suppressions=/home/winnt/fziglio/suppressions.supp
--28697-- Contents of /proc/version:
--28697--   Linux version 2.6.23.1-1smp (fziglio@obon110) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #3 SMP Mon Nov 5 20:51:48 CET 2007
--28697-- Arch and hwcaps: X86, x86-sse1-sse2
--28697-- Valgrind library directory: /usr/lib/valgrind
--28697-- Reading syms from /lib/ld-2.5.so (0xAE4000)
--28697-- Reading syms from /home/winnt/fziglio/cpp/freetds/ftds_comp_old/src/dblib/unittests/t0005 (0x8048000)
--28697-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
--28697--    object doesn't have a dynamic symbol table
--28697-- Reading suppressions file: /home/winnt/fziglio/suppressions.supp
--28697-- Reading suppressions file: /usr/lib/valgrind/default.supp
--28697-- REDIR: 0xAF9540 (index) redirected to 0x38027D0F (vgPlain_x86_linux_REDIR_FOR_index)
--28697-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x4001000)
--28697-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4003000)
==28697== WARNING: new redirection conflicts with existing -- ignoring it
--28697--     new: 0x00AF9540 (index     ) R-> 0x040060C0 index
--28697-- REDIR: 0xAF96E0 (strlen) redirected to 0x4006290 (strlen)
--28697-- Reading syms from /home/winnt/fziglio/cpp/freetds/ftds_comp_old/src/dblib/.libs/libsybdb.so.5.0.0 (0x4009000)
--28697-- Reading syms from /usr/lib/libgnutls.so.13.0.6 (0x6A2D000)
--28697--    object doesn't have a symbol table
--28697-- Reading syms from /lib/libc-2.5.so (0xB29000)
--28697-- Reading syms from /usr/lib/libz.so.1.2.3 (0xB14000)
--28697--    object doesn't have a symbol table
--28697-- Reading syms from /usr/lib/libgcrypt.so.11.2.2 (0x65F1000)
--28697--    object doesn't have a symbol table
--28697-- Reading syms from /usr/lib/libgpg-error.so.0.3.0 (0xADB000)
--28697--    object doesn't have a symbol table
--28697-- Reading syms from /lib/libnsl-2.5.so (0x330000)
--28697-- REDIR: 0xB96330 (rindex) redirected to 0x4005FA0 (rindex)
--28697-- REDIR: 0xB95F90 (strlen) redirected to 0x4006270 (strlen)
--28697-- REDIR: 0xB91260 (malloc) redirected to 0x400537B (malloc)
--28697-- REDIR: 0xB976C0 (memcpy) redirected to 0x4006C60 (memcpy)
--28697-- REDIR: 0xB95A30 (strcmp) redirected to 0x4006340 (strcmp)
--28697-- REDIR: 0xB95AA0 (strcpy) redirected to 0x40069F0 (strcpy)
--28697-- REDIR: 0xB96CD0 (memchr) redirected to 0x4006460 (memchr)
--28697-- REDIR: 0xB92F20 (free) redirected to 0x4004F95 (free)
found TESTSRV.test for test in "../../../PWD"
Start
--28697-- REDIR: 0xB90F60 (calloc) redirected to 0x40046A8 (calloc)
--28697-- REDIR: 0xB96180 (strncmp) redirected to 0x40062D0 (strncmp)
About to logon
--28697-- REDIR: 0xB971D0 (memset) redirected to 0x4006580 (memset)
About to open
--28697-- REDIR: 0xB98040 (strchrnul) redirected to 0x4006610 (strchrnul)
--28697-- REDIR: 0xB973C0 (stpcpy) redirected to 0x4006910 (stpcpy)
--28697-- Reading syms from /lib/libnss_files-2.5.so (0x40C8000)
--28697-- REDIR: 0xB958C0 (index) redirected to 0x4006090 (index)
--28697-- Reading syms from /lib/libnss_winbind.so.2 (0x41ED000)
--28697--    object doesn't have a symbol table
--28697-- REDIR: 0xB96280 (strncpy) redirected to 0x4006DE0 (strncpy)
--28697-- REDIR: 0xB97F70 (rawmemchr) redirected to 0x4006640 (rawmemchr)
--28697-- Reading syms from /lib/libnss_dns-2.5.so (0x41F8000)
--28697-- Reading syms from /lib/libresolv-2.5.so (0x592000)
--28697-- Reading syms from /usr/lib/gconv/ISO8859-1.so (0x40D3000)
--28697--    object doesn't have a symbol table
--28697-- REDIR: 0xAF9AA0 (stpcpy) redirected to 0x4006830 (stpcpy)
--28697-- REDIR: 0xB95710 (strcat) redirected to 0x4006660 (strcat)
--28697-- REDIR: 0xB93110 (realloc) redirected to 0x400542A (realloc)
--28697-- REDIR: 0xB97160 (memmove) redirected to 0x40065B0 (memmove)
--28697-- Reading syms from /usr/lib/gconv/CP1252.so (0x41E2000)
--28697--    object doesn't have a symbol table
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 5
Server 'OBOQ003', Line 1
Cannot drop the procedure 't0005_proc', because it does not exist or you do not have permission.
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
--28697-- Discarding syms at 0x41E2000-0x41E6000 in /usr/lib/gconv/CP1252.so due to munmap()
--28697-- Discarding syms at 0x40D3000-0x40D6000 in /usr/lib/gconv/ISO8859-1.so due to munmap()
--28697-- Discarding syms at 0x40C8000-0x40D3000 in /lib/libnss_files-2.5.so due to munmap()
--28697-- Discarding syms at 0x41ED000-0x41F8000 in /lib/libnss_winbind.so.2 due to munmap()
--28697-- Discarding syms at 0x41F8000-0x41FE000 in /lib/libnss_dns-2.5.so due to munmap()
--28697-- Discarding syms at 0x592000-0x5A5000 in /lib/libresolv-2.5.so due to munmap()
==28697== 
==28697== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 30 from 1)
--28697-- 
--28697-- supp:   30 Fedora-Core-6-hack3-ld25
==28697== malloc/free: in use at exit: 2,028 bytes in 32 blocks.
==28697== malloc/free: 6,902 allocs, 6,870 frees, 635,771 bytes allocated.
==28697== 
==28697== searching for pointers to 32 not-freed blocks.
==28697== checked 224,596 bytes.
==28697== 
==28697== LEAK SUMMARY:
==28697==    definitely lost: 0 bytes in 0 blocks.
==28697==      possibly lost: 0 bytes in 0 blocks.
==28697==    still reachable: 0 bytes in 0 blocks.
==28697==         suppressed: 2,028 bytes in 32 blocks.
--28697--  memcheck: sanity checks: 23 cheap, 1 expensive
--28697--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--28697--  memcheck: auxmaps: 0 searches, 0 comparisons
--28697--  memcheck: SMs: n_issued      = 39 (624k, 0M)
--28697--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--28697--  memcheck: SMs: max_noaccess  = 65535 (1048560k, 1023M)
--28697--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--28697--  memcheck: SMs: max_defined   = 42 (672k, 0M)
--28697--  memcheck: SMs: max_non_DSM   = 39 (624k, 0M)
--28697--  memcheck: max sec V bit nodes:    7 (0k, 0M)
--28697--  memcheck: set_sec_vbits8 calls: 9 (new: 7, updates: 2)
--28697--  memcheck: max shadow mem size:   928k, 0M
--28697-- translate:            fast SP updates identified: 16,429 ( 89.0%)
--28697-- translate:   generic_known SP updates identified: 1,554 (  8.4%)
--28697-- translate: generic_unknown SP updates identified: 464 (  2.5%)
--28697--     tt/tc: 32,468 tt lookups requiring 36,940 probes
--28697--     tt/tc: 32,468 fast-cache updates, 9 flushes
--28697--  transtab: new        13,532 (403,859 -> 6,461,100; ratio 159:10) [0 scs]
--28697--  transtab: dumped     0 (0 -> ??)
--28697--  transtab: discarded  882 (18,217 -> ??)
--28697-- scheduler: 2,377,388 jumps (bb entries).
--28697-- scheduler: 23/34,809 major/minor sched events.
--28697--    sanity: 24 cheap, 1 expensive checks.
--28697--    exectx: 30,011 lists, 1,112 contexts (avg 0 per list)
--28697--    exectx: 13,778 searches, 12,694 full compares (921 per 1000)
--28697--    exectx: 30 cmp2, 82 cmp4, 0 cmpAll

Main