bk commit - Connector/ODBC 3.53 (1.45)

bk commit - Connector/ODBC 3.53 (1.45)

am 21.04.2005 01:07:36 von pharvey

Below is the list of changes that have just been commited into a local
MyODBC 3.53 repository of 'pharvey'. When 'pharvey' does a push, they will
be propogaged to the main repository and within 2 hours after the push
into the public repository.

For more information on how to access the public repository see:
http://www.mysql.com/products/myodbc/faq_2.html#Development_ source

You can also browse the changes from public repository:
Complete repository: http://mysql.bkbits.net:8080/myodbc-3.53/
This changeset : http://mysql.bkbits.net:8080/myodbc-3.53/cset@1.45

ChangeSet
1.45 05/04/20 16:07:35 pharvey@mysql.com +22 -0
- synch dia and des lib to array and list api

MYODBCDia/include/MYODBCDia.h
1.12 05/04/20 16:07:34 pharvey@mysql.com +2 -1
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaTest/MYODBCDiaTest.vpj
1.8 05/04/20 16:07:34 pharvey@mysql.com +2 -2
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaRecAlloc.c
1.12 05/04/20 16:07:34 pharvey@mysql.com +1 -1
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.vpj
1.9 05/04/20 16:07:34 pharvey@mysql.com +2 -2
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.pro
1.14 05/04/20 16:07:34 pharvey@mysql.com +1 -0
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaInternal.h
1.11 05/04/20 16:07:34 pharvey@mysql.com +25 -23
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaGetField.c
1.4 05/04/20 16:07:34 pharvey@mysql.com +0 -1
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaGet.c
1.12 05/04/20 16:07:34 pharvey@mysql.com +6 -5
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaFree.c
1.11 05/04/20 16:07:34 pharvey@mysql.com +1 -0
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaDelete.c
1.3 05/04/20 16:07:34 pharvey@mysql.com +1 -1
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaAppend.c
1.14 05/04/20 16:07:34 pharvey@mysql.com +4 -1
- synch dia and des lib to array and list api

MYODBCDia/MYODBCDiaLib/MYODBCDiaAlloc.c
1.13 05/04/20 16:07:34 pharvey@mysql.com +3 -4
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesRecGet.c
1.14 05/04/20 16:07:34 pharvey@mysql.com +6 -2
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesRecFree.c
1.15 05/04/20 16:07:34 pharvey@mysql.com +7 -2
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesRecAlloc.c
1.15 05/04/20 16:07:34 pharvey@mysql.com +1 -1
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesMorph.c
1.13 05/04/20 16:07:34 pharvey@mysql.com +9 -8
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj
1.10 05/04/20 16:07:34 pharvey@mysql.com +2 -2
- synch dia and des lib to array and list api

MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c
1.15 05/04/20 16:07:34 pharvey@mysql.com +2 -1
- synch dia and des lib to array and list api

MYODBCArray/include/MYODBCArray.h
1.15 05/04/20 16:07:34 pharvey@mysql.com +17 -0
- synch dia and des lib to array and list api

MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj
1.12 05/04/20 16:07:34 pharvey@mysql.com +1 -0
- synch dia and des lib to array and list api

MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro
1.12 05/04/20 16:07:34 pharvey@mysql.com +1 -0
- synch dia and des lib to array and list api

MYODBCArray/MYODBCArrayLib/MYODBCArrayDeleteExt.c
1.2 05/04/20 16:07:34 pharvey@mysql.com +4 -5
- synch dia and des lib to array and list api

MYODBCArray/MYODBCArrayLib/MYODBCArrayDeleteExt.c
1.1 05/04/20 15:07:39 pharvey@mysql.com +43 -0

MYODBCArray/MYODBCArrayLib/MYODBCArrayDeleteExt.c
1.0 05/04/20 15:07:39 pharvey@mysql.com +0 -0
BitKeeper file /home/pharvey/SandBox/MySQL/myodbc-3.53/MYODBCArray/MYODBCAr rayLib/MYODBCArrayDeleteExt.c

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: pharvey
# Host: thinkpad.peterharvey.org
# Root: /home/pharvey/SandBox/MySQL/myodbc-3.53

--- 1.11/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj 2005-04-19 20:52:45 -07:00
+++ 1.12/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.vpj 2005-04-20 16:07:34 -07:00
@@ -56,6 +56,7 @@



