Bug #31553 Reading MEDIUMTEXT field from a recordset prevents reading that field again
Submitted: 12 Oct 2007 4:46 Modified: 15 Oct 2007 14:06
Reporter: Jonathan Aldridge Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.21 OS:Windows (XP)
Assigned to: CPU Architecture:Any

[12 Oct 2007 4:46] Jonathan Aldridge
Description:
When reading a field of type TEXT or MEDIUMTEXT from a recordset, the value of the field in the recordset gets set to null for any further requests on that field.

How to repeat:
Create a table using:

CREATE TABLE  `DBNAME`.`testtable` (
  `test1` text, `test2` text, `idx` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Insert into testtable values ('test1', 'test2', 1)

create and run vbs script file:

	Set oConn = CreateObject("ADODB.Connection")
	oConn.Open "DSN=MySQLLocal;Username=root"
	
	oRS = oConn.execute("SELECT * FROM testtable t where idx = 1")
	sDmy1 = oRS(0)
	MsgBox(sDmy1)
	MsgBox(IsNull(oRS(0)))
	MsgBox(oRS(0))

Running this shows that oRS(0) get set to null after first read
[15 Oct 2007 13:00] Tonci Grgin
Hi Jonathan and thanks for your report. Can you please tell me which version of MyODBC do you use? If it's not the most current one, please upgrade and retest.
[15 Oct 2007 14:06] Susanne Ebrecht
This is a duplicate of bug #16866