Index: typo3/sysext/dbal/class.ux_t3lib_sqlparser.php =================================================================== --- typo3/sysext/dbal/class.ux_t3lib_sqlparser.php (revision 5601) +++ typo3/sysext/dbal/class.ux_t3lib_sqlparser.php (working copy) @@ -94,7 +94,7 @@ function compileINSERT($components) { switch((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) { case 'native': - parent::compileINSERT($components); + $query = parent::compileINSERT($components); break; case 'adodb': if(isset($components['VALUES_ONLY']) && is_array($components['VALUES_ONLY'])) { @@ -352,10 +352,11 @@ } } elseif ($v['calc']) { $output.=trim(($v['table']?$v['table'].'.':'').$v['field']).$v['calc'].$v['calc_value'][1].$this->compileAddslashes($v['calc_value'][0]).$v['calc_value'][1]; - } else { + } elseif(!($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator']==='LIKE' && $functionMapping)) { $output.=trim(($v['table']?$v['table'].'.':'').$v['field']); } + // Set comparator: if ($v['comparator']) { switch(true) { case ($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator']==='LIKE' && $functionMapping): @@ -377,7 +378,8 @@ } break; } - } } + } + } } } break; Index: typo3/sysext/dbal/class.ux_t3lib_sqlengine.php =================================================================== --- typo3/sysext/dbal/class.ux_t3lib_sqlengine.php (revision 5601) +++ typo3/sysext/dbal/class.ux_t3lib_sqlengine.php (working copy) @@ -148,7 +148,7 @@ foreach($components['FIELDS'] as $fN => $fCfg) { // the backticks get converted to the correct quote char automatically - $fieldsKeys[$fN] = '`'.$fN.'` '.$this->compileFieldCfg($fCfg['definition']); + $fieldsKeys[$fN] = $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE'])]->DataDictionary->nameQuote('`'.$fN.'`').' '.$this->compileFieldCfg($fCfg['definition']); } if(isset($components['KEYS']) && is_array($components['KEYS'])) { @@ -281,6 +281,13 @@ return $cfg; } + /** + * Checks if the submitted feature index contains a default value definition and the default value + * + * @param array $featureIndex A feature index as produced by parseFieldDef() + * @return boolean + * @see t3lib_sqlparser::parseFieldDef() + */ function checkEmptyDefaultValue($featureIndex) { if (is_array($featureIndex['DEFAULT']['value'])) { if(!is_numeric($featureIndex['DEFAULT']['value'][0]) && empty($featureIndex['DEFAULT']['value'][0])) { @@ -295,8 +302,13 @@ /** * Implodes an array of WHERE clause configuration into a WHERE clause. * - * DBAL-specific: The only(!) handled "calc" operator supported by parseWhereClause() is the bitwise - * logical and (&), and only this one is supported here! + * DBAL-specific: The only(!) handled "calc" operators supported by parseWhereClause() are: + * - the bitwise logical and (&) + * - the addition (+) + * - the substraction (-) + * - the multiplication (*) + * - the division (/) + * - the modulo (%) * * @param array WHERE clause configuration * @return string WHERE clause as string. @@ -327,7 +339,7 @@ $output.=' '.trim($v['modifier']).' '; // DBAL-specific: Set calculation, if any: - if ($v['calc'] && $functionMapping) { + if ($v['calc'] === '&' && $functionMapping) { switch(true) { case $GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8'): // Oracle only knows BITAND(x,y) - sigh