RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table
We had similar problems with version 3.23.33. For us, the fix was to move the errant tables to MyISAM. We did not need transaction support for those tables. We have since moved the tables back to BDB with MySQL version 3.23.34a. The problem seems to have been resolved in this latest update. Cedric. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 3:29 PM To: 'Stephen Faustino'; '[EMAIL PROTECTED]' Subject: RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table I can also verify that the data seems to be stored properly (from mysql's command line tool). The problem seems most likely to occur with larger text strings Anyone else? -Scott -Original Message- From: Stephen Faustino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 2:51 PM To: '[EMAIL PROTECTED]' Subject: RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table We have also experienced the same exact behavior, also using the mm.mysql driver, on Linux. However, our problem is intermittent. There are times (though these times cannot be accurately predicted) where the data is retrieved correctly, which implies that the data is stored correclty. We have verified that the data is being stored correctly by using mysql to select the data into a dumpfile. We did not try to recreate the problem with a table handler other than BDB. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation Direct/Vmail (210)402-9669x949 mailto:[EMAIL PROTECTED] This email is intended for the named recipient(s) only and may contain information that is privileged and/or confidential. Nothing in this email is intended to constitute a waiver of any privilege or the confidentiality of this message. If you have received this email in error, please notify me immediately by reply and delete this message. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 1:01 PM To: '[EMAIL PROTECTED]' Subject: BDB table corruption when inserting/retrieving a BLOB into a BDB table I'm getting a very strange results all of the sudden when dealing with BLOBs in a mysql 3.23.32 on a Solaris 7 (SPARC) machine (inserts/deletes handled with the JDBC driver from http://mmmysql.sourceforge.net/) If I do the following: 1) Create a BDB table with a blob column: CREATE TABLE test4( id INTEGER not null PRIMARY KEY, ablob BLOB null ) TYPE=BDB; 2) Insert a particular blob into that column (I'm storing XSLT stylesheets in the real table, most of them work fine but one in particular is all of the sudden causing problems): ---code snip--- String fn="badblob.txt";// Filename of the blob I'm loading that causes problems FileInputStream style_fis=new FileInputStream(fn); byte[] style_bytes=new byte[style_fis.available()]; style_fis.read(style_bytes); String dQuery="delete from ttest4"; String iQuery="insert into ttest4(id,ablob) values(1,null);"; conn=cp.getConnection();// Gets a JDBC connection from a pool I keep elsewhere Statement stmt=conn.createStatement(); stmt.executeUpdate(dQuery); stmt.executeUpdate(iQuery); stmt.close(); String uQuery="update test4 set ablob=? where id=1"; pstmt=conn.prepareStatement(uQuery); pstmt.setBytes(1,style_bytes); pstmt.execute(); pstmt.close(); cp.releaseConnection(conn); ---end code snip--- (I've modified this some, but basically my code will insert an empty row then update it with the blob, this is to deal with some issues we've had with other RDBMs' implementations of JDBC). This seems to go just fine. 3) Retrieve that blob with the following code: --code snip-- conn=cp.getConnection(); Statement stmt=conn.createStatement(); String query="select ablob from ttest4 where id=1"; ResultSet rs=stmt.executeQuery(query); while(rs.next()) { Blob b=rs.getBlob(1); byte[] blobBytes=b.getBytes(0,(int)b.length()); System.out.println(new String(b)); } --end code snip-- At this point my output ends up very garbled. The output usually starts off with some very strange ASCII characters (seemingly binary data) with things like filesystem names thrown in the mix... Then at some point parts of my actual data (from the "badblob.txt" file in step 2) appears... Then the end of it is usually overwritten with more strange ASCII characters. In attempting to fix this problem, I dropped and recreated the entire database a few times, restarted the server daemon, etc. I finally ended up changing the table to TYPE=MyISAM and the problem went away. Unfortunately, I need transaction support for this project. I've been using this code, data, server version, bdb table, etc for a few weeks now with no problems, but suddenly when regenerating the schema last night this started to occur and is now happening r
RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table
We have also experienced the same exact behavior, also using the mm.mysql driver, on Linux. However, our problem is intermittent. There are times (though these times cannot be accurately predicted) where the data is retrieved correctly, which implies that the data is stored correclty. We have verified that the data is being stored correctly by using mysql to select the data into a dumpfile. We did not try to recreate the problem with a table handler other than BDB. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation Direct/Vmail (210)402-9669x949 mailto:[EMAIL PROTECTED] This email is intended for the named recipient(s) only and may contain information that is privileged and/or confidential. Nothing in this email is intended to constitute a waiver of any privilege or the confidentiality of this message. If you have received this email in error, please notify me immediately by reply and delete this message. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 1:01 PM To: '[EMAIL PROTECTED]' Subject: BDB table corruption when inserting/retrieving a BLOB into a BDB table I'm getting a very strange results all of the sudden when dealing with BLOBs in a mysql 3.23.32 on a Solaris 7 (SPARC) machine (inserts/deletes handled with the JDBC driver from http://mmmysql.sourceforge.net/) If I do the following: 1) Create a BDB table with a blob column: CREATE TABLE test4( id INTEGER not null PRIMARY KEY, ablob BLOB null ) TYPE=BDB; 2) Insert a particular blob into that column (I'm storing XSLT stylesheets in the real table, most of them work fine but one in particular is all of the sudden causing problems): ---code snip--- String fn="badblob.txt";// Filename of the blob I'm loading that causes problems FileInputStream style_fis=new FileInputStream(fn); byte[] style_bytes=new byte[style_fis.available()]; style_fis.read(style_bytes); String dQuery="delete from ttest4"; String iQuery="insert into ttest4(id,ablob) values(1,null);"; conn=cp.getConnection();// Gets a JDBC connection from a pool I keep elsewhere Statement stmt=conn.createStatement(); stmt.executeUpdate(dQuery); stmt.executeUpdate(iQuery); stmt.close(); String uQuery="update test4 set ablob=? where id=1"; pstmt=conn.prepareStatement(uQuery); pstmt.setBytes(1,style_bytes); pstmt.execute(); pstmt.close(); cp.releaseConnection(conn); ---end code snip--- (I've modified this some, but basically my code will insert an empty row then update it with the blob, this is to deal with some issues we've had with other RDBMs' implementations of JDBC). This seems to go just fine. 3) Retrieve that blob with the following code: --code snip-- conn=cp.getConnection(); Statement stmt=conn.createStatement(); String query="select ablob from ttest4 where id=1"; ResultSet rs=stmt.executeQuery(query); while(rs.next()) { Blob b=rs.getBlob(1); byte[] blobBytes=b.getBytes(0,(int)b.length()); System.out.println(new String(b)); } --end code snip-- At this point my output ends up very garbled. The output usually starts off with some very strange ASCII characters (seemingly binary data) with things like filesystem names thrown in the mix... Then at some point parts of my actual data (from the "badblob.txt" file in step 2) appears... Then the end of it is usually overwritten with more strange ASCII characters. In attempting to fix this problem, I dropped and recreated the entire database a few times, restarted the server daemon, etc. I finally ended up changing the table to TYPE=MyISAM and the problem went away. Unfortunately, I need transaction support for this project. I've been using this code, data, server version, bdb table, etc for a few weeks now with no problems, but suddenly when regenerating the schema last night this started to occur and is now happening regularly. I'd like to blame this on the particular blob I'm inserting (badblob.txt) but that doesn't seem to be the problem as it hasn't changed. My other thought was a corrupt disk, but that doesn't seem likely... I'm open to any suggestions as this problem seems potentially very serious. Any help is greatly appreciated! -Scott - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing?
RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table
I can also verify that the data seems to be stored properly (from mysql's command line tool). The problem seems most likely to occur with larger text strings Anyone else? -Scott -Original Message- From: Stephen Faustino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 2:51 PM To: '[EMAIL PROTECTED]' Subject: RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table We have also experienced the same exact behavior, also using the mm.mysql driver, on Linux. However, our problem is intermittent. There are times (though these times cannot be accurately predicted) where the data is retrieved correctly, which implies that the data is stored correclty. We have verified that the data is being stored correctly by using mysql to select the data into a dumpfile. We did not try to recreate the problem with a table handler other than BDB. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation Direct/Vmail (210)402-9669x949 mailto:[EMAIL PROTECTED] This email is intended for the named recipient(s) only and may contain information that is privileged and/or confidential. Nothing in this email is intended to constitute a waiver of any privilege or the confidentiality of this message. If you have received this email in error, please notify me immediately by reply and delete this message. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 1:01 PM To: '[EMAIL PROTECTED]' Subject: BDB table corruption when inserting/retrieving a BLOB into a BDB table I'm getting a very strange results all of the sudden when dealing with BLOBs in a mysql 3.23.32 on a Solaris 7 (SPARC) machine (inserts/deletes handled with the JDBC driver from http://mmmysql.sourceforge.net/) If I do the following: 1) Create a BDB table with a blob column: CREATE TABLE test4( id INTEGER not null PRIMARY KEY, ablob BLOB null ) TYPE=BDB; 2) Insert a particular blob into that column (I'm storing XSLT stylesheets in the real table, most of them work fine but one in particular is all of the sudden causing problems): ---code snip--- String fn="badblob.txt";// Filename of the blob I'm loading that causes problems FileInputStream style_fis=new FileInputStream(fn); byte[] style_bytes=new byte[style_fis.available()]; style_fis.read(style_bytes); String dQuery="delete from ttest4"; String iQuery="insert into ttest4(id,ablob) values(1,null);"; conn=cp.getConnection();// Gets a JDBC connection from a pool I keep elsewhere Statement stmt=conn.createStatement(); stmt.executeUpdate(dQuery); stmt.executeUpdate(iQuery); stmt.close(); String uQuery="update test4 set ablob=? where id=1"; pstmt=conn.prepareStatement(uQuery); pstmt.setBytes(1,style_bytes); pstmt.execute(); pstmt.close(); cp.releaseConnection(conn); ---end code snip--- (I've modified this some, but basically my code will insert an empty row then update it with the blob, this is to deal with some issues we've had with other RDBMs' implementations of JDBC). This seems to go just fine. 3) Retrieve that blob with the following code: --code snip-- conn=cp.getConnection(); Statement stmt=conn.createStatement(); String query="select ablob from ttest4 where id=1"; ResultSet rs=stmt.executeQuery(query); while(rs.next()) { Blob b=rs.getBlob(1); byte[] blobBytes=b.getBytes(0,(int)b.length()); System.out.println(new String(b)); } --end code snip-- At this point my output ends up very garbled. The output usually starts off with some very strange ASCII characters (seemingly binary data) with things like filesystem names thrown in the mix... Then at some point parts of my actual data (from the "badblob.txt" file in step 2) appears... Then the end of it is usually overwritten with more strange ASCII characters. In attempting to fix this problem, I dropped and recreated the entire database a few times, restarted the server daemon, etc. I finally ended up changing the table to TYPE=MyISAM and the problem went away. Unfortunately, I need transaction support for this project. I've been using this code, data, server version, bdb table, etc for a few weeks now with no problems, but suddenly when regenerating the schema last night this started to occur and is now happening regularly. I'd like to blame this on the particular blob I'm inserting (badblob.txt) but that doesn't seem to be the problem as it hasn't changed. My other thought was a corrupt disk, but that doesn't seem likely... I'm open to any suggestions as this problem seems potentially very serious. Any help is greatly appreciated! -Scott - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To req