@@ -594,7 +594,7 @@ SQLRETURN EsSQLSetStmtAttrW(
594594 /*INDENT-OFF*/
595595 switch (Attribute ) {
596596 case SQL_ATTR_USE_BOOKMARKS :
597- INFOH (stmt , "setting use-bookmarks to: %u." , (SQLULEN )ValuePtr );
597+ DBGH (stmt , "setting use-bookmarks to: %u." , (SQLULEN )ValuePtr );
598598 if ((SQLULEN )ValuePtr != SQL_UB_OFF ) {
599599 ERRH (stmt , "bookmarks are not supported by driver." );
600600 RET_HDIAG (stmt , SQL_STATE_HYC00 ,
@@ -612,12 +612,11 @@ SQLRETURN EsSQLSetStmtAttrW(
612612 /* offset in bytes */
613613 /* "Setting this statement attribute sets the
614614 * SQL_DESC_BIND_OFFSET_PTR field in the ARD header." */
615- INFOH (stmt , "setting row-bind-offset pointer to: 0x%p." , ValuePtr );
615+ DBGH (stmt , "setting row-bind-offset pointer to: 0x%p." , ValuePtr );
616616 desc = stmt -> ard ;
617617 break ;
618618 case SQL_ATTR_PARAM_BIND_OFFSET_PTR :
619- INFOH (stmt , "setting param-bind-offset pointer to: 0x%p." ,
620- ValuePtr );
619+ DBGH (stmt , "setting param-bind-offset pointer to: 0x%p." , ValuePtr );
621620 desc = stmt -> apd ;
622621 break ;
623622 } while (0 );
@@ -639,7 +638,7 @@ SQLRETURN EsSQLSetStmtAttrW(
639638 /* "Setting this statement attribute sets the SQL_DESC_ARRAY_SIZE
640639 * field in the APD header." */
641640 case SQL_ATTR_PARAMSET_SIZE :
642- INFOH (stmt , "setting param set size to: %d." , (SQLULEN )ValuePtr );
641+ DBGH (stmt , "setting param set size to: %d." , (SQLULEN )ValuePtr );
643642 desc = stmt -> apd ;
644643 break ;
645644 } while (0 );
@@ -657,7 +656,7 @@ SQLRETURN EsSQLSetStmtAttrW(
657656 /* "Setting this statement attribute sets the SQL_DESC_BIND_TYPE field
658657 * in the ARD header." */
659658 case SQL_ATTR_ROW_BIND_TYPE :
660- INFOH (stmt , "setting row bind type to: %d." , (SQLULEN )ValuePtr );
659+ DBGH (stmt , "setting row bind type to: %d." , (SQLULEN )ValuePtr );
661660 /* value is SQL_BIND_BY_COLUMN (0UL) or struct len */
662661 /* "the driver can calculate the address of the data for a
663662 * particular row and column as:
@@ -668,7 +667,7 @@ SQLRETURN EsSQLSetStmtAttrW(
668667 desc = stmt -> ard ;
669668 break ;
670669 case SQL_ATTR_PARAM_BIND_TYPE :
671- INFOH (stmt , "setting param bind type to: %d." , (SQLULEN )ValuePtr );
670+ DBGH (stmt , "setting param bind type to: %d." , (SQLULEN )ValuePtr );
672671 desc = stmt -> apd ;
673672 break ;
674673 } while (0 );
@@ -690,20 +689,20 @@ SQLRETURN EsSQLSetStmtAttrW(
690689 * SQL_DESC_ARRAY_STATUS_PTR field in the IRD header." */
691690 case SQL_ATTR_ROW_STATUS_PTR :
692691 // TODO: call SQLSetDescField(IRD) here?
693- INFOH (stmt , "setting row status pointer to: 0x%p." , ValuePtr );
692+ DBGH (stmt , "setting row status pointer to: 0x%p." , ValuePtr );
694693 desc = stmt -> ird ;
695694 break ;
696695 case SQL_ATTR_PARAM_STATUS_PTR :
697- INFOH (stmt , "setting param status pointer to: 0x%p." , ValuePtr );
696+ DBGH (stmt , "setting param status pointer to: 0x%p." , ValuePtr );
698697 desc = stmt -> ipd ;
699698 break ;
700699 case SQL_ATTR_ROW_OPERATION_PTR :
701- INFOH (stmt , "setting row operation array pointer to: 0x%p." ,
700+ DBGH (stmt , "setting row operation array pointer to: 0x%p." ,
702701 ValuePtr );
703702 desc = stmt -> ard ;
704703 break ;
705704 case SQL_ATTR_PARAM_OPERATION_PTR :
706- INFOH (stmt , "setting param operation array pointer to: 0x%p." ,
705+ DBGH (stmt , "setting param operation array pointer to: 0x%p." ,
707706 ValuePtr );
708707 desc = stmt -> apd ;
709708 break ;
@@ -720,14 +719,13 @@ SQLRETURN EsSQLSetStmtAttrW(
720719 /* "Setting this statement attribute sets the
721720 * SQL_DESC_ROWS_PROCESSED_PTR field in the IRD header." */
722721 case SQL_ATTR_ROWS_FETCHED_PTR :
723- INFOH (stmt , "setting rows fetched pointer to: 0x%p." , ValuePtr );
722+ DBGH (stmt , "setting rows fetched pointer to: 0x%p." , ValuePtr );
724723 /* NOTE: documentation writes about "ARD", while also stating that
725724 * this field is unused in the ARD. I assume the former as wrong */
726725 desc = stmt -> ird ;
727726 break ;
728727 case SQL_ATTR_PARAMS_PROCESSED_PTR :
729- INFOH (stmt , "setting params processed pointer to: 0x%p." ,
730- ValuePtr );
728+ DBGH (stmt , "setting params processed pointer to: 0x%p." , ValuePtr );
731729 desc = stmt -> ipd ;
732730 break ;
733731 } while (0 );
@@ -747,7 +745,7 @@ SQLRETURN EsSQLSetStmtAttrW(
747745 break ; /* nop */
748746 }
749747 if (desc == & stmt -> i_ard || desc == SQL_NULL_HDESC ) {
750- INFOH (stmt , "unbinding current ARD (@0x%p), rebinding with "
748+ DBGH (stmt , "unbinding current ARD (@0x%p), rebinding with "
751749 "implicit value (@0x%p)." , stmt -> ard , & stmt -> i_ard );
752750 /* re-anonymize the descriptor, makingit re-usable */
753751 stmt -> ard = & stmt -> i_ard ;
@@ -776,7 +774,7 @@ SQLRETURN EsSQLSetStmtAttrW(
776774 " to ARD." , desc -> type );
777775 RET_HDIAGS (stmt , SQL_STATE_HY024 );
778776 }
779- INFOH (stmt , "overwritting current ARD (@0x%p) with new "
777+ DBGH (stmt , "overwritting current ARD (@0x%p) with new "
780778 "value (@0x%p)." , stmt -> ard , desc );
781779 stmt -> ard = desc ;
782780 }
@@ -798,7 +796,7 @@ SQLRETURN EsSQLSetStmtAttrW(
798796 RET_HDIAGS (stmt , SQL_STATE_HY024 );
799797
800798 case SQL_ATTR_METADATA_ID :
801- INFOH (stmt , "setting metadata_id to: %u" , (SQLULEN )ValuePtr );
799+ DBGH (stmt , "setting metadata_id to: %u" , (SQLULEN )ValuePtr );
802800 stmt -> metadata_id = (SQLULEN )ValuePtr ;
803801 break ;
804802
@@ -817,7 +815,7 @@ SQLRETURN EsSQLSetStmtAttrW(
817815
818816 case SQL_ATTR_MAX_LENGTH :
819817 ulen = (SQLULEN )ValuePtr ;
820- INFOH (stmt , "setting max_length to: %u." , ulen );
818+ DBGH (stmt , "setting max_length to: %u." , ulen );
821819 if (ulen < ESODBC_LO_MAX_LENGTH ) {
822820 WARNH (stmt , "MAX_LENGTH lower than min allowed (%d) -- "
823821 "correcting value." , ESODBC_LO_MAX_LENGTH );
@@ -833,12 +831,12 @@ SQLRETURN EsSQLSetStmtAttrW(
833831 break ;
834832
835833 case SQL_ATTR_QUERY_TIMEOUT :
836- INFOH (stmt , "setting query timeout to: %u." , (SQLULEN )ValuePtr );
834+ DBGH (stmt , "setting query timeout to: %u." , (SQLULEN )ValuePtr );
837835 stmt -> query_timeout = (SQLULEN )ValuePtr ;
838836 break ;
839837
840838 case SQL_ATTR_CURSOR_TYPE :
841- INFOH (stmt , "setting cursor type: %llu." , (SQLULEN )ValuePtr );
839+ DBGH (stmt , "setting cursor type: %llu." , (SQLULEN )ValuePtr );
842840 if ((SQLULEN )ValuePtr != SQL_CURSOR_FORWARD_ONLY ) {
843841 WARNH (stmt , "requested cursor_type substituted with "
844842 "forward-only (%llu)." , SQL_CURSOR_FORWARD_ONLY );
@@ -847,14 +845,14 @@ SQLRETURN EsSQLSetStmtAttrW(
847845 break ;
848846
849847 case SQL_ATTR_NOSCAN :
850- INFOH (stmt , "setting escape seq scanning: %llu -- NOOP." ,
848+ DBGH (stmt , "setting escape seq scanning: %llu -- NOOP." ,
851849 (SQLULEN )ValuePtr );
852850 /* nothing to do: the driver never scans the input, ESSQL processes
853851 * the escape sequences */
854852 break ;
855853
856854 case SQL_ATTR_CONCURRENCY :
857- INFOH (stmt , "setting concurrency: %llu." , (SQLULEN )ValuePtr );
855+ DBGH (stmt , "setting concurrency: %llu." , (SQLULEN )ValuePtr );
858856 if ((SQLULEN )ValuePtr != SQL_CONCUR_READ_ONLY ) {
859857 WARNH (stmt , "requested concurrency substituted with "
860858 "read-only (%llu)." , SQL_CONCUR_READ_ONLY );
@@ -863,32 +861,31 @@ SQLRETURN EsSQLSetStmtAttrW(
863861 break ;
864862
865863 case SQL_ATTR_MAX_ROWS :
866- INFOH (stmt , "setting max rows: %llu." , (SQLULEN )ValuePtr );
864+ DBGH (stmt , "setting max rows: %llu." , (SQLULEN )ValuePtr );
867865 if ((SQLULEN )ValuePtr != 0 ) {
868866 WARNH (stmt , "requested max_rows substituted with 0." );
869867 RET_HDIAGS (stmt , SQL_STATE_01S02 );
870868 }
871869 break ;
872870
873871 case SQL_ATTR_CURSOR_SENSITIVITY :
874- INFOH (stmt , "setting cursor sensitivity: %llu." ,
875- (SQLULEN )ValuePtr );
872+ DBGH (stmt , "setting cursor sensitivity: %llu." , (SQLULEN )ValuePtr );
876873 if ((SQLULEN )ValuePtr != SQL_UNSPECIFIED ) {
877874 ERRH (stmt , "driver supports forward-only cursors." );
878875 RET_HDIAGS (stmt , SQL_STATE_HYC00 );
879876 }
880877 break ;
881878
882879 case SQL_ATTR_CURSOR_SCROLLABLE :
883- INFOH (stmt , "setting scrollable cursor: %llu." , (SQLULEN )ValuePtr );
880+ DBGH (stmt , "setting scrollable cursor: %llu." , (SQLULEN )ValuePtr );
884881 if ((SQLULEN )ValuePtr != SQL_NONSCROLLABLE ) {
885882 ERRH (stmt , "driver supports only non-scrollable cursors." );
886883 RET_HDIAGS (stmt , SQL_STATE_HYC00 );
887884 }
888885 break ;
889886
890887 case SQL_ATTR_RETRIEVE_DATA :
891- INFOH (stmt , "setting data retrieving: %llu." , (SQLULEN )ValuePtr );
888+ DBGH (stmt , "setting data retrieving: %llu." , (SQLULEN )ValuePtr );
892889 if ((SQLULEN )ValuePtr != SQL_RD_ON ) {
893890 WARNH (stmt , "no fetching without data retrieval possible." );
894891 RET_HDIAGS (stmt , SQL_STATE_01S02 );
@@ -1441,7 +1438,7 @@ SQLRETURN update_rec_count(esodbc_desc_st *desc, SQLSMALLINT new_count)
14411438 }
14421439
14431440 if (new_count == 0 ) {
1444- INFOH (desc , "freeing the array of %d elems." , desc -> count );
1441+ DBGH (desc , "freeing the array of %d elems." , desc -> count );
14451442 free_desc_recs (desc );
14461443 recs = NULL ;
14471444 } else {
@@ -1452,13 +1449,13 @@ SQLRETURN update_rec_count(esodbc_desc_st *desc, SQLSMALLINT new_count)
14521449 RET_HDIAGS (desc , SQL_STATE_HY001 );
14531450 }
14541451 if (new_count < desc -> count ) { /* shrinking array */
1455- INFOH (desc , "recs array is shrinking %d -> %d." , desc -> count ,
1452+ DBGH (desc , "recs array is shrinking %d -> %d." , desc -> count ,
14561453 new_count );
14571454 for (i = new_count - 1 ; i < desc -> count ; i ++ ) {
14581455 free_rec_fields (& desc -> recs [i ]);
14591456 }
14601457 } else { /* growing array */
1461- INFOH (desc , "recs array is growing %d -> %d." , desc -> count ,
1458+ DBGH (desc , "recs array is growing %d -> %d." , desc -> count ,
14621459 new_count );
14631460 /* init all new records */
14641461 for (i = desc -> count ; i < new_count ; i ++ ) {
@@ -2457,7 +2454,7 @@ SQLRETURN EsSQLSetDescFieldW(
24572454 switch (FieldIdentifier ) {
24582455 case SQL_DESC_ARRAY_SIZE :
24592456 ulen = (SQLULEN )(uintptr_t )ValuePtr ;
2460- INFOH (desc , "setting desc array size to: %llu." , ulen );
2457+ DBGH (desc , "setting desc array size to: %llu." , ulen );
24612458 if (DESC_TYPE_IS_RECORD (desc -> type )) {
24622459 if (ESODBC_MAX_ROW_ARRAY_SIZE < ulen ) {
24632460 WARNH (desc , "provided desc array size (%u) larger than "
@@ -2481,19 +2478,19 @@ SQLRETURN EsSQLSetDescFieldW(
24812478 return SQL_SUCCESS ;
24822479
24832480 case SQL_DESC_ARRAY_STATUS_PTR :
2484- INFOH (desc , "setting desc array status ptr to: 0x%p." , ValuePtr );
2481+ DBGH (desc , "setting desc array status ptr to: 0x%p." , ValuePtr );
24852482 /* deferred */
24862483 desc -> array_status_ptr = (SQLUSMALLINT * )ValuePtr ;
24872484 return SQL_SUCCESS ;
24882485
24892486 case SQL_DESC_BIND_OFFSET_PTR :
2490- INFOH (desc , "setting binding offset ptr to: 0x%p." , ValuePtr );
2487+ DBGH (desc , "setting binding offset ptr to: 0x%p." , ValuePtr );
24912488 /* deferred */
24922489 desc -> bind_offset_ptr = (SQLLEN * )ValuePtr ;
24932490 return SQL_SUCCESS ;
24942491
24952492 case SQL_DESC_BIND_TYPE :
2496- INFOH (desc , "setting bind type to: %u." ,
2493+ DBGH (desc , "setting bind type to: %u." ,
24972494 (SQLUINTEGER )(uintptr_t )ValuePtr );
24982495 desc -> bind_type = (SQLUINTEGER )(uintptr_t )ValuePtr ;
24992496 return SQL_SUCCESS ;
@@ -2523,7 +2520,7 @@ SQLRETURN EsSQLSetDescFieldW(
25232520 return update_rec_count (desc , (SQLSMALLINT )(intptr_t )ValuePtr );
25242521
25252522 case SQL_DESC_ROWS_PROCESSED_PTR :
2526- INFOH (desc , "setting desc rows processed ptr to: 0x%p." , ValuePtr );
2523+ DBGH (desc , "setting desc rows processed ptr to: 0x%p." , ValuePtr );
25272524 desc -> rows_processed_ptr = (SQLULEN * )ValuePtr ;
25282525 return SQL_SUCCESS ;
25292526 }
@@ -2546,7 +2543,7 @@ SQLRETURN EsSQLSetDescFieldW(
25462543 ERRH (desc , "can't get record with number %d." , RecNumber );
25472544 RET_STATE (desc -> hdr .diag .state );
25482545 }
2549- INFOH (desc , "setting field %d of record #%d @ 0x%p." , FieldIdentifier ,
2546+ DBGH (desc , "setting field %d of record #%d @ 0x%p." , FieldIdentifier ,
25502547 RecNumber , rec );
25512548 }
25522549
@@ -2559,7 +2556,7 @@ SQLRETURN EsSQLSetDescFieldW(
25592556 * buffer(s), so the above "binding" definition is incomplete.
25602557 */
25612558 if (FieldIdentifier != SQL_DESC_DATA_PTR ) {
2562- INFOH (desc , "attribute to set is different than %d => unbinding data "
2559+ DBGH (desc , "attribute to set is different than %d => unbinding data "
25632560 "buffer (was 0x%p)." , rec -> data_ptr );
25642561 rec -> data_ptr = NULL ;
25652562 }
@@ -2573,7 +2570,7 @@ SQLRETURN EsSQLSetDescFieldW(
25732570 * each concise type is stored in SQL_DESC_DATETIME_INTERVAL_CODE." */
25742571 case SQL_DESC_TYPE :
25752572 type = (SQLSMALLINT )(intptr_t )ValuePtr ;
2576- INFOH (desc , "setting type of rec@0x%p to %d." , rec , type );
2573+ DBGH (desc , "setting type of rec@0x%p to %d." , rec , type );
25772574 /* Note: SQL_[C_]DATE == SQL_DATETIME (== 9) =>
25782575 * 1. one needs to always use SQL_DESC_CONCISE_TYPE for setting
25792576 * the types from within the driver (binding cols, params):
@@ -2604,7 +2601,7 @@ SQLRETURN EsSQLSetDescFieldW(
26042601 }
26052602 /* no break! */
26062603 case SQL_DESC_CONCISE_TYPE :
2607- INFOH (desc , "setting concise type of rec 0x%p to %d." , rec ,
2604+ DBGH (desc , "setting concise type of rec 0x%p to %d." , rec ,
26082605 (SQLSMALLINT )(intptr_t )ValuePtr );
26092606 rec -> concise_type = (SQLSMALLINT )(intptr_t )ValuePtr ;
26102607
@@ -2622,13 +2619,13 @@ SQLRETURN EsSQLSetDescFieldW(
26222619 * SQL_DESC_LENGTH, SQL_DESC_PRECISION, and SQL_DESC_SCALE fields
26232620 * are automatically set to default values". */
26242621 set_defaults_from_meta_type (rec );
2625- INFOH (desc , "REC@0x%p types: concise: %d, verbose: %d, code: %d." ,
2622+ DBGH (desc , "REC@0x%p types: concise: %d, verbose: %d, code: %d." ,
26262623 rec , rec -> concise_type , rec -> type ,
26272624 rec -> datetime_interval_code );
26282625 break ;
26292626
26302627 case SQL_DESC_DATA_PTR :
2631- INFOH (desc , "setting data ptr to 0x%p of type %d." , ValuePtr ,
2628+ DBGH (desc , "setting data ptr to 0x%p of type %d." , ValuePtr ,
26322629 BufferLength );
26332630 /* deferred */
26342631 rec -> data_ptr = ValuePtr ;
@@ -2645,7 +2642,7 @@ SQLRETURN EsSQLSetDescFieldW(
26452642 ERRH (desc , "consistency check failed on rec@0x%p." , rec );
26462643 RET_HDIAGS (desc , SQL_STATE_HY021 );
26472644 } else {
2648- INFOH (desc , "rec@0x%p: bound data ptr@0x%p." , rec ,
2645+ DBGH (desc , "rec@0x%p: bound data ptr@0x%p." , rec ,
26492646 rec -> data_ptr );
26502647 }
26512648 } else {
@@ -2655,13 +2652,13 @@ SQLRETURN EsSQLSetDescFieldW(
26552652 if (DESC_TYPE_IS_APPLICATION (desc -> type ) &&
26562653 /* see function-top comments on when to unbind */
26572654 (! REC_IS_BOUND (rec ))) {
2658- INFOH (desc , "rec 0x%p of desc type %d unbound." , rec ,
2655+ DBGH (desc , "rec 0x%p of desc type %d unbound." , rec ,
26592656 desc -> type );
26602657 if (RecNumber == desc -> count ) {
26612658 count = recount_bound (desc );
26622659 /* worst case: trying to unbound a not-yet-bound rec */
26632660 if (count != desc -> count ) {
2664- INFOH (desc , "adjusting rec count from %d to %d." ,
2661+ DBGH (desc , "adjusting rec count from %d to %d." ,
26652662 desc -> count , count );
26662663 return update_rec_count (desc , count );
26672664 }
@@ -2691,7 +2688,7 @@ SQLRETURN EsSQLSetDescFieldW(
26912688 } else {
26922689 wlen = BufferLength ;
26932690 }
2694- INFOH (desc , "setting SQLWCHAR field %d to `" LWPDL "`(@0x%p)." ,
2691+ DBGH (desc , "setting SQLWCHAR field %d to `" LWPDL "`(@0x%p)." ,
26952692 FieldIdentifier , wlen , ValuePtr , wlen , ValuePtr );
26962693 if (wstrp -> str ) {
26972694 DBGH (desc , "freeing previously allocated value for field %d "
@@ -2717,19 +2714,19 @@ SQLRETURN EsSQLSetDescFieldW(
27172714
27182715 /* <SQLLEN *>, deferred */
27192716 case SQL_DESC_INDICATOR_PTR :
2720- INFOH (desc , "setting indicator pointer to 0x%p." , ValuePtr );
2717+ DBGH (desc , "setting indicator pointer to 0x%p." , ValuePtr );
27212718 rec -> indicator_ptr = (SQLLEN * )ValuePtr ;
27222719 break ;
27232720 case SQL_DESC_OCTET_LENGTH_PTR :
2724- INFOH (desc , "setting octet length pointer to 0x%p." , ValuePtr );
2721+ DBGH (desc , "setting octet length pointer to 0x%p." , ValuePtr );
27252722 rec -> octet_length_ptr = (SQLLEN * )ValuePtr ;
27262723 break ;
27272724
27282725 /* <SQLLEN> */
27292726 /* R/O fields: display_size */
27302727 case SQL_DESC_OCTET_LENGTH :
27312728 slen = (SQLLEN )(intptr_t )ValuePtr ;
2732- INFOH (desc , "setting octet length: %ld." , slen );
2729+ DBGH (desc , "setting octet length: %ld." , slen );
27332730 /* rec field's type is signed; a negative can be dangerous */
27342731 if (slen < 0 ) {
27352732 WARNH (desc , "negative octet length provided (%lld)" , slen );
@@ -2740,7 +2737,7 @@ SQLRETURN EsSQLSetDescFieldW(
27402737
27412738 /* <SQLULEN> */
27422739 case SQL_DESC_LENGTH :
2743- INFOH (desc , "setting length: %u." , (SQLULEN )(uintptr_t )ValuePtr );
2740+ DBGH (desc , "setting length: %u." , (SQLULEN )(uintptr_t )ValuePtr );
27442741 rec -> length = (SQLULEN )(uintptr_t )ValuePtr ;
27452742 break ;
27462743
@@ -2764,7 +2761,7 @@ SQLRETURN EsSQLSetDescFieldW(
27642761 /* R/O field: fixed_prec_scale, nullable, searchable, unsigned */
27652762 case SQL_DESC_UPDATABLE : wordp = & rec -> updatable ; break ;
27662763 } while (0 );
2767- INFOH (desc , "setting record field %d to %d." , FieldIdentifier ,
2764+ DBGH (desc , "setting record field %d to %d." , FieldIdentifier ,
27682765 (SQLSMALLINT )(intptr_t )ValuePtr );
27692766 * wordp = (SQLSMALLINT )(intptr_t )ValuePtr ;
27702767 break ;
@@ -2779,7 +2776,7 @@ SQLRETURN EsSQLSetDescFieldW(
27792776 intp = & rec -> num_prec_radix ;
27802777 break ;
27812778 } while (0 );
2782- INFOH (desc , "returning record field %d as %d." , FieldIdentifier ,
2779+ DBGH (desc , "returning record field %d as %d." , FieldIdentifier ,
27832780 (SQLINTEGER )(intptr_t )ValuePtr );
27842781 * intp = (SQLINTEGER )(intptr_t )ValuePtr ;
27852782 break ;
0 commit comments