+




--- 1.9/MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj 2005-03-29 18:10:27 -08:00
+++ 1.10/MYODBCDes/MYODBCDesLib/MYODBCDesLib.vpj 2005-04-20 16:07:34 -07:00
@@ -40,7 +40,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"
@@ -128,7 +128,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"

--- 1.8/MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.vpj 2005-03-24 17:23:00 -08:00
+++ 1.9/MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.vpj 2005-04-20 16:07:34 -07:00
@@ -40,7 +40,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"
@@ -128,7 +128,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"

--- 1.7/MYODBCDia/MYODBCDiaTest/MYODBCDiaTest.vpj 2005-03-22 14:00:27 -08:00
+++ 1.8/MYODBCDia/MYODBCDiaTest/MYODBCDiaTest.vpj 2005-04-20 16:07:34 -07:00
@@ -40,7 +40,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"
@@ -128,7 +128,7 @@
Deletable="0"
SaveOption="SaveWorkspaceFiles"
RunFromDir="%rw">
-
+

Name="Rebuild"
--- New file ---
+++ MYODBCArray/MYODBCArrayLib/MYODBCArrayDeleteExt.c 05/04/20 15:07:39
/*!
\file MYODBCArrayDeleteExt.c
\author Peter Harvey
Copyright (C) MySQL AB 2004-2005, Released under GPL.
\version Connector/ODBC 3.53
\date 2005
\brief Code to help manage an array of pointers.

\license Copyright (C) 2000-2005 MySQL AB

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

There are special exceptions to the terms and conditions of the GPL as it
is applied to this software. View the full text of the exception in file
EXCEPTIONS in the directory of this software distribution.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "MYODBCArrayInternal.h"

SQLRETURN MYODBCArrayDeleteExt( MYODBC_ARRAY_HANDLE hArray,
MYODBC_C_ULONGLONG nItem )
{
SQLRETURN nReturn = MYODBCArraySetPos( hArray, nItem );

if ( nReturn != SQL_SUCCESS )
return nReturn;

return MYODBCArrayDelete( hArray );
}




--- 1.2/MYODBCDia/MYODBCDiaLib/MYODBCDiaDelete.c 2005-03-24 17:23:00 -08:00
+++ 1.3/MYODBCDia/MYODBCDiaLib/MYODBCDiaDelete.c 2005-04-20 16:07:34 -07:00
@@ -19,7 +19,7 @@
MYODBC_DIA_PTR pDia = (MYODBC_DIA_PTR)hDia;

/* delete record (call-back will free mem for us) */
- MYODBCArrayElementDel( pDia->hRecords, nRecord - 1 );
+ MYODBCArrayDeleteExt( pDia->hRecords, nRecord - 1 );

pDia->diag_number -= 1;
}

