14792 {
14793 VerifySinglePath();
14794 path.VerifySinglePath();
14795 reference<const ColumnIndex> a(*this);
14796 reference<const ColumnIndex> b(path);
14797
14798 while (true) {
14799 if (a.get().HasPrimaryIndex()) {
14800 if (!b.get().HasPrimaryIndex()) {
14801 return false;
14802 }
14803 if (a.get().GetPrimaryIndex() != b.get().GetPrimaryIndex()) {
14804 return false;
14805 }
14806 } else {
14807 if (b.get().HasPrimaryIndex()) {
14808 return false;
14809 }
14810 if (a.get().GetFieldName() != b.get().GetFieldName()) {
14811 return false;
14812 }
14813 }
14814 const bool a_has_children = a.get().HasChildren();
14815 const bool b_has_children = b.get().HasChildren();
14816 if (!a_has_children && !b_has_children) {
14817 return false;
14818 }
14819 if (!a_has_children) {
14821 return false;
14822 }
14823 if (!b_has_children) {
14825 return true;
14826 }
14827 a = a.get().GetChildIndexes()[0];
14828 b = b.get().GetChildIndexes()[0];
14829 }
14830 return true;
14831 }