[BUGS] My Bug report: JDBC-Driver produces wrong output.] 
Author Message
 [BUGS] My Bug report: JDBC-Driver produces wrong output.]

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01C04B03.28E5AE60
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi,

i made the diffs. Hope they help you.

Best regards,
Jan

______________________________________________

SMB GmbH                                 http://www.***.com/

-----Ursprngliche Nachricht-----


Datum: Donnerstag, 9. November 2000 16:52
Betreff: Re: [BUGS] My Bug report: JDBC-Driver produces wrong output.]

Quote:
>Sure,

> diff -c old_file new_file >out

>should give you the context diff in a file called 'out'.

>[ Charset ISO-8859-1 unsupported, converting... ]
>> Hi,

>> i have no idea, what a context diff is, sorry. However, i have marked the
>> places in code which I have changed. I hope this helps you, if not please
>> explain to me, what a context diff is and I'll try to send you one.

>> Thank you for  your time. Best regards,
>> Jan

>> -----Urspr?ngliche Nachricht-----


>> Datum: Dienstag, 7. November 2000 12:45
>> Betreff: Re: [BUGS] My Bug report: JDBC-Driver produces wrong output.]

>> >Is there any chance you can send a context diff so I am sure what you
>> >are needing changed?

>> >> Hi,

>> >> I grabbed a snapshot. However, I am unable to compile the enterprise
>> version of
>> >> the driver. I'll try to fix this and send you a report, when ready.

>> >> Regards,
>> >> Jan


>> >> > I think this is fixed in the current cvs tree.  Can you grab a snapshot
>> >> > ftp file and let me know.  If not, can I get a contect diff.  Thanks.

>> >> --
>> >> ____________________________________________________________________

>> >> SMB GmbH                       http://www.***.com/

>> >--
>> >  Bruce Momjian                        |   http://www.***.com/

>> >  +  If your life is a hard drive,     |  830 Blythe Avenue
>> >  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

>--
>  Bruce Momjian                        |   http://www.***.com/

>  +  If your life is a hard drive,     |  830 Blythe Avenue
>  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

------=_NextPart_000_000E_01C04B03.28E5AE60
Content-Type: application/octet-stream; name="PostgresqlDataSource.java.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="PostgresqlDataSource.java.diff"

*** pgsnap0611200-orig/src/interfaces/jdbc/org/postgresql/PostgresqlDataSou=
rce.java        Thu Oct 12 10:55:24 2000
--- pgsnap0611200/src/interfaces/jdbc/org/postgresql/PostgresqlDataSource.j=
ava     Tue Nov  7 11:05:21 2000
***************
*** 64,72 ****
  import javax.naming.Name;
  import javax.naming.NamingException;
  import javax.naming.spi.ObjectFactory;
! import postgresql.util.PSQLException;
! import postgresql.xa.XADataSourceImpl;
!=20
=20=20
  /**

--- 64,75 ----
  import javax.naming.Name;
  import javax.naming.NamingException;
  import javax.naming.spi.ObjectFactory;
! // FIXME
! //import postgresql.util.PSQLException;
! //import postgresql.xa.XADataSourceImpl;
! import org.postgresql.util.PSQLException;
! import org.postgresql.xa.XADataSourceImpl;
! //---------
=20=20
  /**

***************
*** 191,198 ****
       * Each datasource maintains it's own driver, in case of
       * driver-specific setup (e.g. pools, log writer).
       */
!     private transient postgresql.Driver _driver;
!=20
=20=20
=20=20
=20=20
--- 194,203 ----
       * Each datasource maintains it's own driver, in case of
       * driver-specific setup (e.g. pools, log writer).
       */
! // FIXME
! //    private transient postgresql.Driver _driver;
! private transient org.postgresql.Driver _driver;
! //---------
=20=20
=20=20
=20=20
***************
*** 223,230 ****
                // Constructs a driver for use just by this data source
                // which will produce TwoPhaseConnection-s. This driver
                // is not registered with the driver manager.