--- 1.3/MYODBCDia/MYODBCDiaLib/MYODBCDiaGetField.c 2005-03-24 20:25:24 -08:00
+++ 1.4/MYODBCDia/MYODBCDiaLib/MYODBCDiaGetField.c 2005-04-20 16:07:34 -07:00
@@ -23,7 +23,6 @@
{
MYODBC_DIA_PTR pDia = (MYODBC_DIA_PTR)hDia;
MYODBC_DIA_REC_PTR pDiaRec;
-
SQLSMALLINT nStrLen;

/* use dummy when no pnStrLenPtr */

--- 1.14/MYODBCArray/include/MYODBCArray.h 2005-04-20 12:51:18 -07:00
+++ 1.15/MYODBCArray/include/MYODBCArray.h 2005-04-20 16:07:34 -07:00
@@ -44,6 +44,8 @@
#ifndef MYODBC_ARRAY_H
#define MYODBC_ARRAY_H

+#include
+
/*!
\brief Where to insert a new item.

@@ -224,6 +226,21 @@
\endcode
*/
SQLRETURN MYODBCArrayDelete( MYODBC_ARRAY_HANDLE hArray );
+
+/*!
+ \internal
+ \brief Sets the current position to nItem and then deletes it.
+
+ \param hArray A MYODBC_ARRAY_HANDLE allocated with MYODBCArrayAlloc().
+ \param nItem Item to delete (0-based).
+
+ \return SQLRETURN
+
+ \sa MYODBCArrayDelete
+ MYODBCArrayGetError
+*/
+SQLRETURN MYODBCArrayDeleteExt( MYODBC_ARRAY_HANDLE hArray,
+ MYODBC_C_ULONGLONG nItem );

/*!
\internal

--- 1.11/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro 2005-04-20 12:51:18 -07:00
+++ 1.12/MYODBCArray/MYODBCArrayLib/MYODBCArrayLib.pro 2005-04-20 16:07:34 -07:00
@@ -23,6 +23,7 @@
MYODBCArrayAppend.c \
MYODBCArrayClear.c \
MYODBCArrayDelete.c \
+ MYODBCArrayDeleteExt.c \
MYODBCArrayDump.c \
MYODBCArrayFirst.c \
MYODBCArrayFree.c \

--- 1.14/MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c 2005-03-24 17:22:59 -08:00
+++ 1.15/MYODBCDes/MYODBCDesLib/MYODBCDesAlloc.c 2005-04-20 16:07:34 -07:00
@@ -63,7 +63,8 @@
pDes->pFuncDesRecExtraFree = NULL;

/* init with no elements */
- pDes->hRecords = MYODBCArrayAlloc( 0 );
+ MYODBCArrayAlloc( &pDes->hRecords );
+ MYODBCArraySetCacheStep( pDes->hRecords, 10 );

/* associate with our owner */
pDes->hOwner = hOwner;

--- 1.12/MYODBCDes/MYODBCDesLib/MYODBCDesMorph.c 2005-03-24 17:22:59 -08:00
+++ 1.13/MYODBCDes/MYODBCDesLib/MYODBCDesMorph.c 2005-04-20 16:07:34 -07:00
@@ -23,14 +23,16 @@
/* free any extra on all records */
if ( pDes->pFuncDesRecExtraFree )
{
- MYODBC_DES_REC_PTR rec;
- unsigned int n;
-
- for ( n = 0; n < MYODBCArrayElements( pDes->hRecords ); n++ )
+ MYODBCArrayFirst( pDes->hRecords );
+ while ( !MYODBCArrayIsEOA( pDes->hRecords ) )
{
- rec = MYODBCArrayElementGet( pDes->hRecords, n );
- if ( rec->extra )
- pDes->pFuncDesRecExtraFree( rec->extra );
+ MYODBC_ARRAY_ITEM_DATA_PTR pData = NULL;
+ MYODBC_DES_REC_PTR pDesRec = NULL;
+
+ MYODBCArrayGet( pDes->hRecords, pData );
+ pDesRec = pData;
+ if ( pDesRec->extra )
+ pDes->pFuncDesRecExtraFree( pDesRec->extra );
}
pDes->pFuncDesRecExtraFree = NULL;
}
@@ -42,7 +44,6 @@
pDes->extra = NULL;
pDes->pFuncDesExtraFree = NULL;
}
-
}



--- 1.14/MYODBCDes/MYODBCDesLib/MYODBCDesRecAlloc.c 2005-03-29 18:10:27 -08:00
+++ 1.15/MYODBCDes/MYODBCDesLib/MYODBCDesRecAlloc.c 2005-04-20 16:07:34 -07:00
@@ -39,7 +39,7 @@
}

/* insert record (appends to end of array) */
- MYODBCArrayElementAdd( pDes->hRecords, MYODBCArrayElements( pDes->hRecords ), pDesRec );
+ MYODBCArrayAppend( pDes->hRecords, pDesRec );

/* update SQL_DESC_COUNT */
pDes->desc_count++;

--- 1.14/MYODBCDes/MYODBCDesLib/MYODBCDesRecFree.c 2005-03-29 18:10:27 -08:00
+++ 1.15/MYODBCDes/MYODBCDesLib/MYODBCDesRecFree.c 2005-04-20 16:07:34 -07:00
@@ -15,7 +15,12 @@
void MYODBCDesRecFree( MYODBC_DES_PTR pDes,
unsigned int nRecord )
{
- MYODBC_DES_REC_PTR pDesRec = MYODBCArrayElementGet( pDes->hRecords, nRecord );
+ MYODBC_DES_REC_PTR pDesRec = NULL;
+ MYODBC_ARRAY_ITEM_DATA_PTR pData = NULL;
+
+ MYODBCArrayGetExt( pDes->hRecords, nRecord, &pData );
+
+ pDesRec = pData;

/* free strings */
MYODBCDesRecClear( pDesRec );
@@ -25,7 +30,7 @@
pDes->pFuncDesRecExtraFree( pDesRec );

/*! \note We *must* reduce array or looping could result. */
- MYODBCArrayElementDel( pDes->hRecords, nRecord );
+ MYODBCArrayDeleteExt( pDes->hRecords, nRecord );

/* update SQL_DESC_COUNT */
pDes->desc_count--;

--- 1.13/MYODBCDes/MYODBCDesLib/MYODBCDesRecGet.c 2005-03-24 17:22:59 -08:00
+++ 1.14/MYODBCDes/MYODBCDesLib/MYODBCDesRecGet.c 2005-04-20 16:07:34 -07:00
@@ -14,6 +14,8 @@

MYODBC_DES_REC_PTR MYODBCDesRecGet( MYODBC_DES_PTR pDes, SQLSMALLINT nRecord, MYODBC_C_BOOL bAppend )
{
+ MYODBC_ARRAY_ITEM_DATA_PTR pData;
+
/* append records as desired/needed */
if ( bAppend && nRecord > pDes->desc_count )
MYODBCDesCount( pDes, nRecord, MYODBC_C_FALSE );
@@ -22,8 +24,10 @@
if ( nRecord > pDes->desc_count )
return NULL;

- /* return the record */
- return MYODBCArrayElementGet( pDes->hRecords, nRecord );
+ /* return the record */
+ MYODBCArrayGetExt( pDes->hRecords, nRecord, &pData );
+
+ return pData;
}



--- 1.11/MYODBCDia/include/MYODBCDia.h 2005-03-24 20:25:25 -08:00
+++ 1.12/MYODBCDia/include/MYODBCDia.h 2005-04-20 16:07:34 -07:00
@@ -299,7 +299,8 @@

\sa MYODBCDiaAppend
*/
-MYODBC_DIA_REC_HANDLE MYODBCDiaGet( MYODBC_DIA_HANDLE hDia, SQLSMALLINT nRecord );
+MYODBC_DIA_REC_HANDLE MYODBCDiaGet( MYODBC_DIA_HANDLE hDia,
+ SQLSMALLINT nRecord );

/*!
\brief Gets a specific diagnostic field value.

--- 1.13/MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.pro 2005-03-24 17:23:00 -08:00
+++ 1.14/MYODBCDia/MYODBCDiaLib/MYODBCDiaLib.pro 2005-04-20 16:07:34 -07:00
@@ -8,6 +8,7 @@
DESTDIR = ../../lib
OBJECTS_DIR = .tmp
INCLUDEPATH += ../../MYODBCC/include
+INCLUDEPATH += ../../MYODBCRtti/include
INCLUDEPATH += ../../MYODBCArray/include

# #########################################################

--- 1.12/MYODBCDia/MYODBCDiaLib/MYODBCDiaAlloc.c 2005-03-29 18:10:27 -08:00
+++ 1.13/MYODBCDia/MYODBCDiaLib/MYODBCDiaAlloc.c 2005-04-20 16:07:34 -07:00
@@ -173,10 +173,9 @@
pDia->diag_server_name = MYODBCCStrDup( "", SQL_NTS );

/* Allocate and initialize a dynamic array of records. */
- pDia->hRecords = MYODBCArrayAlloc( 0 );
-
- /* Set a call-back function to handle freeing memory used by a record. */
- MYODBCArrayElementFreeSet( pDia->hRecords, MYODBCDiaRecFree );
+ MYODBCArrayAlloc( &pDia->hRecords );
+ MYODBCArraySetCacheStep( pDia->hRecords, 50 );
+ MYODBCArraySetFreeFunc( pDia->hRecords, MYODBCDiaRecFree );

return pDia;
}

--- 1.10/MYODBCDia/MYODBCDiaLib/MYODBCDiaFree.c 2005-03-24 17:23:00 -08:00
+++ 1.11/MYODBCDia/MYODBCDiaLib/MYODBCDiaFree.c 2005-04-20 16:07:34 -07:00
@@ -20,6 +20,7 @@

/* delete any records */
MYODBCDiaClear( hDia );
+ MYODBCArrayFree( pDia->hRecords );

/* these are not cleared so do now */
MYODBCCFree( pDia->diag_connection_name );

