0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-05 18:18:35 +02:00

ircd::db: Move column alignment check outside of DB::Open ctor closure.

This commit is contained in:
Jason Volk 2018-10-22 04:31:50 -07:00
parent d3e61abe7d
commit 5544da61b8

View file

@ -956,16 +956,6 @@ try
this->column_index.at(handle->GetName()) = handle->GetID();
}
for(size_t i(0); i < this->columns.size(); ++i)
if(db::id(*this->columns[i]) != i)
throw error
{
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
i,
db::id(*this->columns[i]),
db::name(*this->columns[i])
};
return ret;
}()}
,uuid{[this]
@ -991,6 +981,16 @@ try
return checkpointer;
}()}
{
for(size_t i(0); i < this->columns.size(); ++i)
if(db::id(*this->columns[i]) != i)
throw error
{
"Columns misaligned: expecting id[%zd] got id[%u] '%s'",
i,
db::id(*this->columns[i]),
db::name(*this->columns[i])
};
if(ircd::checkdb)
{
log::notice