src/dblib/unittests/rpc

Main

Hostnamefreddy
uname -aLinux freddy 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
date2016-05-31

==8217== Memcheck, a memory error detector
==8217== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==8217== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==8217== Command: ./rpc
==8217== 
--8217-- Valgrind options:
--8217--    --tool=memcheck
--8217--    --vgdb=no
--8217--    --num-callers=20
--8217--    --leak-check=yes
--8217--    -v
--8217--    --show-reachable=yes
--8217--    --log-fd=3
--8217--    --suppressions=/home/freddy/suppressions.supp
--8217--    --track-origins=yes
--8217-- Contents of /proc/version:
--8217--   Linux version 4.4.0-22-generic (buildd@lgw01-41) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016
--8217-- 
--8217-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi
--8217-- Page sizes: currently 4096, max supported 4096
--8217-- Valgrind library directory: /home/freddy/install/lib/valgrind
--8217-- Reading syms from /home/freddy/ftdstmp/ftds_comp100/test5/src/dblib/unittests/rpc
--8217-- Reading syms from /lib/x86_64-linux-gnu/ld-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/ld-2.23.so ..
--8217--   .. CRC mismatch (computed d3da0723 wanted a1c29704)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.23.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /home/freddy/install/lib/valgrind/memcheck-amd64-linux
--8217--    object doesn't have a dynamic symbol table
--8217-- Scheduler: using generic scheduler lock implementation.
--8217-- Reading suppressions file: /home/freddy/suppressions.supp
--8217-- Reading suppressions file: /home/freddy/install/lib/valgrind/default.supp
--8217-- REDIR: 0x401cdc0 (ld-linux-x86-64.so.2:strlen) redirected to 0x3809ecf1 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--8217-- REDIR: 0x401b710 (ld-linux-x86-64.so.2:index) redirected to 0x3809ed0b (vgPlain_amd64_linux_REDIR_FOR_index)
--8217-- Reading syms from /home/freddy/install/lib/valgrind/vgpreload_core-amd64-linux.so
--8217-- Reading syms from /home/freddy/install/lib/valgrind/vgpreload_memcheck-amd64-linux.so
==8217== WARNING: new redirection conflicts with existing -- ignoring it
--8217--     old: 0x0401cdc0 (strlen              ) R-> (0000.0) 0x3809ecf1 vgPlain_amd64_linux_REDIR_FOR_strlen
--8217--     new: 0x0401cdc0 (strlen              ) R-> (2007.0) 0x04c30a90 strlen
--8217-- REDIR: 0x401b930 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c31b40 (strcmp)
--8217-- REDIR: 0x401db20 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c34d20 (mempcpy)
--8217-- Reading syms from /home/freddy/ftdstmp/ftds_comp100/src/dblib/.libs/libsybdb.so.5.1.0
--8217-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.23.so
--8217--   Considering /usr/lib/debug/.build-id/b7/7847cc9cacbca3b5753d0d25a32e5795afe75b.debug ..
--8217--   .. build-id is valid
--8217-- Reading syms from /lib/x86_64-linux-gnu/libc-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libc-2.23.so ..
--8217--   .. CRC mismatch (computed 2adb2e50 wanted 9b73f606)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
--8217--   Considering /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 ..
--8217--   .. CRC mismatch (computed 234d2626 wanted 1ab49fb0)
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /lib/x86_64-linux-gnu/libssl.so.1.0.0
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
--8217--   Considering /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 ..
--8217--   .. CRC mismatch (computed a79adaf9 wanted 3edf8bac)
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
--8217--   Considering /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 ..
--8217--   .. CRC mismatch (computed 5654054d wanted 7d4672a0)
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /lib/x86_64-linux-gnu/libcom_err.so.2.1
--8217--   Considering /lib/x86_64-linux-gnu/libcom_err.so.2.1 ..
--8217--   .. CRC mismatch (computed 0c5846b0 wanted 1b47dcd1)
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
--8217--   Considering /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 ..
--8217--   .. CRC mismatch (computed 84efbe11 wanted 9d23b09f)
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libdl-2.23.so ..
--8217--   .. CRC mismatch (computed b7ff3c20 wanted 623a46c3)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.23.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /lib/x86_64-linux-gnu/libkeyutils.so.1.5
--8217--    object doesn't have a symbol table
--8217-- Reading syms from /lib/x86_64-linux-gnu/libresolv-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libresolv-2.23.so ..
--8217--   .. CRC mismatch (computed 87659676 wanted 8389f31d)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libresolv-2.23.so ..
--8217--   .. CRC is valid
--8217-- REDIR: 0x53b2fd0 (libc.so.6:strcasecmp) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53ae850 (libc.so.6:strcspn) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b52c0 (libc.so.6:strncasecmp) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b0cc0 (libc.so.6:strpbrk) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b1050 (libc.so.6:strspn) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b271b (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53ad050 (libc.so.6:index) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b2180 (libc.so.6:bcmp) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53ad2a0 (libc.so.6:strcmp) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b79c0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53b09d0 (libc.so.6:rindex) redirected to 0x4c30410 (rindex)
--8217-- REDIR: 0x53aecf0 (libc.so.6:strlen) redirected to 0x4c309d0 (strlen)
--8217-- REDIR: 0x53a7550 (libc.so.6:malloc) redirected to 0x4c2db2f (malloc)
--8217-- REDIR: 0x54716d0 (libc.so.6:__memcpy_avx_unaligned) redirected to 0x4c31f10 (memcpy@@GLIBC_2.14)
--8217-- REDIR: 0x53b2780 (libc.so.6:memset) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x54961a0 (libc.so.6:__memset_avx2) redirected to 0x4c33f30 (memset)
--8217-- REDIR: 0x5491c60 (libc.so.6:__memcmp_sse4_1) redirected to 0x4c33740 (__memcmp_sse4_1)
--8217-- REDIR: 0x53a7a70 (libc.so.6:free) redirected to 0x4c2ec29 (free)
--8217-- REDIR: 0x53a8290 (libc.so.6:calloc) redirected to 0x4c2f8b2 (calloc)
--8217-- REDIR: 0x53b0990 (libc.so.6:strncpy) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53c95d0 (libc.so.6:__strncpy_sse2_unaligned) redirected to 0x4c30fe0 (__strncpy_sse2_unaligned)
--8217-- REDIR: 0x53b2e20 (libc.so.6:stpcpy) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53ca5b0 (libc.so.6:__stpcpy_sse2_unaligned) redirected to 0x4c33b90 (__stpcpy_sse2_unaligned)
--8217-- REDIR: 0x53b7a40 (libc.so.6:__GI_memcpy) redirected to 0x4c32570 (__GI_memcpy)
--8217-- REDIR: 0x5439bc0 (libc.so.6:__strcpy_chk) redirected to 0x4c348c0 (__strcpy_chk)
--8217-- REDIR: 0x53af140 (libc.so.6:__GI_strncmp) redirected to 0x4c31180 (__GI_strncmp)
--8217-- REDIR: 0x53b1630 (libc.so.6:__GI_strstr) redirected to 0x4c34f80 (__strstr_sse2)
--8217-- REDIR: 0x53b1e30 (libc.so.6:memchr) redirected to 0x4c31be0 (memchr)
--8217-- REDIR: 0x53b9d30 (libc.so.6:strchrnul) redirected to 0x4c34850 (strchrnul)
found msde_pool.tempdb for sa in "../../../PWD"
--8217-- REDIR: 0x53b2980 (libc.so.6:__GI_mempcpy) redirected to 0x4c34a50 (__GI_mempcpy)
SQL text will be read from ../../../src/dblib/unittests/rpc.sql
Starting ./rpc
--8217-- REDIR: 0x53ad080 (libc.so.6:__GI_strchr) redirected to 0x4c30570 (__GI_strchr)
--8217-- REDIR: 0x546e1b0 (libc.so.6:__strcasecmp_avx) redirected to 0x4c312d0 (strcasecmp)
About to logon
--8217-- REDIR: 0x53b2e60 (libc.so.6:__GI_stpcpy) redirected to 0x4c339f0 (__GI_stpcpy)
expected error 20201: "Packet size of -1 not supported -- size of 0 used instead!"
About to open msde_pool.tempdb
--8217-- REDIR: 0x53c2b40 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c31a00 (strcmp)
--8217-- REDIR: 0x546f820 (libc.so.6:__strncasecmp_avx) redirected to 0x4c313b0 (strncasecmp)
--8217-- REDIR: 0x53ad2e0 (libc.so.6:__GI_strcmp) redirected to 0x4c31a50 (__GI_strcmp)
--8217-- Reading syms from /lib/x86_64-linux-gnu/libnss_compat-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libnss_compat-2.23.so ..
--8217--   .. CRC mismatch (computed a9955d05 wanted fb5bcc8f)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_compat-2.23.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /lib/x86_64-linux-gnu/libnsl-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libnsl-2.23.so ..
--8217--   .. CRC mismatch (computed a5a10c48 wanted 9d2e1498)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnsl-2.23.so ..
--8217--   .. CRC is valid
--8217-- REDIR: 0x53ae770 (libc.so.6:__GI_strcpy) redirected to 0x4c30b80 (__GI_strcpy)
--8217-- Reading syms from /lib/x86_64-linux-gnu/libnss_nis-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libnss_nis-2.23.so ..
--8217--   .. CRC mismatch (computed 34132a3b wanted 31617a24)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_nis-2.23.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /lib/x86_64-linux-gnu/libnss_files-2.23.so
--8217--   Considering /lib/x86_64-linux-gnu/libnss_files-2.23.so ..
--8217--   .. CRC mismatch (computed 787ef17f wanted 48302948)
--8217--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libnss_files-2.23.so ..
--8217--   .. CRC is valid
--8217-- REDIR: 0x53a7c40 (libc.so.6:realloc) redirected to 0x4c2fa81 (realloc)
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
--8217--   Considering /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so ..
--8217--   .. CRC mismatch (computed d872b97c wanted 2237059d)
--8217--   Considering /usr/lib/debug/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so ..
--8217--   .. CRC is valid
--8217-- REDIR: 0x401dc70 (ld-linux-x86-64.so.2:stpcpy) redirected to 0x4c33d30 (stpcpy)
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/gconv/UTF-16.so
--8217--   Considering /usr/lib/x86_64-linux-gnu/gconv/UTF-16.so ..
--8217--   .. CRC mismatch (computed b03c450e wanted 425e109b)
--8217--   Considering /usr/lib/debug/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so ..
--8217--   .. CRC is valid
--8217-- Reading syms from /usr/lib/x86_64-linux-gnu/gconv/CP1252.so
--8217--   Considering /usr/lib/x86_64-linux-gnu/gconv/CP1252.so ..
--8217--   .. CRC mismatch (computed 4961cf62 wanted 8adf43ef)
--8217--   Considering /usr/lib/debug/usr/lib/x86_64-linux-gnu/gconv/CP1252.so ..
--8217--   .. CRC is valid
Check if server support long identifiers
	  1: SELECT 'x' AS this_is_a_really_really_long_identifier
trying to create a temporary stored procedure
Creating procedure #t0022
	  1: 
	  2: CREATE PROCEDURE #t0022 
	  3:   @null_input varchar(30) OUTPUT 
	  4: , @first_type varchar(30) OUTPUT 
	  5: , @nullout int OUTPUT
	  6: , @varchar_tds7_out varchar(8000) OUTPUT
	  7: , @nvarchar_tds7_out nvarchar(4000) OUTPUT
	  8: , @nrows int OUTPUT 
	  9: , @c_this_name_is_way_more_than_thirty_characters_charlie varchar(20)
	 10: , @nv nvarchar(20) = N'hello'
	 11: AS 
	 12: BEGIN 
	 13: if @null_input is not NULL begin 
	 14: 	select 'error: should be NULL' as status, @null_input as 'null_input'
	 15: 	return -42
	 16: end else begin
	 17: 	print 'Good: @null_input is NULL'
	 18: end
	 19: if @c_this_name_is_way_more_than_thirty_characters_charlie is not NULL begin 
	 20: 	select 'error: should be NULL' as status, @c_this_name_is_way_more_than_thirty_characters_charlie as '@c_this_name_is_way_more_than_thirty_characters_charlie'
	 21: 	return -42
	 22: end else begin
	 23: 	print 'Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL'
	 24: end
	 25: select @null_input = max(convert(varchar(30), name)) from systypes 
	 26: select @first_type = min(convert(varchar(30), name)) from systypes 
	 27: select name from sysobjects where 0=1
	 28: select distinct convert(varchar(30), name) as 'type'  from systypes 
	 29: where name in ('int', 'char', 'text') 
	 30: select @nrows = @@rowcount 
	 31: set @varchar_tds7_out = replicate(char(247), 8000)
	 32: set @nvarchar_tds7_out = replicate(nchar(246), 4000)
	 33: select distinct @nv as '@nv', convert(varchar(30), name) as name  from systypes
	 34: select	  @null_input as 'null_input'
	 35: 	, @first_type as 'first_type'
	 36: 	, @nullout as 'nullout'
	 37: 	, @nrows as 'nrows'
	 38: 	, @c_this_name_is_way_more_than_thirty_characters_charlie as 'c'
	 39: 	, @nv as 'nv'
	 40: 	into #parameters
	 41: select * from #parameters
	 42: return 42 
	 43: END 
	 44: 
Created procedure #t0022
executing dbrpcinit
executing dbrpcparam for @null_input
executing dbrpcparam for @first_type
executing dbrpcparam for @nullout
executing dbrpcparam for @varchar_tds7_out
executing dbrpcparam for @nvarchar_tds7_out
executing dbrpcparam for @nrows
executing dbrpcparam for @c_this_name_is_way_more_than_thirty_characters_charlie
executing dbrpcparam for @nv
executing dbrpcsend
executing dbsqlok
Good: @null_input is NULL
Good: @c_this_name_is_way_more_than_thirty_characters_charlie is NULL
fetching results
fetched resultset 1 successfully:
column 1 (name) is 1 wide, buffer initialized to 'one'
name 
row count 0
fetched resultset 2 successfully:
column 1 (type) is 1 wide, buffer initialized to 'one'
type 
char 
int 
text 
row count 3
fetched resultset 3 successfully:
column 1 (@nv) is 1 wide, buffer initialized to 'one'
column 2 (name) is 1 wide, buffer initialized to 'two'
@nv name 
OK bigint 
OK binary 
OK bit 
OK char 
OK datetime 
OK decimal 
OK float 
OK image 
OK int 
OK money 
OK nchar 
OK ntext 
OK numeric 
OK nvarchar 
OK real 
OK smalldatetime 
OK smallint 
OK smallmoney 
OK sql_variant 
OK sysname 
OK text 
OK timestamp 
OK tinyint 
OK uniqueidentifier 
OK varbinary 
OK varchar 
row count 26
fetched resultset 4 successfully:
column 1 (null_input) is 1 wide, buffer initialized to 'one'
column 2 (first_type) is 1 wide, buffer initialized to 'two'
column 3 (nullout) is 1 wide, buffer initialized to 'three'
column 4 (nrows) is 1 wide, buffer initialized to 'four'
column 5 (c) is 1 wide, buffer initialized to 'five'
null_input first_type nullout nrows c 
varchar bigint   3   
row count 1
retrieving return status...
42
retrieving output parameters...
param name                  type length  data                          
----  -------------------   ----  ----- ------------------------------
1     @null_input             39      7  varchar                       
2     @first_type             39      6  bigint                        
3     @nullout                56      0                                
4     @varchar_tds7_out       39   8000  ÷÷÷÷÷÷÷÷÷÷...                 
5     @nvarchar_tds7_out      39   4000  öööööööööö...                 
6     @nrows                  56      4  3                             
Good: Got 6 output parameters and 1 return status of 42.
Good: Got 4 resultsets and 1 empty resultset.
Dropping procedure
	  1: IF OBJECT_ID('t0022') IS NOT NULL DROP PROC t0022
--8217-- Discarding syms at 0x7d71700-0x7d72dd9 in /usr/lib/x86_64-linux-gnu/gconv/UTF-16.so due to munmap()
rpc.c OK
--8217-- REDIR: 0x53ae730 (libc.so.6:strcpy) redirected to 0x4a28770 (_vgnU_ifunc_wrapper)
--8217-- REDIR: 0x53c8fa0 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x4c30ab0 (strcpy)
--8217-- Discarding syms at 0x7f75600-0x7f76266 in /usr/lib/x86_64-linux-gnu/gconv/CP1252.so due to munmap()
--8217-- Discarding syms at 0x7b6e600-0x7b6f08d in /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so due to munmap()
--8217-- Discarding syms at 0x732f2d0-0x7334bf1 in /lib/x86_64-linux-gnu/libnss_compat-2.23.so due to munmap()
--8217-- Discarding syms at 0x77520b0-0x77588ce in /lib/x86_64-linux-gnu/libnss_nis-2.23.so due to munmap()
--8217-- Discarding syms at 0x753aff0-0x75481e1 in /lib/x86_64-linux-gnu/libnsl-2.23.so due to munmap()
--8217-- Discarding syms at 0x795e1b0-0x79642a1 in /lib/x86_64-linux-gnu/libnss_files-2.23.so due to munmap()
==8217== 
==8217== HEAP SUMMARY:
==8217==     in use at exit: 1,824 bytes in 27 blocks
==8217==   total heap usage: 2,239 allocs, 2,212 frees, 1,211,759 bytes allocated
==8217== 
==8217== Searching for pointers to 27 not-freed blocks
==8217== Checked 474,664 bytes
==8217== 
==8217== LEAK SUMMARY:
==8217==    definitely lost: 0 bytes in 0 blocks
==8217==    indirectly lost: 0 bytes in 0 blocks
==8217==      possibly lost: 0 bytes in 0 blocks
==8217==    still reachable: 0 bytes in 0 blocks
==8217==         suppressed: 1,824 bytes in 27 blocks
==8217== 
==8217== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--8217-- 
--8217-- used_suppression:     26 openssl leak 4 /home/freddy/suppressions.supp:27 suppressed: 1,792 bytes in 26 blocks
--8217-- used_suppression:      1 openssl leak 5 /home/freddy/suppressions.supp:38 suppressed: 32 bytes in 1 blocks
==8217== 
==8217== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Main