freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Crash in APACHE/PHP(compiled with sybase-ct) and FreeTDS 0.62.dev.20030714
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Crash in APACHE/PHP(compiled with sybase-ct) and FreeTDS 0.62.dev.20030714
- Date: Wed, 31 Mar 2004 20:30:05 +0200
Il lun, 2003-07-21 alle 18:35, Ben Vaughn ha scritto:
I know it's strange to reply to a 6-months old mail however it was still
on my mail...
Looking quite deeply results is very strange !!!
> A new apache bug springs to life! GDB follows:
>
> (gdb) file /usr/local/sbin/httpd
> Reading symbols from /usr/local/sbin/httpd...(no debugging symbols
> found)...done.
> (gdb) run -X
> Starting program: /usr/local/sbin/httpd -X
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> Deprecated bfd_read called at
> /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
> line 2627 in elfstab_build_psymtabs
>
> Deprecated bfd_read called at
> /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
> line 933 in fill_symbuf
>
> Apache/1.3.27 mod_ssl/2.8.14 (Pass Phrase Dialog)
> Some of your private key files are encrypted for security reasons.
> In order to read them you have to provide us with the pass phrases.
>
> Server 10.150.214.50:443 (RSA)
> Enter pass phrase:
>
> Ok: Pass Phrase Dialog successful.
> (no debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...(no debugging symbols
> found)...
>
> Program received signal SIGBUS, Bus error.
> 0x284cf2ad in tds_numeric_to_string (numeric=0x81b4564, s=0xbfbfda00
> ",ê\034\b") at numeric.c:279
> 279 *--pnum = number[n - 1] * 256 + number[n];
> (gdb) bt
Code is good, so problem occur if n < 1 or n > 15 (upper bound of
number).
> #0 0x284cf2ad in tds_numeric_to_string (numeric=0x81b4564, s=0xbfbfda00
> ",ê\034\b") at numeric.c:279
> #1 0x284ca9b5 in tds_convert_numeric (srctype=108, src=0x81b4564,
> srclen=0, desttype=47, cr=0xbfbfdafc) at convert.c:980
>
> #2 0x284cca26 in tds_convert (tds_ctx=0x80f2f70, srctype=108,
> src=0x81b4564 "", srclen=0, desttype=47, cr=0xbfbfdafc) at convert.c:1636
>
> #3 0x284bd47e in cs_convert (ctx=0x810c380, srcfmt=0xbfbfdc24,
> srcdata=0x81b4564, destfmt=0xbfbfdb78, destdata=0x81cea2c,
> resultlen=0xbfbfdb74) at cs.c:477
>
> #4 0x284b94ac in _ct_bind_data (cmd=0x81c3700, offset=0) at ct.c:1099
> #5 0x284b9283 in ct_fetch (cmd=0x81c3700, type=-99999, offset=-99999,
> option=-99999, rows_read=0x0) at ct.c:1010
> #6 0x283d27e6 in php_sybase_fetch_result_row (result=0x819a00c,
> numrows=-1) at /usr/src/php-4.3.3RC1/ext/sybase_ct/php_sybase_ct.c:1032
>
> #7 0x283d2d34 in php_sybase_fetch_result_set (sybase_ptr=0x81c314c,
> buffered=0, store=1) at
> /usr/src/php-4.3.3RC1/ext/sybase_ct/php_sybase_ct.c:1206
>
> #8 0x283d3121 in php_sybase_query (ht=2, return_value=0x81ce5ac,
> this_ptr=0x0, return_value_used=1, buffered=0)
> at /usr/src/php-4.3.3RC1/ext/sybase_ct/php_sybase_ct.c:1363
> #9 0x283d33ad in zif_sybase_query (ht=2, return_value=0x81ce5ac,
> this_ptr=0x0, return_value_used=1)
> at /usr/src/php-4.3.3RC1/ext/sybase_ct/php_sybase_ct.c:1476
> #10 0x2892471e in zend_assign_to_variable_reference () from
> /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
>
> #11 0x2892db76 in zend_oe () from
> /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
> #12 0x2841e8ba in zend_execute_scripts (type=8, retval=0x0, file_count=3)
> at /usr/src/php-4.3.3RC1/Zend/zend.c:886
> #13 0x283f6ce9 in php_execute_script (primary_file=0xbfbff9bc) at
> /usr/src/php-4.3.3RC1/main/main.c:1699
> #14 0x28436c9a in apache_php_module_main (r=0x817a038,
> display_source_mode=0) at /usr/src/php-4.3.3RC1/sapi/apache/sapi_apache.c:54
>
> #15 0x2843786e in send_php (r=0x817a038, display_source_mode=0,
> filename=0x0) at /usr/src/php-4.3.3RC1/sapi/apache/mod_php4.c:620
>
> #16 0x284378ce in send_parsed_php (r=0x817a038) at
> /usr/src/php-4.3.3RC1/sapi/apache/mod_php4.c:635
> #17 0x8053690 in ap_invoke_handler ()
> #18 0x80631b1 in process_request_internal ()
> #19 0x8063210 in ap_process_request ()
> #20 0x805c646 in child_main ()
> #21 0x805c7d8 in make_child ()
> #22 0x805c8f5 in startup_children ()
> #23 0x805cde4 in standalone_main ()
> #24 0x805d4df in main ()
> #25 0x804fadd in _start ()
> (gdb)
>
> TDSDUMP (ignore the login packet, I killed the password hex):
> Starting log file for FreeTDS 0.62.dev.20030715
> on 2003-07-21 16:30:49 with debug level 99.
> Using trivial iconv from
> iconv.c
> names for ISO-8859-1: ISO-8859-1
> names for US-ASCII: US-ASCII
> names for UCS-2LE: UCS-2LE
> names for UCS-2BE: (null)
> iconv to convert client-side data to the "ISO-8859-1" character set
> 16:30:49.659283 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
> 16:30:49.659310 Connecting to 10.150.250.10 port 10033, TDS 5.0.
> Sending packet @ 16:30:49.718914
> 0000 02 00 02 00 00 00 00 00-6d 61 6e 61 67 65 2e 70 |........ manage.p|
> 0010 69 63 6b 65 74 2d 66 65-6e 63 65 2e 6f 72 67 00 |icket-fe nce.org.|
> 0020 00 00 00 00 00 00 17 69-64 73 6d 64 63 00 00 00 |.......i dsmdc...|
> 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
>
> 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0060 00 00 00 00 0a 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
> 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 00 00 |........ ........|
> 0090 00 00 00 00 50 48 50 20-34 2e 30 00 00 00 00 00 |....PHP 4.0.....|
> 00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00b0 00 00 07 69 64 73 6d 64-63 00 00 00 00 00 00 00 |...idsmd c.......|
> 00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
>
> 00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01d0 00 0c 05 00 00 00 43 54-2d 4c 69 62 72 61 72 79 |......CT -Library|
> 01e0 0a 05 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
> 01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|
>
>
> Sending packet @ 16:30:49.719441
> 0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
> 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
> 0020 5f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |_1...... ........|
> 0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
> 0040 00 00 00 03 00 00 00 00-e2 16 00 01 09 00 00 06 |........ ........|
> 0050 6d 7f ff ff ff fe 02 09-00 00 00 00 0a 68 00 00 |m....... .....h..|
> 0060 00 - |.|
>
>
> 16:30:49.719556 tds_process_login_tokens()
> Received header @ 16:30:49.960487
> 0000 04 01 00 5b 00 00 00 00- |...[....|
>
>
> Received packet @ 16:30:49.960520
> 0000 e3 09 00 03 06 63 70 31-32 35 32 00 ad 22 00 05 |.....cp1 252.."..|
> 0010 05 00 00 00 18 41 64 61-70 74 69 76 65 20 53 65 |.....Ada ptive Se|
> 0020 72 76 65 72 20 41 6e 79-77 68 65 72 65 07 00 00 |rver Any where...|
> 0030 00 e2 16 00 01 09 00 00-06 61 01 ff ff fe e6 02 |........ .a......|
> 0040 09 ff ff 00 00 0a 68 00-00 0a fd 00 00 01 00 00 |......h. ........|
> 0050 00 00 00 - |...|
>
ASA 7.0.0. Original code page cp1252 ??? Windows ??
>
> 16:30:49.960619 looking for login token, got e3(ENVCHANGE)
> 16:30:49.960631 tds_process_default_tokens() marker is e3(ENVCHANGE)
> tds_get_string: reading 6 from wire to give 6 to client.
> 16:30:49.960665 looking for login token, got ad(LOGINACK)
> 16:30:49.960678 looking for login token, got e2(CAPABILITY)
> 16:30:49.960687 tds_process_default_tokens() marker is e2(CAPABILITY)
> 16:30:49.960697 looking for login token, got fd(DONE)
> 16:30:49.960705 tds_process_default_tokens() marker is fd(DONE)
> 16:30:49.960714 tds_process_end() more_results = 0, was_cancelled = 0
> 16:30:49.960723 leaving tds_process_login_tokens() returning 1
> Sending packet @ 16:30:49.960738
> 0000 0f 01 00 21 00 00 00 00-21 14 00 00 00 00 73 65 |...!.... !.....se|
> 0010 74 20 74 65 78 74 73 69-7a 65 20 36 34 35 31 32 |t textsi ze 64512|
> 0020 20 - | |
>
>
> Received header @ 16:30:50.021321
> 0000 04 01 00 11 00 00 00 00- |........|
>
>
> Received packet @ 16:30:50.021351
> 0000 fd 00 00 01 00 00 00 00-00 |........ .|
>
>
> 16:30:50.021375 processing result tokens. marker is fd(DONE)
> 16:30:50.021385 tds_process_end() more_results = 0, was_cancelled = 0
> 16:30:50.021395 tds_process_result_tokens() state is COMPLETED
> 16:30:50.021407 leaving ct_connect() returning 1
> 16:30:50.021417 ct_cmd_alloc()
> 16:30:50.021470 ct_command()
> 16:30:50.021482 ct_send()
> Sending packet @ 16:30:50.021494
> 0000 0f 01 00 18 00 00 00 00-21 0b 00 00 00 00 75 73 |........ !.....us|
> 0010 65 20 69 64 73 6d 64 63- |e idsmdc|
>
>
> 16:30:50.021542 ct_send() succeeded
> 16:30:50.021553 ct_results()
> Received header @ 16:30:50.080908
> 0000 04 01 00 11 00 00 00 00- |........|
>
>
> Received packet @ 16:30:50.080938
> 0000 fd 00 00 01 00 00 00 00-00 |........ .|
>
>
> 16:30:50.080962 processing result tokens. marker is fd(DONE)
> 16:30:50.080972 tds_process_end() more_results = 0, was_cancelled = 0
> 16:30:50.080982 ct_results() process_result_tokens returned 1 (type 4052)
> 16:30:50.080992 ct_results()
> 16:30:50.081000 tds_process_result_tokens() state is COMPLETED
> 16:30:50.081007 ct_results() process_result_tokens returned 2 (type 4052)
> 16:30:50.081052 ct_command()
> 16:30:50.081069 ct_send()
> Sending packet @ 16:30:50.081084
> 0000 0f 00 02 00 00 00 00 00-21 a7 03 00 00 00 73 65 |........ !.....se|
> 0010 6c 65 63 74 20 74 6f 70-20 31 30 20 61 6c 65 72 |lect top 10 aler|
> 0020 74 5f 74 61 62 6c 65 2e-61 6c 65 72 74 5f 75 6e |t_table. alert_un|
> 0030 69 71 75 65 5f 69 64 20-61 73 20 49 44 2c 0a 09 |ique_id as ID,..|
> 0040 09 20 65 76 65 6e 74 5f-73 74 6f 72 61 67 65 5f |. event_ storage_|
> 0050 74 69 6d 65 20 61 73 20-41 4c 45 52 54 5f 54 49 |time as ALERT_TI|
> 0060 4d 45 2c 0a 09 09 20 67-65 74 45 76 65 6e 74 54 |ME,... g etEventT|
> 0070 69 6d 65 73 74 61 6d 70-28 65 76 65 6e 74 5f 74 |imestamp (event_t|
> 0080 69 6d 65 29 20 61 73 20-49 44 53 5f 54 49 4d 45 |ime) as IDS_TIME|
> 0090 2c 0a 09 09 20 61 6c 65-72 74 5f 74 61 62 6c 65 |,... ale rt_table|
> 00a0 2e 73 65 76 65 72 69 74-79 20 61 73 20 53 45 56 |.severit y as SEV|
> 00b0 45 52 49 54 59 2c 0a 09-09 20 73 72 63 5f 68 6f |ERITY,.. . src_ho|
> 00c0 73 74 5f 69 64 20 61 73-20 49 44 53 5f 49 44 2c |st_id as IDS_ID,|
> 00d0 0a 09 09 20 73 79 73 5f-73 65 6e 73 6f 72 73 2e |... sys_ sensors.|
> 00e0 6e 61 6d 65 20 61 73 20-53 45 4e 53 4f 52 5f 4e |name as SENSOR_N|
> 00f0 41 4d 45 2c 0a 09 09 20-73 79 73 5f 73 65 6e 73 |AME,... sys_sens|
> 0100 6f 72 73 2e 6f 72 67 5f-6e 61 6d 65 20 61 73 20 |ors.org_ name as |
> 0110 4f 52 47 41 4e 49 5a 41-54 49 4f 4e 2c 0a 09 09 |ORGANIZA TION,...|
> 0120 20 61 6c 65 72 74 5f 74-61 62 6c 65 2e 73 69 67 | alert_t able.sig|
> 0130 5f 69 64 20 61 73 20 53-49 47 4e 41 54 55 52 45 |_id as S IGNATURE|
> 0140 5f 49 44 2c 0a 09 09 20-61 6c 65 72 74 5f 74 61 |_ID,... alert_ta|
> 0150 62 6c 65 2e 73 75 62 5f-73 69 67 5f 69 64 20 61 |ble.sub_ sig_id a|
> 0160 73 20 53 53 49 47 4e 41-54 55 52 45 5f 49 44 2c |s SSIGNA TURE_ID,|
> 0170 0a 09 09 20 61 74 74 61-63 6b 65 72 5f 61 64 64 |... atta cker_add|
> 0180 72 65 73 73 20 61 73 20-53 52 43 5f 49 50 2c 0a |ress as SRC_IP,.|
> 0190 09 09 20 61 74 74 61 63-6b 65 72 5f 6c 6f 63 61 |.. attac ker_loca|
> 01a0 6c 69 74 79 20 61 73 20-53 52 43 5f 4c 4f 43 41 |lity as SRC_LOCA|
> 01b0 4c 49 54 59 2c 0a 09 09-20 61 74 74 61 63 6b 65 |LITY,... attacke|
> 01c0 72 5f 70 6f 72 74 5f 6e-75 6d 62 65 72 20 61 73 |r_port_n umber as|
> 01d0 20 53 52 43 5f 50 4f 52-54 2c 0a 09 09 20 76 69 | SRC_POR T,... vi|
> 01e0 63 74 69 6d 5f 61 64 64-72 65 73 73 20 61 73 20 |ctim_add ress as |
> 01f0 44 53 54 5f 49 50 2c 0a-09 09 20 76 69 63 74 69 |DST_IP,. .. victi|
>
>
> Sending packet @ 16:30:50.081613
> 0000 0f 01 01 bc 00 00 00 00-6d 5f 6c 6f 63 61 6c 69 |........ m_locali|
> 0010 74 79 20 61 73 20 44 53-54 5f 4c 4f 43 41 4c 49 |ty as DS T_LOCALI|
> 0020 54 59 2c 0a 09 09 20 76-69 63 74 69 6d 5f 70 6f |TY,... v ictim_po|
> 0030 72 74 5f 6e 75 6d 62 65-72 20 61 73 20 44 53 54 |rt_numbe r as DST|
> 0040 5f 50 4f 52 54 2c 0a 09-09 20 61 6c 65 72 74 5f |_PORT,.. . alert_|
> 0050 64 65 74 61 69 6c 73 20-61 73 20 44 45 54 41 49 |details as DETAI|
> 0060 4c 53 2c 0a 09 09 20 61-74 74 61 63 6b 65 72 5f |LS,... a ttacker_|
> 0070 63 6f 6e 74 65 78 74 20-61 73 20 53 52 43 5f 43 |context as SRC_C|
> 0080 4f 4e 54 45 58 54 2c 0a-09 09 20 76 69 63 74 69 |ONTEXT,. .. victi|
> 0090 6d 5f 63 6f 6e 74 65 78-74 20 61 73 20 44 53 54 |m_contex t as DST|
> 00a0 5f 43 4f 4e 54 45 58 54-0a 09 09 20 20 66 72 6f |_CONTEXT ... fro|
> 00b0 6d 20 73 79 73 5f 73 65-6e 73 6f 72 73 2c 0a 09 |m sys_se nsors,..|
> 00c0 09 20 20 69 64 73 6d 64-63 2e 41 4c 45 52 54 5f |. idsmd c.ALERT_|
> 00d0 54 41 42 4c 45 20 6c 65-66 74 20 6f 75 74 65 72 |TABLE le ft outer|
> 00e0 20 6a 6f 69 6e 20 69 64-73 6d 64 63 2e 43 6f 72 | join id smdc.Cor|
> 00f0 72 65 6c 61 74 65 64 5f-41 74 74 61 63 6b 73 20 |related_ Attacks |
> 0100 6f 6e 0a 09 09 20 20 41-4c 45 52 54 5f 54 41 42 |on... A LERT_TAB|
> 0110 4c 45 2e 61 6c 65 72 74-5f 75 6e 69 71 75 65 5f |LE.alert _unique_|
> 0120 69 64 20 3d 20 43 6f 72-72 65 6c 61 74 65 64 5f |id = Cor related_|
> 0130 41 74 74 61 63 6b 73 2e-61 6c 65 72 74 5f 75 6e |Attacks. alert_un|
> 0140 69 71 75 65 5f 69 64 0a-09 09 20 20 57 68 65 72 |ique_id. .. Wher|
> 0150 65 20 41 4c 45 52 54 5f-54 41 42 4c 45 2e 73 72 |e ALERT_ TABLE.sr|
> 0160 63 5f 68 6f 73 74 5f 69-64 20 3d 20 73 79 73 5f |c_host_i d = sys_|
> 0170 73 65 6e 73 6f 72 73 2e-68 6f 73 74 5f 69 64 20 |sensors. host_id |
> 0180 61 6e 64 0a 09 09 20 20-65 76 65 6e 74 5f 73 74 |and... event_st|
> 0190 6f 72 61 67 65 5f 74 69-6d 65 20 3e 3d 20 28 27 |orage_ti me >= ('|
> 01a0 32 30 30 33 2d 30 37 2d-31 31 20 30 30 3a 30 31 |2003-07- 11 00:01|
> 01b0 3a 30 30 2e 30 30 30 30-30 30 27 29 |:00.0000 00')|
>
>
> 16:30:50.082067 ct_send() succeeded
> 16:30:50.082078 ct_results()
> Received header @ 16:30:50.380214
> 0000 04 00 01 fe 00 00 00 00- |........|
>
>
> Received packet @ 16:30:50.380249
> 0000 ee ac 01 12 00 02 49 44-10 0d 00 00 00 6c 09 13 |......ID .....l..|
> 0010 00 00 0a 41 4c 45 52 54-5f 54 49 4d 45 10 50 00 |...ALERT _TIME.P.|
> 0020 00 00 3d 00 08 49 44 53-5f 54 49 4d 45 20 50 00 |..=..IDS _TIME P.|
> 0030 00 00 6f 08 00 08 53 45-56 45 52 49 54 59 30 05 |..o...SE VERITY0.|
> 0040 00 00 00 26 01 00 06 49-44 53 5f 49 44 30 0d 00 |...&...I DS_ID0..|
> 0050 00 00 6c 05 09 00 00 0b-53 45 4e 53 4f 52 5f 4e |..l..... SENSOR_N|
> 0060 41 4d 45 10 02 00 00 00-27 40 00 0c 4f 52 47 41 |AME..... '@..ORGA|
> 0070 4e 49 5a 41 54 49 4f 4e-30 02 00 00 00 27 40 00 |NIZATION 0....'@.|
> 0080 0c 53 49 47 4e 41 54 55-52 45 5f 49 44 30 0d 00 |.SIGNATU RE_ID0..|
> 0090 00 00 6c 05 09 00 00 0d-53 53 49 47 4e 41 54 55 |..l..... SSIGNATU|
> 00a0 52 45 5f 49 44 30 0d 00-00 00 6c 05 09 00 00 06 |RE_ID0.. ..l.....|
> 00b0 53 52 43 5f 49 50 30 0d-00 00 00 6c 05 09 00 00 |SRC_IP0. ...l....|
> 00c0 0c 53 52 43 5f 4c 4f 43-41 4c 49 54 59 30 02 00 |.SRC_LOC ALITY0..|
> 00d0 00 00 27 11 00 08 53 52-43 5f 50 4f 52 54 30 07 |..'...SR C_PORT0.|
> 00e0 00 00 00 26 04 00 06 44-53 54 5f 49 50 30 0d 00 |...&...D ST_IP0..|
> 00f0 00 00 6c 05 09 00 00 0c-44 53 54 5f 4c 4f 43 41 |..l..... DST_LOCA|
> 0100 4c 49 54 59 30 02 00 00-00 27 11 00 08 44 53 54 |LITY0... .'...DST|
> 0110 5f 50 4f 52 54 30 07 00-00 00 26 04 00 07 44 45 |_PORT0.. ..&...DE|
> 0120 54 41 49 4c 53 30 03 00-00 00 22 00 fc 00 00 19 |TAILS0.. ..".....|
> 0130 00 69 64 73 6d 64 63 2e-69 64 73 6d 64 63 2e 41 |.idsmdc. idsmdc.A|
> 0140 4c 45 52 54 5f 54 41 42-4c 45 00 0b 53 52 43 5f |LERT_TAB LE..SRC_|
> 0150 43 4f 4e 54 45 58 54 30-02 00 00 00 23 00 fc 00 |CONTEXT0 ....#...|
> 0160 00 19 00 69 64 73 6d 64-63 2e 69 64 73 6d 64 63 |...idsmd c.idsmdc|
> 0170 2e 41 4c 45 52 54 5f 54-41 42 4c 45 00 0b 44 53 |.ALERT_T ABLE..DS|
> 0180 54 5f 43 4f 4e 54 45 58-54 30 02 00 00 00 23 00 |T_CONTEX T0....#.|
> 0190 fc 00 00 19 00 69 64 73-6d 64 63 2e 69 64 73 6d |.....ids mdc.idsm|
> 01a0 64 63 2e 41 4c 45 52 54-5f 54 41 42 4c 45 00 d1 |dc.ALERT _TABLE..|
So we have
- 1 numeric
- 1 datetime
- 1 nullable datetime
- 1 nullable integer (1 byte long)
- 1 numeric
- 2 varchar
- 3 numeric
- 1 varchar
- 1 nullable integer (4 byte long)
- 1 numeric
- 1 varchar
- 1 nullable integer (4 byte long)
- 1 image
- 2 text
> 01b0 09 00 00 00 00 00 00 41-6f c4 bd 93 00 00 6a e8 |.......A o.....j.|
> 01c0 ba 00
numeric & datetime
> 08 bd 93 00 00 44-b8 11 01
nullable datetime
> 01 02
nullable integer
> 05 00 00 |.......D ........|
> 01d0 00 00 08
numeric
> 03 63 6d 73 0b-70 69 63 6b 65 74 66 65 |....cms. picketfe|
> 01e0 6e 63 65
2 varchar
> 05 00 00 00 14-06 05 00 00 00 00 00 05 |nce..... ........|
> 01f0 00 00 00 00 00
3 numeric
> 03 - |......|
>
>
> 16:30:50.380768 processing result tokens. marker is ee(RESULT)
> tds_get_string: reading 2 from wire to give 2 to client.
> 16:30:50.380821 processing result. type = 108(numeric), varint_size 1
> 16:30:50.380833 processing result. column_size 9
> tds_get_string: reading 10 from wire to give 10 to client.
> 16:30:50.380850 processing result. type = 61(datetime), varint_size 0
> 16:30:50.380861 processing result. column_size 8
> tds_get_string: reading 8 from wire to give 8 to client.
> 16:30:50.380875 processing result. type = 111(datetime-null), varint_size 1
> 16:30:50.380884 processing result. column_size 8
> tds_get_string: reading 8 from wire to give 8 to client.
> 16:30:50.380898 processing result. type = 38(integer-null), varint_size 1
> 16:30:50.380907 processing result. column_size 1
> tds_get_string: reading 6 from wire to give 6 to client.
> 16:30:50.380921 processing result. type = 108(numeric), varint_size 1
> 16:30:50.380930 processing result. column_size 5
> tds_get_string: reading 11 from wire to give 11 to client.
> 16:30:50.380944 processing result. type = 39(varchar), varint_size 1
> 16:30:50.380953 processing result. column_size 64
> tds_get_string: reading 12 from wire to give 12 to client.
> 16:30:50.380977 processing result. type = 39(varchar), varint_size 1
> 16:30:50.380990 processing result. column_size 64
> tds_get_string: reading 12 from wire to give 12 to client.
> 16:30:50.381004 processing result. type = 108(numeric), varint_size 1
> 16:30:50.381014 processing result. column_size 5
> tds_get_string: reading 13 from wire to give 13 to client.
> 16:30:50.381028 processing result. type = 108(numeric), varint_size 1
> 16:30:50.381037 processing result. column_size 5
> tds_get_string: reading 6 from wire to give 6 to client.
> 16:30:50.381051 processing result. type = 108(numeric), varint_size 1
> 16:30:50.381061 processing result. column_size 5
> tds_get_string: reading 12 from wire to give 12 to client.
> 16:30:50.381074 processing result. type = 39(varchar), varint_size 1
> 16:30:50.381083 processing result. column_size 17
> tds_get_string: reading 8 from wire to give 8 to client.
> 16:30:50.381097 processing result. type = 38(integer-null), varint_size 1
> 16:30:50.381106 processing result. column_size 4
> tds_get_string: reading 6 from wire to give 6 to client.
> 16:30:50.381119 processing result. type = 108(numeric), varint_size 1
> 16:30:50.381128 processing result. column_size 5
> tds_get_string: reading 12 from wire to give 12 to client.
> 16:30:50.381142 processing result. type = 39(varchar), varint_size 1
> 16:30:50.381151 processing result. column_size 17
> tds_get_string: reading 8 from wire to give 8 to client.
> 16:30:50.381165 processing result. type = 38(integer-null), varint_size 1
> 16:30:50.381174 processing result. column_size 4
> tds_get_string: reading 7 from wire to give 7 to client.
> 16:30:50.381187 processing result. type = 34(image), varint_size 4
> tds_get_string: reading 25 from wire to give 25 to client.
> 16:30:50.381201 processing result. column_size 64512
> tds_get_string: reading 11 from wire to give 11 to client.
> 16:30:50.381215 processing result. type = 35(text), varint_size 4
> tds_get_string: reading 25 from wire to give 25 to client.
> 16:30:50.381229 processing result. column_size 64512
> tds_get_string: reading 11 from wire to give 11 to client.
> 16:30:50.381262 processing result. type = 35(text), varint_size 4
> tds_get_string: reading 25 from wire to give 25 to client.
> 16:30:50.381279 processing result. column_size 64512
> 16:30:50.381290 ct_results() process_result_tokens returned 1 (type 4049)
> 16:30:50.381299 processing result tokens. marker is d1(ROW)
> 16:30:50.381310 ct_results() process_result_tokens returned 1 (type 4040)
> 16:30:50.381321 ct_res_info()
> 16:30:50.381329 ct_res_info(): Number of columns is 18
> 16:30:50.381360 ct_describe()
> 16:30:50.381372 _ct_get_client_type(type 108, size 9)
> 16:30:50.381382 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381392 ct_bind() datafmt count = 1 column_number = 1
> 16:30:50.381401 ct_describe()
> 16:30:50.381409 _ct_get_client_type(type 61, size 8)
> 16:30:50.381418 ct_describe() datafmt->datatype = 6 server type 61
> 16:30:50.381427 ct_bind() datafmt count = 1 column_number = 2
> 16:30:50.381436 ct_describe()
> 16:30:50.381443 _ct_get_client_type(type 111, size 8)
> 16:30:50.381452 ct_describe() datafmt->datatype = 6 server type 111
> 16:30:50.381461 ct_bind() datafmt count = 1 column_number = 3
> 16:30:50.381469 ct_describe()
> 16:30:50.381477 _ct_get_client_type(type 38, size 1)
> 16:30:50.381485 ct_describe() datafmt->datatype = 4 server type 38
> 16:30:50.381494 ct_bind() datafmt count = 1 column_number = 4
> 16:30:50.381503 ct_describe()
> 16:30:50.381510 _ct_get_client_type(type 108, size 5)
> 16:30:50.381518 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381527 ct_bind() datafmt count = 1 column_number = 5
> 16:30:50.381536 ct_describe()
> 16:30:50.381543 _ct_get_client_type(type 39, size 64)
> 16:30:50.381552 ct_describe() datafmt->datatype = 1 server type 39
> 16:30:50.381562 ct_bind() datafmt count = 1 column_number = 6
> 16:30:50.381573 ct_describe()
> 16:30:50.381581 _ct_get_client_type(type 39, size 64)
> 16:30:50.381590 ct_describe() datafmt->datatype = 1 server type 39
> 16:30:50.381601 ct_bind() datafmt count = 1 column_number = 7
> 16:30:50.381611 ct_describe()
> 16:30:50.381633 _ct_get_client_type(type 108, size 5)
> 16:30:50.381644 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381654 ct_bind() datafmt count = 1 column_number = 8
> 16:30:50.381663 ct_describe()
> 16:30:50.381670 _ct_get_client_type(type 108, size 5)
> 16:30:50.381679 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381688 ct_bind() datafmt count = 1 column_number = 9
> 16:30:50.381697 ct_describe()
> 16:30:50.381705 _ct_get_client_type(type 108, size 5)
> 16:30:50.381714 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381723 ct_bind() datafmt count = 1 column_number = 10
> 16:30:50.381732 ct_describe()
> 16:30:50.381739 _ct_get_client_type(type 39, size 17)
> 16:30:50.381748 ct_describe() datafmt->datatype = 1 server type 39
> 16:30:50.381758 ct_bind() datafmt count = 1 column_number = 11
> 16:30:50.381767 ct_describe()
> 16:30:50.381775 _ct_get_client_type(type 38, size 4)
> 16:30:50.381784 ct_describe() datafmt->datatype = 2 server type 38
> 16:30:50.381793 ct_bind() datafmt count = 1 column_number = 12
> 16:30:50.381802 ct_describe()
> 16:30:50.381810 _ct_get_client_type(type 108, size 5)
> 16:30:50.381818 ct_describe() datafmt->datatype = 7 server type 108
> 16:30:50.381828 ct_bind() datafmt count = 1 column_number = 13
> 16:30:50.381836 ct_describe()
> 16:30:50.381844 _ct_get_client_type(type 39, size 17)
> 16:30:50.381853 ct_describe() datafmt->datatype = 1 server type 39
> 16:30:50.381863 ct_bind() datafmt count = 1 column_number = 14
> 16:30:50.381873 ct_describe()
> 16:30:50.381890 _ct_get_client_type(type 38, size 4)
> 16:30:50.381899 ct_describe() datafmt->datatype = 2 server type 38
> 16:30:50.381908 ct_bind() datafmt count = 1 column_number = 15
> 16:30:50.381919 ct_describe()
> 16:30:50.381927 _ct_get_client_type(type 34, size 64512)
> 16:30:50.381936 ct_describe() datafmt->datatype = 11 server type 34
> 16:30:50.381957 ct_bind() datafmt count = 1 column_number = 16
> 16:30:50.381969 ct_describe()
> 16:30:50.381978 _ct_get_client_type(type 35, size 64512)
> 16:30:50.381986 ct_describe() datafmt->datatype = 16 server type 35
> 16:30:50.382014 ct_bind() datafmt count = 1 column_number = 17
> 16:30:50.382026 ct_describe()
> 16:30:50.382034 _ct_get_client_type(type 35, size 64512)
> 16:30:50.382043 ct_describe() datafmt->datatype = 16 server type 35
> 16:30:50.382059 ct_bind() datafmt count = 1 column_number = 18
> 16:30:50.382079 ct_fetch()
> 16:30:50.382089 processing row tokens. marker is d1(ROW)
> 16:30:50.382100 processing row. column is 0 varint size = 1
> 16:30:50.382111 processing row. column size is 9
> 16:30:50.382121 clearing column 0 NULL bit
> 16:30:50.382129 processing row. column is 1 varint size = 0
> 16:30:50.382138 processing row. column size is 8
> 16:30:50.382147 clearing column 1 NULL bit
> 16:30:50.382157 processing row. column is 2 varint size = 1
> 16:30:50.382166 processing row. column size is 8
> 16:30:50.382173 clearing column 2 NULL bit
> 16:30:50.382181 processing row. column is 3 varint size = 1
> 16:30:50.382189 processing row. column size is 1
> 16:30:50.382197 clearing column 3 NULL bit
> 16:30:50.382205 processing row. column is 4 varint size = 1
> 16:30:50.382213 processing row. column size is 5
> 16:30:50.382221 clearing column 4 NULL bit
> 16:30:50.382229 processing row. column is 5 varint size = 1
> 16:30:50.382237 processing row. column size is 3
> 16:30:50.382245 clearing column 5 NULL bit
> tds_get_char_data: reading 3 on wire for 0 to client
> 16:30:50.382258 processing row. column is 6 varint size = 1
> 16:30:50.382266 processing row. column size is 11
> 16:30:50.382274 clearing column 6 NULL bit
> tds_get_char_data: reading 11 on wire for 0 to client
> 16:30:50.382286 processing row. column is 7 varint size = 1
> 16:30:50.382295 processing row. column size is 5
> 16:30:50.382303 clearing column 7 NULL bit
> 16:30:50.382311 processing row. column is 8 varint size = 1
> 16:30:50.382319 processing row. column size is 5
> 16:30:50.382327 clearing column 8 NULL bit
> 16:30:50.382336 processing row. column is 9 varint size = 1
> 16:30:50.382344 processing row. column size is 5
> 16:30:50.382352 clearing column 9 NULL bit
> 16:30:50.382370 processing row. column is 10 varint size = 1
> 16:30:50.382381 processing row. column size is 3
> 16:30:50.382389 clearing column 10 NULL bit
> tds_get_char_data: reading 3 on wire for 0 to client
> Received header @ 16:30:50.384093
> 0000 04 00 01 70 00 00 00 00- |...p....|
>
>
> Received packet @ 16:30:50.384124
> 0000 4f 55 54
varchar
> 08 32 0d 00 00-00 00 00 00
??? what is this ???
server told that column is 4 byte maximun and it return a 8 byte long
integer !!!
FreeTDS read only 4 bytes, on next read it reads a numeric like "00 00
00 00 05", precision is 0 (first byte), from code
num_bytes = tds_numeric_bytes_per_prec[numeric->precision];
n = num_bytes - 1;
pnum = packet_end;
for (; n > 1; n -= 2)
*--pnum = number[n - 1] * 256 + number[n];
here n == 254 (tds_numeric_bytes_per_prec[0] == 255) !!! core...
> 05 00 00 00 |OUT.2... ........|
> 0010 00 00
Yes... this should be the numeric
> 02 49 4e
varchar
> 08 50 00-00 00 00 00 00 00
??? another extended integer...
> 10 47 |...IN.P. .......G|
> 0020 2b 01 00 05 00 00 00 e0-00 00 00 05 e0 47 2b 00 |+....... .....G+.|
> 0030 00 00 00 00 00 00 00 11-00 00 00 2e 69 64 61 3f |........ ....ida?|
> 0040 3c 32 30 30 2b 20 63 68-61 72 73 3e
text ".ida?<200+ chars>"
> 10 47 2b 01 |<200+ ch ars>.G+.|
> 0050 00 05 00 00 00 e0 00 00-00 05 e0 47 2b 00 00 00 |........ ...G+...|
> 0060 00 00 00 00 00 00 02 00-00 35 38 35 38 35 38 35 |........ .5858585|
> 0070 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0080 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0090 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00a0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00b0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00c0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00d0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00e0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 00f0 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0100 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0110 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0120 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 35 |85858585 85858585|
> 0130 38 35 38 35 38 35 38 35-38 35 38 35 38 35 38 32 |85858585 85858582|
> 0140 35 37 35 33 39 33 30 33-39 33 30 32 35 37 35 33 |57539303 93025753|
> 0150 36 33 38 33 35 33 38 32-35 37 35 36 33 36 32 36 |63835382 57563626|
> 0160 34 33 33 32 35 37 35 33- |43325753|
>
image (longer...)
>
> 16:30:50.384468 processing row. column is 11 varint size = 1
> 16:30:50.384491 processing row. column size is 8
> 16:30:50.384501 clearing column 11 NULL bit
> 16:30:50.384510 ct_fetch()process_row_tokens returned 1
> 16:30:50.384519 _ct_bind_data()
> 16:30:50.384526 _ct_get_server_type(1)
> 16:30:50.384535 _ct_get_client_type(type 108, size 9)
> 16:30:50.384545 cs_convert()
> 16:30:50.384554 _ct_get_server_type(7)
> 16:30:50.384563 _ct_get_server_type(1)
> 16:30:50.384571 cs_convert() srctype = 108 (35) desttype = 47 (22)
> 16:30:50.384582 cs_convert() calling tds_convert
> 16:30:50.384596 cs_convert() tds_convert returned 7
> 16:30:50.384607 cs_convert() FMT_NULLTERM
> 16:30:50.384616 cs_convert() returning 1
> 16:30:50.384624 _ct_get_server_type(1)
> 16:30:50.384633 _ct_get_client_type(type 61, size 8)
> 16:30:50.384641 cs_convert()
> 16:30:50.384649 _ct_get_server_type(6)
> 16:30:50.384657 _ct_get_server_type(1)
> 16:30:50.384665 cs_convert() srctype = 61 (8) desttype = 47 (30)
> 16:30:50.384674 cs_convert() calling tds_convert
> 16:30:50.384695 cs_convert() tds_convert returned 19
> 16:30:50.384705 cs_convert() FMT_NULLTERM
> 16:30:50.384713 cs_convert() returning 1
> 16:30:50.384721 _ct_get_server_type(1)
> 16:30:50.384730 _ct_get_client_type(type 111, size 8)
> 16:30:50.384739 cs_convert()
> 16:30:50.384746 _ct_get_server_type(6)
> 16:30:50.384754 _ct_get_server_type(1)
> 16:30:50.384762 cs_convert() srctype = 61 (8) desttype = 47 (30)
> 16:30:50.384771 cs_convert() calling tds_convert
> 16:30:50.384784 cs_convert() tds_convert returned 19
> 16:30:50.384811 cs_convert() FMT_NULLTERM
> 16:30:50.384820 cs_convert() returning 1
> 16:30:50.384828 _ct_get_server_type(1)
> 16:30:50.384836 _ct_get_client_type(type 38, size 1)
> 16:30:50.384845 cs_convert()
> 16:30:50.384852 _ct_get_server_type(4)
> 16:30:50.384860 _ct_get_server_type(1)
> 16:30:50.384868 cs_convert() srctype = 48 (1) desttype = 47 (4)
> 16:30:50.384877 cs_convert() calling tds_convert
> 16:30:50.384887 cs_convert() tds_convert returned 1
> 16:30:50.384895 cs_convert() FMT_NULLTERM
> 16:30:50.384903 cs_convert() returning 1
> 16:30:50.384911 _ct_get_server_type(1)
> 16:30:50.384927 _ct_get_client_type(type 108, size 5)
> 16:30:50.384939 cs_convert()
> 16:30:50.384948 _ct_get_server_type(7)
> 16:30:50.384956 _ct_get_server_type(1)
> 16:30:50.384964 cs_convert() srctype = 108 (35) desttype = 47 (12)
> 16:30:50.384973 cs_convert() calling tds_convert
> 16:30:50.384982 cs_convert() tds_convert returned 1
> 16:30:50.384991 cs_convert() FMT_NULLTERM
> 16:30:50.384999 cs_convert() returning 1
> 16:30:50.385007 _ct_get_server_type(1)
> 16:30:50.385015 _ct_get_client_type(type 39, size 64)
> 16:30:50.385023 cs_convert()
> 16:30:50.385031 _ct_get_server_type(1)
> 16:30:50.385038 _ct_get_server_type(1)
> 16:30:50.385046 cs_convert() srctype = 47 (3) desttype = 47 (65)
> 16:30:50.385056 cs_convert() srctype = desttype
> 16:30:50.385064 cs_convert() desttype = character
> 16:30:50.385072 _ct_get_server_type(1)
> 16:30:50.385080 _ct_get_client_type(type 39, size 64)
> 16:30:50.385088 cs_convert()
> 16:30:50.385095 _ct_get_server_type(1)
> 16:30:50.385104 _ct_get_server_type(1)
> 16:30:50.385111 cs_convert() srctype = 47 (11) desttype = 47 (65)
> 16:30:50.385121 cs_convert() srctype = desttype
> 16:30:50.385128 cs_convert() desttype = character
> 16:30:50.385136 _ct_get_server_type(1)
> 16:30:50.385144 _ct_get_client_type(type 108, size 5)
> 16:30:50.385152 cs_convert()
> 16:30:50.385159 _ct_get_server_type(7)
> 16:30:50.385167 _ct_get_server_type(1)
> 16:30:50.385175 cs_convert() srctype = 108 (35) desttype = 47 (12)
> 16:30:50.385185 cs_convert() calling tds_convert
> 16:30:50.385194 cs_convert() tds_convert returned 4
> 16:30:50.385202 cs_convert() FMT_NULLTERM
> 16:30:50.385210 cs_convert() returning 1
> 16:30:50.385218 _ct_get_server_type(1)
> 16:30:50.385226 _ct_get_client_type(type 108, size 5)
> 16:30:50.385235 cs_convert()
> 16:30:50.385242 _ct_get_server_type(7)
> 16:30:50.385250 _ct_get_server_type(1)
> 16:30:50.385258 cs_convert() srctype = 108 (35) desttype = 47 (12)
> 16:30:50.385268 cs_convert() calling tds_convert
> 16:30:50.385277 cs_convert() tds_convert returned 1
> 16:30:50.385285 cs_convert() FMT_NULLTERM
> 16:30:50.385293 cs_convert() returning 1
> 16:30:50.385312 _ct_get_server_type(1)
> 16:30:50.385324 _ct_get_client_type(type 108, size 5)
> 16:30:50.385334 cs_convert()
> 16:30:50.385341 _ct_get_server_type(7)
> 16:30:50.385349 _ct_get_server_type(1)
> 16:30:50.385357 cs_convert() srctype = 108 (35) desttype = 47 (12)
> 16:30:50.385367 cs_convert() calling tds_convert
> 16:30:50.385376 cs_convert() tds_convert returned 1
> 16:30:50.385386 cs_convert() FMT_NULLTERM
> 16:30:50.385395 cs_convert() returning 1
> 16:30:50.385403 _ct_get_server_type(1)
> 16:30:50.385411 _ct_get_client_type(type 39, size 17)
> 16:30:50.385420 cs_convert()
> 16:30:50.385427 _ct_get_server_type(1)
> 16:30:50.385435 _ct_get_server_type(1)
> 16:30:50.385443 cs_convert() srctype = 47 (3) desttype = 47 (18)
> 16:30:50.385453 cs_convert() srctype = desttype
> 16:30:50.385460 cs_convert() desttype = character
> 16:30:50.385468 _ct_get_server_type(1)
> 16:30:50.385476 _ct_get_client_type(type 38, size 4)
> 16:30:50.385485 cs_convert()
> 16:30:50.385492 _ct_get_server_type(2)
> 16:30:50.385500 _ct_get_server_type(1)
> 16:30:50.385508 cs_convert() srctype = 56 (0) desttype = 47 (12)
> 16:30:50.385518 cs_convert() calling tds_convert
> 16:30:50.385527 cs_convert() tds_convert returned 1
> 16:30:50.385536 cs_convert() FMT_NULLTERM
> 16:30:50.385544 cs_convert() returning 1
> 16:30:50.385552 _ct_get_server_type(1)
> 16:30:50.385560 _ct_get_client_type(type 108, size 5)
> 16:30:50.385568 cs_convert()
> 16:30:50.385575 _ct_get_server_type(7)
> 16:30:50.385583 _ct_get_server_type(1)
> 16:30:50.385591 cs_convert() srctype = 108 (0) desttype = 47 (12)
> 16:30:50.385601 cs_convert() calling tds_convert
>
> ------
> Ben Vaughn
> Security Analyst
> Blackbird Technologies
> 703-796-1438 W / 703-582-4551 C
> bvaughn AT blackbirdtech.com
> ------
Now... I don't understand why ASA return 8 bytes for integer columns
however the solution is to discard other bytes... It would be also fine
if tds_numeric_to_string test precision and scale and return failure on
invalid data...
freddy77
- Re: [freetds] Crash in APACHE/PHP(compiled with sybase-ct) and FreeTDS 0.62.dev.20030714, Frediano Ziglio, 03/31/2004
Archive powered by MHonArc 2.6.24.