8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Fixed CORE-5341 - User collate doesn't work with blobs.

This commit is contained in:
Adriano dos Santos Fernandes 2016-09-08 14:11:21 -03:00
parent d1e59bd23f
commit 9951d944e3
2 changed files with 14 additions and 5 deletions

View File

@ -12,6 +12,11 @@
Contributor(s):
Alex Peshkov <peshkoff at mail.ru>
* Bugfix CORE-5341
User collate doesn't work with blobs
Contributor(s):
Adriano dos Santos Fernandes <adrianosf at gmail.com>
* Bugfix CORE-5339
Assertion in createDatabase() when doing overwrite check
Contributor(s):

View File

@ -394,19 +394,23 @@ inline bool DSC_EQUIV(const dsc* d1, const dsc* d2, bool check_collate)
{
if (((alt_dsc*) d1)->dsc_combined_type == ((alt_dsc*) d2)->dsc_combined_type)
{
if (d1->dsc_dtype >= dtype_text && d1->dsc_dtype <= dtype_varying)
if ((d1->dsc_dtype >= dtype_text && d1->dsc_dtype <= dtype_varying) ||
d1->dsc_dtype == dtype_blob)
{
if (DSC_GET_CHARSET(d1) == DSC_GET_CHARSET(d2))
if (d1->getCharSet() == d2->getCharSet())
{
if (check_collate) {
return (DSC_GET_COLLATE(d1) == DSC_GET_COLLATE(d2));
}
if (check_collate)
return d1->getCollation() == d2->getCollation();
return true;
}
return false;
}
return true;
}
return false;
}