!               _driver =3D new postgresql.Driver();
!               _driver.setLogWriter( _logWriter );
            } catch ( SQLException except ) {
                if ( _logWriter !=3D null )
                    _logWriter.println( "DataSource: Failed to initialize JDBC driver: =
" + except );
--- 228,242 ----
                // Constructs a driver for use just by this data source
                // which will produce TwoPhaseConnection-s. This driver
                // is not registered with the driver manager.
! // FIXME
! //            _driver =3D new postgresql.Driver();
! _driver =3D new org.postgresql.Driver();
! //-----------
!=20
! //FIXME
! //            _driver.setLogWriter( _logWriter );
! // Method seems to be unavailable. Just commented it out.
! //----------
            } catch ( SQLException except ) {
                if ( _logWriter !=3D null )
                    _logWriter.println( "DataSource: Failed to initialize JDBC driver: =
" + except );
***************
*** 260,266 ****
        // attempt or a failure.
        try {
            conn =3D _driver.connect( url, info );
!           if ( ! ( conn instanceof postgresql.jdbc2.Connection ) ) {
                if ( _logWriter !=3D null )
                    _logWriter.println( "DataSource: JDBC 1 connections not supported" =
);
                throw new PSQLException( "postgresql.ds.onlyjdbc2" );
--- 272,281 ----
        // attempt or a failure.
        try {
            conn =3D _driver.connect( url, info );
! // FIXME
! //        if ( ! ( conn instanceof postgresql.jdbc2.Connection ) ) {
! if ( ! ( conn instanceof org.postgresql.jdbc2.Connection ) ) {
! //--------
                if ( _logWriter !=3D null )
                    _logWriter.println( "DataSource: JDBC 1 connections not supported" =
);
                throw new PSQLException( "postgresql.ds.onlyjdbc2" );
***************
*** 289,295 ****
        // synchronizing.
        if ( writer !=3D null ) {
            if ( _driver !=3D null )
!               _driver.setLogWriter( writer );
            _logWriter =3D writer;
        }
      }
--- 304,313 ----
        // synchronizing.
        if ( writer !=3D null ) {
            if ( _driver !=3D null )
! // FIXME
! //            _driver.setLogWriter( writer );
! // Method seems to be unavailable. Commented it out.
! //----------
            _logWriter =3D writer;
        }
      }

------=_NextPart_000_000E_01C04B03.28E5AE60
Content-Type: application/octet-stream; name="ResultSet.java.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="ResultSet.java.diff"

*** pgsnap0611200-orig/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.j=
ava     Thu Nov  2 10:00:17 2000
--- pgsnap0611200/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java       T=
ue Nov  7 11:11:12 2000
***************
*** 468,476 ****
      // This works, but it's commented out because Michael Stephenson's
      // solution is better still:
      //SimpleDateFormat df =3D new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
!=20=20=20=20=20
!     // Michael Stephenson's solution:
      SimpleDateFormat df =3D null;
      if (s.length()>21 && s.indexOf('.') !=3D -1) {
        df =3D new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSzzz");
      } else if (s.length()>19 && s.indexOf('.') =3D=3D -1) {
--- 468,487 ----
      // This works, but it's commented out because Michael Stephenson's
      // solution is better still:
      //SimpleDateFormat df =3D new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
! // Modification by Jan Thomae
!     String sub =3D s.substring(s.length() - 3, s.length()-2);
!     if (sub.equals("+") || sub.equals("-")) {
!             s =3D s.substring(0, s.length()-3) + "GMT"+ s.substring(s.len=
gth()-3, s.length())+":00";
!     }
! // -------
!        // Michael Stephenson's solution:
      SimpleDateFormat df =3D null;
+=20
+ // Modification by Jan Thomae
+     if (s.length()>27) {
+     df =3D new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz");=20=20
+     } else=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+ // -------
      if (s.length()>21 && s.indexOf('.') !=3D -1) {
        df =3D new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSzzz");
      } else if (s.length()>19 && s.indexOf('.') =3D=3D -1) {
***************
*** 839,852 ****
=20=20
        //if index<0, count from the end of the result set, but check
        //to be sure that it is not beyond the first index
!       if (index<0) {
            if (index>=3D-rows.size())
                internalIndex=3Drows.size()+index;
            else {
                beforeFirst();
                return false;
            }
!       } else {
        //must be the case that index>0,=20
        //find the correct place, assuming that=20
        //the index is not too large
--- 850,863 ----
=20=20
        //if index<0, count from the end of the result set, but check
        //to be sure that it is not beyond the first index
!       if (index<0)=20
            if (index>=3D-rows.size())
                internalIndex=3Drows.size()+index;
            else {
                beforeFirst();
                return false;
            }
!=20=09=09
        //must be the case that index>0,=20
        //find the correct place, assuming that=20
        //the index is not too large
***************
*** 855,861 ****
        else {
            afterLast();
            return false;
-       }
        }
=20=20
        current_row=3DinternalIndex;
--- 866,871 ----

------=_NextPart_000_000E_01C04B03.28E5AE60--



Tue, 29 Apr 2003 23:24:42 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. BUGS idapi BUGS idapi BUGS idapi BUGS

2. One more 6.5 bug - wrong data in output - on 2 left joins

3. Where do we report bugs? (EM bug)

4. WAS BUG, BUG, BUG

5. BUGS BUGS BUGS (Disappointed with Borland!)

6. BUG BUG BUG: VB5+DAO 3.51

7. Bugs, Bugs, Bugs ...

8. JDBC driver Bug

9. Bugs Informix Jdbc Drivers...

10. Unexplained deadlock...possible JDBC driver bug

11. bug in jdbc:oracle:thin driver

12. JDBC driver Bug


 
Powered by phpBB® Forum Software