Skip to content

Commit e070d2e

Browse files
committed
Merge branch '7.0' into master
# Conflicts: # Version.props
2 parents 261bacc + 3e30ee6 commit e070d2e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

ChangeLog/6.0.10_Z_Final.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[main] Fixed certain cases of NRE happened on Domain build due to views in extracted schema
2+
[main] Fixed NotSupportedException appeared on x86 architecture when DateTimeOffset is used in entites

Orm/Xtensive.Orm/Orm/Upgrade/Internals/CatalogCloner.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ private void CloneViews(Schema newSchema, Schema sourceSchema)
158158
var newView = newSchema.CreateView(sourceView.Name);
159159
CopyDbName(newView, sourceView);
160160
newView.CheckOptions = sourceView.CheckOptions;
161-
newView.Definition = (SqlNative) sourceView.Definition.Clone();
161+
if (sourceView.Definition != null) {
162+
newView.Definition = (SqlNative) sourceView.Definition.Clone();
163+
}
162164
CloneViewColumns(newView, sourceView);
163165
CloneIndexes(newView, sourceView);
164166
}

Orm/Xtensive.Orm/Tuples/Packed/PackedFieldAccessor.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,11 @@ protected override void Encode(DateTimeOffset value, long[] values, int offset)
576576

577577
private static unsafe int GetSize()
578578
{
579-
return sizeof(DateTimeOffset);
579+
// Depending on architecture, x86 or x64, the size of DateTimeOffset is either 12 or 16 respectively.
580+
// Due to the fact that Rank calculation algorithm expects sizes to be equal to one of the power of two
581+
// it returns wrong rank value for size 12 (bitsize = 96) which causes wrong choice of Encode/Decode methods.
582+
// Setting it to 16 helps to solve Rank problem.
583+
return sizeof(long) * 2;
580584
}
581585

582586
public DateTimeOffsetFieldAccessor()

0 commit comments

Comments
 (0)