--- 1.10/MYODBCDia/MYODBCDiaLib/MYODBCDiaInternal.h 2005-03-29 18:10:27 -08:00
+++ 1.11/MYODBCDia/MYODBCDiaLib/MYODBCDiaInternal.h 2005-04-20 16:07:34 -07:00
@@ -33,7 +33,8 @@
#define MYODBC_DIA_INTERNAL_H

#include
-#include
+#include
+#include

#include "../include/MYODBCDia.h"

@@ -79,17 +80,17 @@
*/
typedef struct tMYODBC_DIA
{
- MYODBC_RTTI_TYPE nTypeID; /*!< runtime type id */
- SQLINTEGER diag_cursor_row_count; /*!< Count of rows in the cursor. */
- SQLCHAR * diag_dynamic_function; /*!< String indicating type of SQL executed (ie "UPDATE WHERE") */
- SQLINTEGER diag_dynamic_function_code; /*!< Code indicating type of SQL executed (ie SQL_DIAG_UPDATE_WHERE) */
- SQLINTEGER diag_number; /*!< The number of status records in records array. */
- SQLRETURN diag_returncode; /*!< Return code (as in SQLRETURN) returned by the function. */
- SQLINTEGER diag_row_count; /*!< The number of rows affected by an insert, delete, or update. */
- SQLCHAR * diag_connection_name; /*!< This is dbc->server. */
- SQLCHAR * diag_server_name; /*!< This is dbc->dsn. Same as SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
+ MYODBC_RTTI_TYPE nTypeID; /*!< runtime type id */
+ SQLINTEGER diag_cursor_row_count; /*!< Count of rows in the cursor. */
+ SQLCHAR * diag_dynamic_function; /*!< String indicating type of SQL executed (ie "UPDATE WHERE") */
+ SQLINTEGER diag_dynamic_function_code; /*!< Code indicating type of SQL executed (ie SQL_DIAG_UPDATE_WHERE) */
+ SQLINTEGER diag_number; /*!< The number of status records in records array. */
+ SQLRETURN diag_returncode; /*!< Return code (as in SQLRETURN) returned by the function. */
+ SQLINTEGER diag_row_count; /*!< The number of rows affected by an insert, delete, or update. */
+ SQLCHAR * diag_connection_name; /*!< This is dbc->server. */
+ SQLCHAR * diag_server_name; /*!< This is dbc->dsn. Same as SQL_DATA_SOURCE_NAME in SQLGetInfo(). */

- MYODBC_ARRAY_HANDLE hRecords; /*!< An array of MYODBC_DIA_REC_PTR. */
+ MYODBC_ARRAY_HANDLE hRecords; /*!< An array of MYODBC_DIA_REC_PTR. */

} MYODBC_DIA;

@@ -119,18 +120,18 @@
*/
typedef struct tMYODBC_DIA_REC
{
- MYODBC_RTTI_TYPE nTypeID; /*!< runtime type id */
- SQLCHAR * diag_class_origin; /*!< Doc that defines the class portion of the SQLSTATE val in this rec. */
- SQLINTEGER diag_column_number; /*!< Col num in the result set or the param num in the set of parameters. */
- SQLCHAR * diag_connection_name; /*!< This is dbc->server. */
- SQLCHAR diag_message_text[SQL_MAX_MESSAGE_LENGTH]; /*!< A, formatted, informational message on the error or warning. */
- SQLINTEGER diag_native; /*!< A driver/data sourceâÿûspecific native error code. */
- SQLINTEGER diag_row_number; /*!< Row num in the rowset, or the param num in the set of parameters. */
- SQLCHAR * diag_server_name; /*!< This is dbc->dsn. Same as SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
- SQLCHAR * diag_sqlstate; /*!< A five-character SQLSTATE diagnostic code. */
- SQLCHAR * diag_subclass_origin; /*!< */
+ MYODBC_RTTI_TYPE nTypeID; /*!< runtime type id */
+ SQLCHAR * diag_class_origin; /*!< Doc that defines the class portion of the SQLSTATE val in this rec. */
+ SQLINTEGER diag_column_number; /*!< Col num in the result set or the param num in the set of parameters. */
+ SQLCHAR * diag_connection_name; /*!< This is dbc->server. */
+ SQLCHAR diag_message_text[SQL_MAX_MESSAGE_LENGTH]; /*!< A, formatted, informational message on the error or warning. */
+ SQLINTEGER diag_native; /*!< A driver/data sourceâÿûspecific native error code. */
+ SQLINTEGER diag_row_number; /*!< Row num in the rowset, or the param num in the set of parameters. */
+ SQLCHAR * diag_server_name; /*!< This is dbc->dsn. Same as SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
+ SQLCHAR * diag_sqlstate; /*!< A five-character SQLSTATE diagnostic code. */
+ SQLCHAR * diag_subclass_origin; /*!< */

- MYODBC_DIA_PTR pOwner; /*!< Diagnostic which owns us - we do not exist without it. */
+ MYODBC_DIA_PTR pOwner; /*!< Diagnostic which owns us - we do not exist without it. */

} MYODBC_DIA_REC;

