Freeze when reading blob value

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
a3804
Posts: 5
Joined: Fri 20 Jan 2006 16:11

Freeze when reading blob value

Post by a3804 » Fri 20 Jan 2006 16:15

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...

Serious

Post by Serious » Fri 20 Jan 2006 17:00

Please specify your .NET Framework version, MySQLDirect .NET version, MySQL version.
Post small peace of code and table definition to reproduce the problem.

a3804
Posts: 5
Joined: Fri 20 Jan 2006 16:11

Additional Infos

Post by a3804 » Fri 20 Jan 2006 17:34

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

a3804
Posts: 5
Joined: Fri 20 Jan 2006 16:11

more info

Post by a3804 » Fri 20 Jan 2006 17:44

the problem occurs only, if the blob data are larger than 16 kByte, independent on the table type

a3804
Posts: 5
Joined: Fri 20 Jan 2006 16:11

problem solved - but still unsatisfied

Post by a3804 » Sat 21 Jan 2006 14:33

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???

Serious

Post by Serious » Mon 23 Jan 2006 06:59

We are investigating this problem right now.
You will be notified of the results

Serious

Post by Serious » Thu 26 Jan 2006 13:08

We have fixed this problem for the MySQLDirect .NET.
Look forward for the next build.

Post Reply