NDB error with SELECT on TEXT or BLOB column
I have a NDBCLUSTER table 'ViewStorage' with an INTEGER primary key 'viewid', TEXT column 'description', and DATETIME column 'created'.
The following work just fine:
SELECT description FROM ViewStorage WHERE viewid=1
SELECT description FROM ViewStorage WHERE viewid=1 OR created='xyz'
SELECT created FROM ViewStorage WHERE viewid=1 OR viewid=2
But the following does NOT work:
SELECT description FROM ViewStorage WHERE viewid=1 OR viewid=2
This should return 2 rows; however, it returns only 1 row (viewid=2), and I get:
1 row in set, 2 warnings (0.00 sec)
mysql> show warnings;
+-------+------+-------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-------------------------------------------------------------------------+
| Error | 1296 | Got error 4265 'The method is not valid in current blob state' from NDB |
| Error | 1296 | Got error 0 'No error' from NDB |
+-------+------+-------------------------------------------------------------------------+
2 rows in set (0.00 sec)
I know that TEXT and BLOB columns are stored differently in NDB tables, so I'm assuming this is causing a problem. Is there anything I can do to make the query work as expected?
(The queries are generated by JBoss, which seems to prefer to break queries into 2 individual lookups: "SELECT pk FROM table WHERE cond" followed by a concatenation of keys: "SELECT * FROM table WHERE pk=x1 OR pk=x2 OR pk=x3 ...")
Subject
Views
Written By
Posted
NDB error with SELECT on TEXT or BLOB column
1798
December 20, 2006 05:25PM
1042
December 21, 2006 03:16AM
1049
December 21, 2006 03:22AM
978
December 26, 2006 05: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.