Page 1 of 1
Freeze when reading blob value
Posted: Fri 20 Jan 2006 16:15
by a3804
Hi!
I have following code which reads a blob value from mydb (datatype longblob, mysql 5.0, data size 512kB):
s = "SELECT fldBild FROM tblA WHERE fldID=1"
reader = g_DB.mySQLExecuteReader(s)
Do While reader.Read
blob = reader.GetMySqlBlob(0)
m_bytBild = blob.Value
Loop
reader.Close()
This works fine, but in some cases the program freezes in the line with reader.Read. CPU is at 0%, db process is on SLEEP state...
Posted: Fri 20 Jan 2006 17:00
by Serious
Please specify your .NET Framework version, MySQLDirect .NET version, MySQL version.
Post small peace of code and table definition to reproduce the problem.
Additional Infos
Posted: Fri 20 Jan 2006 17:34
by a3804
NET Framework is 1.1
CoreLab Version is 3.20.5.0
MySQL is 5.0.16
Table definition:
CREATE TABLE `wunde_verlauf` (
`fldWundeVerlaufID` int(11) NOT NULL auto_increment,
`fldDatum` datetime default NULL,
`fldGroesse` text,
`fldKommentar` text,
`fldBild` mediumblob NOT NULL,
`fldWundbeschaffenheitRef` int(11) default NULL,
`fldWundeRef` int(11) default NULL,
`fldErsterWert` int(11) default NULL,
`fldUserRef` int(11) default NULL,
`fldAenderungsdatum` datetime default NULL,
`fldGeloescht` tinyint(4) default '0',
`fldIstLetzter` tinyint(4) default NULL,
PRIMARY KEY (`fldWundeVerlaufID`),
KEY `fldWundeRef` (`fldWundeRef`),
KEY `fldWundbeschaffenheitRef` (`fldWundbeschaffenheitRef`),
KEY `fldErsterWert` (`fldErsterWert`),
KEY `fldUserRef` (`fldUserRef`),
KEY `fldGeloescht` (`fldGeloescht`),
KEY `fldIstLetzter` (`fldIstLetzter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Code fragment:
Dim s As String
Dim reader As MySqlDataReader
Dim blob As MySqlBlob
Dim cmd As new MySqlCommand
s = "SELECT fldBild FROM wunde_verlauf WHERE fldWundeVerlaufID=" & Me.WundeVerlaufID
openConnection(s)
cmd.Connection = m_dbConnection
cmd.CommandText = s
cmd.CommandType = CommandType.Text
more info
Posted: Fri 20 Jan 2006 17:44
by a3804
the problem occurs only, if the blob data are larger than 16 kByte, independent on the table type
problem solved - but still unsatisfied
Posted: Sat 21 Jan 2006 14:33
by a3804
The problem was the compression of the connection object. When I disable compression, everything works fine.
I am using corelab.mysql.dll version 3.20.5.0, I thought this version could handle the compression feature???
Posted: Mon 23 Jan 2006 06:59
by Serious
We are investigating this problem right now.
You will be notified of the results
Posted: Thu 26 Jan 2006 13:08
by Serious
We have fixed this problem for the MySQLDirect .NET.
Look forward for the next build.