[TYPO3-core] BLOBs and Oracle ...again

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Jul 17 14:48:41 CEST 2006


I noticed again an issue with BLOBs in Oracle.

ADOdb (and this DBAL) handles BLOBs in INSERT and UPDATES transparently (by 
using the proper PHP query flags). But there are issues when you use the 
BLOB field in the WHERE clause. You cannot do a simple "blobfield = value" 
comparison. It's usually pointless as Oracle expects Binary-LOBs to contain 
*real* binary data (eg images).

The problem can be noticed with the index search. The crawler tries to load 
the indexer configurion (in class.crawler.php, methods crawler_init and 
processDatamap_afterDatabaseOperations) but fails because the field 
alternative_source_pid is a BLOB. I think it is just another pid value and 
should therefore be an int.

This is the statement with the problem:

$indexingConfigurations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
		AND (starttime=0 OR starttime<='.time().')
		AND set_id=0
		AND type=1
		AND table2index='.
		AND (
			(alternative_source_pid ='.
				AND pid='.intval($currentRecord['pid']).'
			OR (
		AND records_indexonchange=1'.

It may be possible to use a BLOB in WHERE with the proper SQL casting etc, 
but it I really think we should simply change this column definition. I see 
no reason in usung a BLOB here. *

I am for changing this column right now (4.0.x) and getting rid of all 
other BLOBs in 4.1 that contain no real binary data. **


* One part of the WHERE clause compares with ''. This has to be changed so 
that 0 takes the role of '' (no alt. pid).

** Any remaining Mysql TEXT columns should be CLOBs.

More information about the TYPO3-team-core mailing list