@@ -165,7 +166,8 @@

\sa MYODBCDiaRecFree
*/
-MYODBC_DIA_REC_PTR MYODBCDiaRecAlloc( MYODBC_DIA_PTR pDiagnostic, MYODBC_DIA_ID nState );
+MYODBC_DIA_REC_PTR MYODBCDiaRecAlloc( MYODBC_DIA_PTR pDiagnostic,
+ MYODBC_DIA_ID nState );

/*!
\internal

--- 1.11/MYODBCDia/MYODBCDiaLib/MYODBCDiaRecAlloc.c 2005-03-29 18:10:27 -08:00
+++ 1.12/MYODBCDia/MYODBCDiaLib/MYODBCDiaRecAlloc.c 2005-04-20 16:07:34 -07:00
@@ -30,7 +30,7 @@
pDiaRec->diag_subclass_origin = MYODBCDia_pStates[nState].diag_class_origin;
pDiaRec->pOwner = pDia;

- MYODBCArrayElementAdd( pDia->hRecords, MYODBCArrayElements( pDia->hRecords ), pDiaRec );
+ MYODBCArrayAppend( pDia->hRecords, pDiaRec );

pDia->diag_number += 1;


--- 1.11/MYODBCDia/MYODBCDiaLib/MYODBCDiaGet.c 2005-03-24 17:23:00 -08:00
+++ 1.12/MYODBCDia/MYODBCDiaLib/MYODBCDiaGet.c 2005-04-20 16:07:34 -07:00
@@ -14,10 +14,11 @@

#include "MYODBCDiaInternal.h"

-MYODBC_DIA_REC_HANDLE MYODBCDiaGet( MYODBC_DIA_HANDLE hDia, SQLSMALLINT nRecord /* 1 based */ )
+MYODBC_DIA_REC_HANDLE MYODBCDiaGet( MYODBC_DIA_HANDLE hDia,
+ SQLSMALLINT nRecord /* 1 based */ )
{
- MYODBC_DIA_PTR pDia = (MYODBC_DIA_PTR)hDia;
- MYODBC_DIA_REC_PTR pDiaRec = NULL;
+ MYODBC_DIA_PTR pDia = (MYODBC_DIA_PTR)hDia;
+ MYODBC_ARRAY_ITEM_DATA_PTR pData;

/* is nRecord below the array we have */
if ( nRecord < 1 )
@@ -29,9 +30,9 @@

/* return the record */
nRecord--; /* make 0 based */
- pDiaRec = (MYODBC_DIA_REC_PTR)MYODBCArrayElementGet( pDia->hRecords, nRecord );
+ MYODBCArrayGetExt( pDia->hRecords, nRecord, &pData );

- return pDiaRec;
+ return pData;
}



--- 1.13/MYODBCDia/MYODBCDiaLib/MYODBCDiaAppend.c 2005-03-24 17:23:00 -08:00
+++ 1.14/MYODBCDia/MYODBCDiaLib/MYODBCDiaAppend.c 2005-04-20 16:07:34 -07:00
@@ -14,7 +14,10 @@

#include "MYODBCDiaInternal.h"

-SQLRETURN MYODBCDiaAppend( MYODBC_DIA_HANDLE hDia, MYODBC_DIA_ID nState, SQLINTEGER diag_native, SQLCHAR *pszMessage )
+SQLRETURN MYODBCDiaAppend( MYODBC_DIA_HANDLE hDia,
+ MYODBC_DIA_ID nState,
+ SQLINTEGER diag_native,
+ SQLCHAR * pszMessage )
{
return MYODBCDiaAppend2( hDia, nState, diag_native, pszMessage, SQL_NO_ROW_NUMBER, SQL_NO_COLUMN_NUMBER );
}

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org