MySQL Forums
Forum List  »  Quality Assurance

Cursor cannot explicitly SELECT more than one item of different type
Posted by: Greg Dougherty
Date: October 02, 2007 07:16PM

Hi,

Just spent way too many hours tracking down this bug.

MySQL 5.0.41, Mac OS/X 10.4.10
Table with two fields:
CREATE TABLE tempSets (
gene VARCHAR(30) NOT NULL,
value DOUBLE PRECISION NULL DEFAULT NULL)
ENGINE = MyISAM;

In a stored procedure, had the following line:
DECLARE tempCursor CURSOR FOR SELECT gene, value FROM tempSets;

later had this line:
FETCH tempCursor INTO geneName, value;

FETCH did NOT work. It would put the correct value into geneName, and NULL into value. I reversed the order of the fields. It still put correct value into geneName, and NULL into value. Changing the DECLARE to
DECLARE tempCursor CURSOR FOR SELECT * FROM tempSets;
Made everything work.

This should be fixed. If not fixed, it at least should be documented.

Greg

Options: ReplyQuote


Subject
Views
Written By
Posted
Cursor cannot explicitly SELECT more than one item of different type
5198
October 02, 2007 07:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.