Merge pull request #2254 from owncloud/fixing-mssql-utf8-and-insert-empty-string-master
Fixing mssql utf8 and insert empty string master
This commit is contained in:
commit
2e9d641337
|
@ -292,8 +292,10 @@ class OC_DB {
|
||||||
'username' => $user,
|
'username' => $user,
|
||||||
'password' => $pass,
|
'password' => $pass,
|
||||||
'hostspec' => $host,
|
'hostspec' => $host,
|
||||||
'database' => $name
|
'database' => $name,
|
||||||
);
|
'charset' => 'UTF-8'
|
||||||
|
);
|
||||||
|
$options['portability'] = $options['portability'] - MDB2_PORTABILITY_EMPTY_TO_NULL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -203,7 +203,10 @@ class Cache {
|
||||||
|
|
||||||
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')'
|
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')'
|
||||||
. ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
|
. ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
|
||||||
$query->execute($params);
|
$result = $query->execute($params);
|
||||||
|
if (\MDB2::isError($result)) {
|
||||||
|
\OCP\Util::writeLog('cache', 'Insert to cache failed: '.$result, \OCP\Util::ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
return (int)\OC_DB::insertid('*PREFIX*filecache');
|
return (int)\OC_DB::insertid('*PREFIX*filecache');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue